Next: Simple update, Previous: Initial import, Up: Invoking gnulib-tool [Contents][Index]
You can at any moment decide to use Gnulib differently than the last time.
There are two ways to change how Gnulib is used. Which one you’ll use,
depends on where you keep track of options and module names that you pass
to gnulib-tool
.
gnulib-tool
again, with modified options and more or fewer module names.
gnulib-tool
remembers which modules were used last time. If you
want to rely on gnulib-tool
’s own memory of the last used
options and module names, you can use the commands
gnulib-tool --add-import
and
gnulib-tool --remove-import
.
So, if you only want to use more Gnulib modules, simply invoke
gnulib-tool --add-import new-modules
. The list of
modules that you pass after ‘--add-import’ is added to the
previous list of modules.
Similarly, if you want to use fewer Gnulib modules, simply invoke
gnulib-tool --remove-import unneeded-modules
. The list
of modules that you pass after ‘--remove-import’ is removed
from the previous list of modules. Note that if a module is then still
needed as dependency of other modules, it will be used nevertheless.
If you want to really not use a module any more, regardless of
whether other modules may need it, you need to use the ‘--avoid’
option.
For other changes, such as different choices of ‘--lib’, ‘--source-base’ or ‘--aux-dir’, the normal way is to modify manually the file gnulib-cache.m4 in the M4 macros directory, then launch ‘gnulib-tool --add-import’.
The only change for which this doesn’t work is a change of the
‘--m4-base’ directory. Because, when you pass a different value of
‘--m4-base’, gnulib-tool
will not find the previous
gnulib-cache.m4 file any more. A possible solution is to
manually copy the gnulib-cache.m4 into the new M4 macro directory.
In the gnulib-cache.m4 file, the macros have the following meaning:
gl_MODULES
The argument is a space separated list of the requested modules, not including dependencies.
gl_AVOID
The argument is a space separated list of modules that should not be used, even if they occur as dependencies. Corresponds to the ‘--avoid’ command line argument.
gl_SOURCE_BASE
The argument is the relative file name of the directory containing the gnulib source files (mostly *.c and *.h files). Corresponds to the ‘--source-base’ command line argument.
gl_M4_BASE
The argument is the relative file name of the directory containing the gnulib M4 macros (*.m4 files). Corresponds to the ‘--m4-base’ command line argument.
gl_TESTS_BASE
The argument is the relative file name of the directory containing the gnulib unit test files. Corresponds to the ‘--tests-base’ command line argument.
gl_LIB
The argument is the name of the library to be created. Corresponds to the ‘--lib’ command line argument.
gl_LGPL
The presence of this macro without arguments corresponds to the ‘--lgpl’ command line argument. The presence of this macro with an argument (whose value must be 2 or 3) corresponds to the ‘--lgpl=arg’ command line argument.
gl_LIBTOOL
The presence of this macro corresponds to the ‘--libtool’ command line argument and to the absence of the ‘--no-libtool’ command line argument. It takes no arguments.
gl_MACRO_PREFIX
The argument is the prefix to use for macros in the gnulib-comp.m4 file. Corresponds to the ‘--macro-prefix’ command line argument.
Next: Simple update, Previous: Initial import, Up: Invoking gnulib-tool [Contents][Index]