xref: /Universal-ctags/gnulib/README.md (revision 7f22520a348fda0ea428a13afe40ab03b1a6ffc7)
1# README for `gnulib/` directory
2
3The files in this directory were taken from [the GNU Portability Library
4(Gnulib)](https://www.gnu.org/software/gnulib/).
5
6See "1. Bread Overview" and "3. Invoking gnulib-tool" in [the GNU Gnulib
7documents](https://www.gnu.org/software/gnulib/manual/gnulib.html) for more details.
8
9## Checking out Gnulib
10
11```
12$ git clone git://git.sv.gnu.org/gnulib.git
13```
14
15In the following description, the directory where Gnulib is checked out is
16called `$GNULIB_DIR`. And the root directory of the Universal Ctags is called
17`$CTAGS_DIR`.
18
19## Importing the first module
20
21The first module (`regex`) was imported by the following command into the
22directory `gnulib/` without modifying `.gitignore`.
23
24```
25$ cd $CTAGS_DIR
26$ gnulib-tool --source-base=gnulib --no-vc-files --import regex
27```
28
29The options used are saved in `m4/gnulib-cache.m4`.
30
31## Updating the modules
32
33`-add-import` without module names updates imported modules.
34
35```
36$ cd $GNULIB_DIR
37$ git pull
38$ cd $CTAGS_DIR
39$ gnulib-tool --add-import
40```
41
42## Importing additional modules
43
44```
45$ gnulib-tool --add-import foo bar ...
46```
47