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) $@
# 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()