diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-09-01 01:46:42 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-09-01 21:27:46 +0200 |
commit | 9f842331032e375df28f871b9ba92b0a7f5fc326 (patch) | |
tree | d6752283ba6c6b6d17db9ab9cda58ce2c92e8701 | |
parent | 08466b8f89f8468674640ee0691528b66358fe7c (diff) | |
download | coreutils-9f842331032e375df28f871b9ba92b0a7f5fc326.tar.xz |
maint: improve remake rules for maintainers
This is a follow up on today's commit v8.19-60-g4f2e62b".
* Makefile.am ($(top_srcdir)/m4/cu-progs.m4,
$(srcdir)/src/cu-progs.mk): New, generate these files from the
'build-aux/gen-lists-of-programs.sh', the same way it's done
from the bootstrap script.
* bootstrap.conf (bootstrap_post_import_hook): Add comment about
the necessity to keep those new rules synced with the commands
here. Enhance those commands so to that the generated files are
set read-only.
-rw-r--r-- | Makefile.am | 15 | ||||
-rw-r--r-- | bootstrap.conf | 10 |
2 files changed, 22 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 6a56f6832..2d5fdaa8f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,6 +55,21 @@ EXTRA_DIST = \ maint.mk \ thanks-gen +gen_progs_lists = $(top_srcdir)/build-aux/gen-lists-of-programs.sh + +# Keep these in sync with bootstrap.conf:bootstrap_post_import_hook(). +# Use '$(top_srcdir)/m4' and '$(srcdir)/src' for the benefit of non-GNU +# makes: it is with those directories that 'cu-progs.m4' and 'cu-progs.mk' +# appear in our dependencies. +$(top_srcdir)/m4/cu-progs.m4: $(gen_progs_lists) + $(AM_V_GEN)rm -f $@ $@-t \ + && $(SHELL) $(gen_progs_lists) --autoconf >$@-t \ + && chmod a-w $@-t && mv -f $@-t $@ +$(srcdir)/src/cu-progs.mk: $(gen_progs_lists) + $(AM_V_GEN)rm -f $@ $@-t \ + && $(SHELL) $(gen_progs_lists) --automake >$@-t \ + && chmod a-w $@-t && mv -f $@-t $@ + ALL_RECURSIVE_TARGETS += install-root install-root: cd src && $(MAKE) $@ diff --git a/bootstrap.conf b/bootstrap.conf index 4ef3fc80d..dc0ffb605 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -329,9 +329,13 @@ bootstrap_post_import_hook () # Automake requires that ChangeLog exist. touch ChangeLog || return 1 # List of coreutils programs. See heading comments in the invoked - # script for more info. - build-aux/gen-lists-of-programs.sh --autoconf >m4/cu-progs.m4 || return 1 - build-aux/gen-lists-of-programs.sh --automake >src/cu-progs.mk || return 1 + # script for more info. Keep this in sync with the rules in + (m4f=m4/cu-progs.m4 mkf=src/cu-progs.mk tmp=cu-progs.tmp \ + && rm -f $m4f $mkf $tmp-1 $tmp-2 \ + && build-aux/gen-lists-of-programs.sh --autoconf >$tmp-1 \ + && build-aux/gen-lists-of-programs.sh --automake >$tmp-2 \ + && chmod a-w $tmp-1 $tmp-2 \ + && mv -f $tmp-1 $m4f && mv -f $tmp-2 $mkf) } bootstrap_epilogue() |