summaryrefslogtreecommitdiffstats
path: root/web/input/doc/faq/gnulib.md
diff options
context:
space:
mode:
Diffstat (limited to 'web/input/doc/faq/gnulib.md')
-rw-r--r--web/input/doc/faq/gnulib.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/web/input/doc/faq/gnulib.md b/web/input/doc/faq/gnulib.md
new file mode 100644
index 0000000..328dfeb
--- /dev/null
+++ b/web/input/doc/faq/gnulib.md
@@ -0,0 +1,36 @@
1title: Gnulib
2parent: FAQ
3---
4
5# How do I use and update Gnulib?
6
7[Gnulib][gnulib] provides replacement implementations of functions that are
8not available on all (Unix-like) operating systems. In order to sync with the
9latest Gnulib code, do something like:
10
11 git clone git://git.savannah.gnu.org/gnulib.git
12 cd gnulib
13 GNULIB_HEAD=$(git rev-parse --short HEAD)
14 cd ..
15 git clone git@github.com:nagios-plugins/nagios-plugins.git
16 cd nagios-plugins
17 ../gnulib/gnulib-tool --update
18 find gl -name '*~' -o -name '.gitignore' | xargs rm
19 git status
20 git add gl
21 git commit -m "Sync with latest Gnulib code ($GNULIB_HEAD)"
22
23In order to make a given function available via Gnulib (on systems which don't
24provide that function), the [corresponding module][modules] must be imported
25using `gnulib-tool`, e.g. (in order to add the `strcase` module):
26
27 ../gnulib/gnulib-tool --no-vc-files --import strcase
28 find gl -name '*~' | xargs rm
29 git status
30 git add gl
31 git commit -m 'Add Gnulib module "strcase"'
32
33[gnulib]: http://www.gnu.org/software/gnulib/ "Gnulib"
34[modules]: http://www.gnu.org/software/gnulib/MODULES.html "Gnulib Modules"
35
36<!--% # vim:set filetype=markdown textwidth=78 joinspaces: # %-->