1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-06-15 23:35:50 +00:00

503 Commits

Author SHA1 Message Date
Bruno Haible 5eb8f6a224 gnulib-tool: Make --conditional-dependencies work better.
Reported by Dmitry Selyutin <ghostman.sd@gmail.com>.

* gnulib-tool (Options): Don't reject the combination of
--conditional-dependencies with --with-tests.
(func_emit_autoconf_snippets): Add argument referenceable_modules.
Don't reference $modules.
(func_import, func_create_testdir): Pass it.
2017-12-29 00:33:51 +01:00
Bruno Haible 87d14d357f gnulib-tool: Clean up after autotools.
* gnulib-tool (func_create_testdir, func_create_megatestdir): Remove
useless directory left over by the Autotools.
2017-06-12 01:40:51 +02:00
Bruno Haible 30459fe101 gnulib-tool: Fix bug in func_symlink_if_changed, from 2006-11-13.
* gnulib-tool (func_symlink_target): New function, extracted from
func_symlink.
(func_symlink, func_symlink_if_changed): Use it.
2017-06-08 15:09:31 +02:00
Bruno Haible c09c249320 gnulib-tool: Fix bug in func_ln_s, from 2016-01-15.
* gnulib-tool (func_ln_s): Determine cp_src correctly.
2017-06-08 14:45:39 +02:00
Bruno Haible 306be564ba gnulib-tool: Add options to create hard links.
* gnulib-tool (func_usage): Document options --hardlink,
--local-hardlink, --more-hardlinks.
(func_symlink): Renamed from func_ln.
(func_symlink_if_changed): Renamed from func_ln_if_changed.
(func_hardlink): New function.
(copymode, lcopymode): New variables.
(symbolic, lsymbolic): Remove variables.
(Options): Implement options --hardlink, --local-hardlink,
--more-hardlinks.
(func_should_link): Renamed from func_should_symlink. Set copyaction.
(func_add_file, func_update_file): Update invocation of
func_should_link. Invoke func_hardlink when appropriate.
(func_import): Update comments.
(func_create_testdir): Update invocation of func_should_link. Invoke
func_hardlink when appropriate.
Finally, invoke 'git update-index --refresh' to mitigate the effects of
the hard links on git.
2017-05-22 01:39:59 +02:00
Bruno Haible f5142421c6 gnulib-tool: Don't create hard links between gnulib and its testdirs.
* gnulib-tool (func_create_testdir): Don't invoke 'ln'.
2017-05-20 13:24:37 +02:00
Bruno Haible 0414a24cf5 gnulib-tool: Fix generated code when libtests contains module 'alloca'.
* gnulib-tool (func_emit_tests_Makefile_am): For libtests.a, use
@ALLOCA@, not @LTALLOCA@.
2017-05-15 23:13:57 +02:00
Paul Eggert 8224d65142 gnulib-tool: improve GNU Make debugging
* gnulib-tool (func_emit_lib_Makefile_am): Omit unnecessary echo.
Report autoconf diagnostics when it fails, in the output makefile.
2017-05-15 07:43:11 -07:00
Bruno Haible a7bd2403d2 verify tests: Fix spurious failure with parallel make.
* gnulib-tool (func_emit_tests_Makefile_am): Emit initialization of
EXTRA_PROGRAMS.
* tests/test-verify.sh: Build test-verify-try.o, not test-verify.o.
* tests/test-verify-try.c: New file.
* modules/verify-tests (Files): Add it.
(EXTRA_PROGRAMS): Add test-verify-try.
(MOSTLYCLEANFILES): Update accordingly.
Reported by Adam James Stewart <ajstewart@anl.gov>.
2017-04-20 21:29:01 +02:00
Bruno Haible 363135016c gnulib-tool: Don't produce a tests directory with only snippet .h files.
* gnulib-tool (func_modules_transitive_closure_separately): If
testsrelated_modules ends up with no "real" modules, aside from
modules with applicability 'all', set it to empty.
2017-03-15 23:25:37 +01:00
Mathieu Lirzin f30205c5d5 gnulib-tool: don't automatically distribute files from top/
* gnulib-tool (func_get_automake_snippet_unconditional): To be able to
not distribute top/README-release by default, don't distribute files
from top/ unconditionally.
* modules/gnumakefile (Makefile.am): Distribute top/GNUmakefile.
* modules/maintainer-makefile (Makefile.am): Distribute top/maint.mk.
2017-03-14 11:40:53 -07:00
Paul Eggert fb8289f44a gnulib-tool: fix typo in comment output
* gnulib-tool (func_import): Fix typo with previous change.
2017-03-14 08:40:03 -07:00
Paul Eggert d608854763 gnulib-tool: minor --gnu-make fixups
* gnulib-tool (func_emit_lib_Makefile_am):
Remove useless code that was a blind alley during implementation.
Problem reported by Thien-Thi Nguyen in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-03/msg00029.html
(func_import): Note the "--gnu-make" option in the output comment.
2017-03-13 15:52:42 -07:00
Paul Eggert dfbe4c0276 gnulib-tool: new option --gnu-make
This is for applications like GNU Emacs that use GNU Make
features instead of Automake.
* doc/gnulib-tool.texi (Initial import): Mention --gnu-make.
* doc/gnulib.texi (Unit test modules, Build robot for gnulib):
Do not assume Automake.
* gnulib-tool (func_determine_path_separator)
(func_modules_transitive_closure, func_update_file)
(func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
(func_import): Add support for --gnu-make.
2017-03-12 19:19:28 -07:00
Bruno Haible f42ee040af gnulib-tool: Avoid conflict of havelib-tests with --single-configure.
* gnulib_tool (func_create_testdir): Avoid havelib-tests when
--with-tests --single-configure is specified.
2017-02-19 15:15:11 +01:00
Paul Eggert a3fd683de3 version-etc: new year
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
2017-01-01 02:59:23 +00:00
Daiki Ueno 31a08abd32 gnulib-tool: fix the previous change
* gnulib-tool (func_import): Relax the regex used for "LGPLv3+ or
GPLv2" rewriting.
2016-12-02 17:16:50 +01:00
Daiki Ueno 27d1d32a20 gnulib-tool: fix the previous change
* gnulib-tool (func_import): Relax the regex for the end marker of
original license text.
2016-12-02 16:57:02 +01:00
Nikos Mavrogiannopoulos 1aa6e23bd2 gnulib-tool: properly list the LGPL3orGPLv2 license
* gnulib-tool (func_import): Adhere to the license guideline when
rewriting the license text to "LGPLv3+ or GPLv2":
https://www.gnu.org/prep/maintain/maintain.html#Licensing-of-GNU-Packages
2016-12-02 14:17:05 +01:00
Bruno Haible 567bbf7b7b gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license.
* gnulib-tool (--lgpl): Accept value 3orGPLv2.
(func_import): Extend determination of license_incompatibilities.
(func_create_testdir): Extend table of license compatibility. Handle
also the licenses GPLv3+, GPL, LGPLv3+.
2016-11-13 04:13:21 +01:00
Bruno Haible ff9debcf75 Avoid gnulib-tool warnings about the dependencies of 'parse-datetime'.
* gnulib-tool (func_get_license): Special-case the 'parse-datetime'
module.
2016-10-22 19:39:33 +02:00
Bruno Haible 932a1ae7ba gnulib-tool: Make --create-testdir on all modules work again.
* gnulib-tool (func_create_testdir): Don't include the
non-recursive-gnulib-prefix-hack module.
2016-10-22 19:03:12 +02:00
Paul Eggert d9958eb1eb gnulib-tool: don't give up on ln -s so easily
* gnulib-tool (func_ln_s): Don't give up on a later ln -s merely
because an earlier one failed.  The targets could be on different
file systems.  Problem reported by KO Myung-Hun in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00081.html
2016-01-24 14:25:00 -08:00
Paul Eggert 350f2c6fb5 * gnulib-tool: fix stray debug line in previous patch 2016-01-15 10:13:03 -08:00
Paul Eggert 0e50dd0071 gnulib-tool: don't assume ln -s works
* gnulib-tool (func_ln_s): New function.
(func_ln): Use it.
2016-01-15 10:09:00 -08:00
Paul Eggert 71090a2a31 version-etc: new year
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
2016-01-01 00:57:21 -08:00
Pavel Raiskup 55c6f22b80 gnulib-tool: allow multiple --local-dir usage
* gnulib-tool: Use --local-dir to construct compound
$local_gnulib_path path instead of $local_gnulib_dir.  Determine
PATH_SEPARATOR early.
(local_gnulib_dir): Rename into $local_gnulib_path everywhere.
(func_gnulib_dir): Cut out PATH_SEPARATOR detection code into
func_determine_path_separator because that needs to be detected
earlier now.
(func_determine_path_separator): New function.
(func_path_foreach, func_path_foreach_inner): New functions.
(func_path_prepend, func_path_append): Likewise.
(func_lookup_local_file, func_lookup_local_file_cb): Likewise.
(func_lookup_file, func_all_modules): Use new functions to work
with local_gnulib_path.
(func_modules_in_dir, func_exists_module): New callbacks for
func_path_foreach.
(func_exists_module, func_get_tests_module): Likewise.
(func_is_local_file, func_should_symlink): New helper methods.
(func_add_file, func_update_file): Use new func_should_symlink
instead, DRY.
(func_reconstruct_cached_local_gnulib_path): New helper.
(func_reconstruct_cached_dir): New callback.
(func_import): The cached_local_gnulib_dir renamed to
cached_local_gnulib_path similarly to local_gnulib_dir.
Use new func_reconstruct_cached_local_gnulib_path.
(func_count_relative_local_gnulib_path): New sub-method.
(func_create_testdir): Use func_should_symlink, DRY.
(func_create_megatestdir): Use new functions to work with
local_gnulib_path correctly.
(func_append_local_dir): New helper.
2015-12-09 01:29:42 +00:00
Pavel Raiskup 63ce1a2103 gnulib-tool: fix tests of 'extensions' module
This complements f8fe25fab6 commit.

* gnulib-tool (func_emit_pre_early_macros): New function, it wraps
emitting of initial gl_EARLY macros.
(func_import, func_create_testdir): All dumps of gl_PROG_AR_RANLIB
replaced with func_emit_pre_early_macros call.
2015-10-06 14:37:52 -07:00
Pavel Raiskup f8fe25fab6 gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash
The gl_PROG_AR_RANLIB (it is always called by gl_EARLY) sets AR
and ARFLAGS variables.  Doing this unconditionally could break
later Automake's AM_PROG_AR invocation (at least it's
AC_CHECK_TOOLS call to detect correct 'ar' binary).

