Mercurial > gnulib
diff doc/gnulib.texi @ 40184:7f0ac0398fae
gnulib-tool: Improve handling of multiple --local-dir options.
* doc/gnulib.texi (Extending Gnulib): Explain how multiple --local-dir
options work.
* gnulib-tool (func_path_prepend): Remove function.
(func_path_foreach): Make IFS handling more robust.
(local_gnulib_path): Collect --local-dir values using func_path_append,
not func_path_prepend.
(func_determine_path_separator): Make IFS handling more robust.
(func_lookup_file_cb): New function.
(func_lookup_file): Rewritten to use func_lookup_file_cb instead of
func_lookup_local_file. Apply the patches in the reverse order of their
origin in $local_gnulib_path.
(func_count_relative_local_gnulib_path): Make IFS handling more robust.
* NEWS: Mention that the first --local-dir option is the one with
highest priority.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Thu, 14 Feb 2019 20:50:57 +0100 |
parents | 3bde449680d6 |
children |
line wrap: on
line diff
--- a/doc/gnulib.texi Sun Feb 10 12:49:39 2019 +0100 +++ b/doc/gnulib.texi Thu Feb 14 20:50:57 2019 +0100 @@ -714,6 +714,15 @@ Otherwise, @command{gnulib-tool} uses the file included in Gnulib. @end itemize +You can specify the @option{--local-dir} multiple times. In this case, +the first specified directory has the highest precedence. That is, a +@file{@var{file}} found in one directory will shadow any @file{@var{file}} +and @file{@var{file}.diff} in the later directories and in the Gnulib +directory. And a file @file{@var{file}.diff} found in one directory will +be applied on top of the combination of @file{@var{file}} and +@file{@var{file}.diff} files found in the later directories and in the +Gnulib directory. + Please make wise use of this option. It also allows you to easily hold back modifications you make to Gnulib macros in cases it may be better to share them.