bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Not distributing README-release automatically.


From: Mathieu Lirzin
Subject: Re: Not distributing README-release automatically.
Date: Tue, 14 Mar 2017 12:34:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Jim Meyering <address@hidden> writes:

> On Tue, Mar 7, 2017 at 8:08 AM, Mathieu Lirzin <address@hidden> wrote:
>>
>> Jim Meyering <address@hidden> writes:
>>
>>> On Sun, Mar 5, 2017 at 8:12 AM, Mathieu Lirzin <address@hidden> wrote:
>>>>
>>>> I have been using 'readme-release' module and was surprised to discover
>>>> that the "README-release" file was automatically distributed without any
>>>> mention in the "module/readme-release" file.
>>>>
>>>> After some digging I have discovered that all files from the "top"
>>>> directory are automatically added to EXTRA_DIST.  Here is a snippet from
>>>> bootstrap that could be removed:
>>>>
>>>> --8<---------------cut here---------------start------------->8---
>>>>       if test -n "$top_files"; then
>>>>         sed_prepend_topdir='s,^,$(top_srcdir)/,'
>>>>         echo "EXTRA_DIST += "`echo "$top_files" | sed -e 
>>>> "$sed_prepend_topdir"`
>>>>         echo
>>>>       fi
>>>> --8<---------------cut here---------------end--------------->8---
>>>>
>>>> IMO we should move the responsability of distributing "top/*" files to
>>>> the module definition instead, and not distributing "README-release"
>>>> automatically (like what is done in Coreutils).
>>>>
>>>> What do people think?
>>>
>>> Regarding README-release, I'm leery of requiring each
>>> top-file-specifying module writer to remember to add each such file to
>>> EXTRA_DIST. An alternative, probably-smaller change may be to add some
>>> attribute by which a module with such a file could opt out of that
>>> default.
>>
>> That would be fine with me.  However I am not sure this additional logic
>> would be smaller (or simpler), since IIUC there is currently only 3
>> top-file-specifying modules:
>>
>>   - maintainer-makefile
>>   - readme-release
>>   - gnumakefile
>>
>> Do I overlook something?
>
> I hadn't counted, and expected more. Given there are only three,
> adding an 'EXTRA_DIST += ...' in two of the three seems reasonable. Do
> you feel like writing the patch?

Here is the patch:

>From e597647323a3777c559043c685391fb993695b37 Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <address@hidden>
Date: Tue, 14 Mar 2017 12:19:40 +0100
Subject: [PATCH] gnulib-tool: don't automatically distribute files from top/

* gnulib-tool (func_get_automake_snippet_unconditional): Don't
distribute files from top/ unconditionally.
* modules/gnumakefile (Makefile.am): Distribute top/GNUmakefile.
* modules/maintainer-makefile (Makefile.am): Distribute top/maint.mk.
---
 ChangeLog                   | 8 ++++++++
 gnulib-tool                 | 7 -------
 modules/gnumakefile         | 1 +
 modules/maintainer-makefile | 3 +++
 4 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 09aec7b50..3bc6bede5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-03-14  Mathieu Lirzin  <address@hidden>
+
+       gnulib-tool: don't automatically distribute files from top/
+       * gnulib-tool (func_get_automake_snippet_unconditional): 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  Paul Eggert  <address@hidden>
 
        snippets: work around GNU Make 3.82 VPATH
diff --git a/gnulib-tool b/gnulib-tool
index 3ff40b879..3e282c8df 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -2461,13 +2461,6 @@ func_get_automake_snippet_unconditional ()
         echo "EXTRA_DIST += "`echo "$buildaux_files" | sed -e 
"$sed_prepend_auxdir"`
         echo
       fi
-      # Synthesize an EXTRA_DIST augmentation also for the files from top/.
-      func_filter_filelist top_files "$nl" "$all_files" 'top/' '' 'top/' ''
-      if test -n "$top_files"; then
-        sed_prepend_topdir='s,^,$(top_srcdir)/,'
-        echo "EXTRA_DIST += "`echo "$top_files" | sed -e "$sed_prepend_topdir"`
-        echo
-      fi
       ;;
   esac
 }
diff --git a/modules/gnumakefile b/modules/gnumakefile
index f917e36fc..93a29c604 100644
--- a/modules/gnumakefile
+++ b/modules/gnumakefile
@@ -19,6 +19,7 @@ m4_if(m4_version_compare([2.61a.100],
         [GNUmakefile=$GNUmakefile])])
 
 Makefile.am:
+EXTRA_DIST += top/GNUmakefile
 distclean-local: clean-GNUmakefile
 clean-GNUmakefile:
        test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
diff --git a/modules/maintainer-makefile b/modules/maintainer-makefile
index 0045c5986..0faa9efa6 100644
--- a/modules/maintainer-makefile
+++ b/modules/maintainer-makefile
@@ -15,6 +15,9 @@ AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
   [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
 AC_REQUIRE([AC_PROG_SED])
 
+Makefile.am:
+EXTRA_DIST += top/maint.mk
+
 License:
 GPLed build tool
 
-- 
2.11.0

Thanks.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37

reply via email to

[Prev in Thread] Current Thread [Next in Thread]