Original purpose of the gl_PROG_AR_RANLIB was only to handle the
Amsterdam Compiler Kit, so make the previous code to have effects
only on ACK, and rather automatically call the Automake's
AM_PROG_AR as soon as possible to decide other cases.

References:
http://lists.gnu.org/archive/html/bug-gnulib/2015-07/msg00001.html

* m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): AC_BEFORE AM_PROG_AR.
Set the AR/ARFLAGS to ACK defaults OR call AM_PROG_AR.  If neither
is possible, keep setting AR/ARFLAGS to reasonable defaults.
* gnulib-tool (func_import): Put the gl_USE_SYSTEM_EXTENSIONS
right before gl_PROG_AR_RANLIB into gnulib-comp.m4 (if the
'extensions' module is used.
* modules/extensions (configure.ac-early): Remove as this snippet
is added to gnulib-comp.m4 earlier anyway.
2015-09-25 11:25:29 -07:00
Paul Eggert f406941a8a maint: add coding cookies to non-ASCII sources
Otherwise, Emacs might do the wrong thing if run in an
he_IL.ISO-8859-8 locale, which an Emacs developer does on occasion.
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00966.html

Don't bother with test files, as they aren't copied to the Emacs
source directory.  If this problem affects test files in some other
GNU project, we can add coding cookies to the non-ASCII test files
later.
2015-09-24 13:25:37 -07:00
Daiki Ueno b4f31e3a89 gnulib-tool: don't transform binary files with sed
* gnulib-tool (func_add_or_update): Don't apply sed_transform_* to
.mo and .class files.
Reported by Denis Denisov.
2015-08-26 11:18:21 +09:00
Pádraig Brady e3704b9c98 gnulib-tool: concatenate lib_SOURCES to a single line
* gnulib-tool: Refactor the line merging sed logic,
and use that to output a single lib_SOURCES line for each module.
gnulib using projects often postprocess this output to prepend
subdir paths to each item, and having a single line simplifies this
processing allowing better decoupling from the gnulib-tool output.
This avoids a new issue with coreutils where it failed to prepend
a path on the new {get,set}-permissions.c items (which were
on continued lines in modules/acl-permissions).
2015-06-01 23:44:38 +01:00
Mats Erik Andersson 75d1743ac5 gnulib-tool: output bold attribute more portably
* gnulib-tool (func_show_module_list): Change hexadecimal
numbers to octal in BOLD_ON and BOLD_OFF.  The use of hex
encoded numbers as arguments to `printf' is not portable,
and is not claimed by POSIX.  This is the case with FreeBSD.
2015-04-15 23:46:27 +01:00
Pádraig Brady 6c8f206bb3 gnulib-tool: fix handling of patch(1) diagnostics
* gnulib-tool: Send diagnostics from patch(1) to stderr,
as otherwise gnulib-tool will reparse that output and attempt
to lookup modules.
2015-02-03 10:34:47 +00:00
Paul Eggert b9bfe78424 version-etc: new year
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
2014-12-31 17:47:54 -08:00
KO Myung-Hun 9a98fdfef2 gnulib-tool: recognize x:* as an absolute path
On OS/2, x:* is an absolute path, too.

* gnulib-tool (func_gnulib_dir): Add ?:* case.
(func_relconcat): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-12-02 12:30:54 -07:00
Mathieu Anquetin 9565c3be73 gnulib-tool: Sync with build-aux/bootstrap options
Options for downloading PO files were not in sync with their
build-aux/bootstrap counterpart. This commit adopt the same behavior for
these tools.

Signed-off-by: Mathieu Anquetin <mathieu@anquetin.eu>
2014-09-05 17:17:27 -07:00
Mathieu Anquetin c83b897099 gnulib-tool: Fallback to wget when rsync fails
Current implementation only tries to rsync PO files when rsync is
installed on the host. In case of error, no files are downloaded even
if they are available. This leads to bootstrap problems for hosts
that lie behind a restrictive firewall.

This patch always tries to rsync by default, falling back to wget if
an error occurs.

Signed-off-by: Mathieu Anquetin <mathieu@anquetin.eu>
2014-09-05 17:17:24 -07:00
Sylvain Beucler 2056a330b7 gnulib-tool: wget translations using --no-verbose rather than --quiet
This allows the user to see error messages if any (--quiet hides them)
* gnulib-tool: Invoke wget with --no-verbose, rather than --quiet.
2014-05-28 07:38:28 -07:00
Sylvain Beucler ad2a2c8251 gnulib-tool: adjust translation wget to avoid a https redirection
Context: http://translationproject.org/latest/gnulib redirects to
         https://translationproject.org/latest/gnulib/
Rationale: if the user falls back to wget, she doesn't have rsync and
is probably in a minimal build environment, where packages such as
'ca-certificates' are missing as well, resulting in a failed (and
difficult to detect since ignored) translation initial fetch.
Consequently let's avoid https if possible, and add the missing
trailing slash.  This also avoids an unnecessary 302 redirection.
* gnulib-tool: Add trailing slash to gnulib URL.
2014-05-28 07:38:28 -07:00
Eric Blake 1276a2c5f2 maint: update copyright
I ran 'make update-copyright'.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-01 00:07:10 -07:00
Jim Meyering 5c508f686b gnulib-tool: protect against CDPATH
* gnulib-tool: Many "cd" built-in functions print a directory name
to stdout when CDPATH is set, e.g.,
  $ bash -c 'CDPATH=/; cd tmp'
  /tmp
Unset it, when possible.  Prompted by a comment from Bruce Korb.
2013-10-28 17:05:26 -07:00
Stefano Lattarini 97ddbcfa0b deps: require Automake >= 1.9.6 in generated Makefile fragments
That is the same minimal version required in the DEPENDENCIES file.
Moreover, the old code generated a requirement of Automake >= 1.5,
and that is an insanely outdated version.

* gnulib-tool: Bump minimal version requirement in AUTOMAKE_OPTIONS.
* tests/havelib/rpathlx/Makefile.am: Likewise.
* tests/havelib/rpathly/Makefile.am: Likewise.
* tests/havelib/rpathlyx/Makefile.am: Likewise.
* tests/havelib/rpathlz/Makefile.am: Likewise.
* tests/havelib/rpathlzyx/Makefile.am: Likewise.
* tests/havelib/rpathx/Makefile.am: Likewise.
* tests/havelib/rpathy/Makefile.am: Likewise.
* tests/havelib/rpathz/Makefile.am: Likewise.
2013-05-10 22:13:04 +02:00
Stefano Lattarini 435f1d7ad9 Assume gnulib is checked out from Git, not CVS
In fact, access to the gnulib repository through CVS has been disabled,
or more precisely, got broken and was never restored; see:
<http://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00008.html>

Note that support for CVS is not removed completely and unthinkingly
by this change: only support for CVS checkouts of gnulib itself is
removed.  For example, the 'bootstrap' script still cater to .cvsingore
files and CVS directories, for the benefit of those poor gnulib clients
still stuck with CVS.  Ditto for the 'gnulib-tool' script itself.

* gnulib-tool: Simplify accordingly.
* posix-modules: Likewise.
* MODULES.html.sh: Likewise.
* doc/gnulib.texi: No longer mention the decommissioned CVS gnulib
repository.
* doc/gnulib-intro.texi: Likewise.
* doc/gnulib-readme.texi: Likewise.
* doc/gnulib-tool.texi: In the examples and explanations, refer to a
sample '.gitignore' file rather than a sample '.cvsignore'.
* NEWS: Update.
* m4/extensions.m4: While at it, remove a comment mistakenly referring
to "CVS Autoconf" rather than "git Autoconf".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Acked-by: Paul Eggert <eggert@cs.ucla.edu>
2013-05-04 22:15:02 +02:00
Paul Eggert 8e858e6d77 gnulib-tool: fix incompatibility with autopoint 0.18.2
* gnulib-tool: Don't indent AM_GNU_GETTEXT_VERSION line.
Problem reported by Tom G. Christensen in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00053.html>.
2013-01-05 08:03:30 -08:00
Eric Blake 9fc81090f6 maint: update all copyright year number ranges
Run "make update-copyright".  Compare to commit 1602f0a from last year.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-01-01 00:50:58 +00:00
Bruno Haible 68f693ff1d gnulib-tool: Remove no-op option --no-changelog.
* gnulib-tool (func_usage): Don't mention --no-changelog.
(do_changelog): Remove variable.
Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
2012-08-26 17:04:56 +02:00
Bruno Haible 5f8b74c7b8 gnulib-tool: Improve coding style.
* gnulib-tool (func_emit_tests_Makefile_am): Set perhapsLT, like in
func_emit_lib_Makefile_am.
Reported and fix suggested by Dmitriy Selyutin <ghostman.sd@gmail.com>.
2012-08-19 14:13:11 +02:00
Bruno Haible ea660f5668 gnulib-tool: Fix indentation.
* gnulib-tool (func_import): Fix indentation.
2012-08-19 14:08:12 +02:00
Bruno Haible 9bdf6c8a0c gnulib-tool: Remove old file names from .cvsignore, .gitignore.
* gnulib-tool (func_update_ignorelist): Don't use 'join -v 1' command
on the list of removed files.
2012-08-19 14:06:50 +02:00