GNU bug report logs -
#73769
[PATCH] automake: distribute local gnulib directory modules
Previous Next
Reported by: Michael Pratt <mcpratt <at> pm.me>
Date: Sat, 12 Oct 2024 11:35:02 UTC
Severity: normal
Tags: patch
Done: Karl Berry <karl <at> freefriends.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
When gnulib-tool or a bootstrap script uses the option --local-dir,
include the "modules" files in a release with DIST_COMMON. Otherwise,
these source files are present in checkouts but not in distribution.
The resulting gnulib.mk from gnulib-tool has comments
with the options used to generate it:
# Generated by gnulib-tool.
# Reproduce by:
# gnulib-tool --import --local-dir=gl \
# ...
Regex match and parse this information to get any local directories.
For example, coreutils uses a local gnulib directory "gl"
so am__DIST_COMMON will include "$(top_srcdir)/gl/modules".
* bin/automake.in (read_am_file): push "modules" subdirectory of
local gnulib directories to dist_common if it exists.
Signed-off-by: Michael Pratt <mcpratt <at> pm.me>
---
bin/automake.in | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/bin/automake.in b/bin/automake.in
index a17f45236..b757a78e4 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -6520,6 +6520,16 @@ sub read_am_file
}
elsif (/$COMMENT_PATTERN/o)
{
+ # Distribute local gnulib modules.
+ if ($amfile =~ /\/gnulib\.mk/o)
+ {
+ if ($_ =~ /--local-dir=([^\\\s]*)/o)
+ {
+ push_dist_common ("\$\(top_srcdir\)/$1/modules")
+ if -d "$1/modules";
+ }
+ }
+
# Stick comments before the incoming macro or rule. Make
# sure a blank line precedes the first block of comments.
$spacing = "\n" unless $blank;
--
2.30.2
This bug report was last modified 180 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.