> In case of doubt it might be easier to not try to change the actual > dependency graph at all, but merely the rules, which should be enough > to fix the problem you are targeting.
Rather than try to build debians freebsd-buildutils on my mac, I decided to take the route of leaving the dependency graph alone. I also took the liberty of splitting the series up into much smaller pieces for easier review. The original 1/4 is off the table for now, 2/4 has been approved already, but it's still here below for completeness' sake. The original 4/4 is still the last patch in the series, so 3/4 is now spread out over the remainder, with commentary in each as appropriate. * Makefile.am (Libtool scripts.): Move this section below the `Bootstrap.' section... (libtoolize.in): ...except this one which is generated at bootstrap time, and was added into the `Bootstrap.' section. (Libltdl.): Move this section below the `Libtool scripts.' section. Signed-off-by: Gary V. Vaughan <g...@gnu.org> --- ChangeLog | 10 ++++ Makefile.am | 142 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 81 insertions(+), 71 deletions(-) diff --git a/ChangeLog b/ChangeLog index 647c151..818229f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-08-31 Gary V. Vaughan <g...@gnu.org> + + maint: rearrange Makefile.am in preparation for a follow-up patch. + * Makefile.am (Libtool scripts.): Move this section below the + `Bootstrap.' section... + (libtoolize.in): ...except this one which is generated at + bootstrap time, and was added into the `Bootstrap.' section. + (Libltdl.): Move this section below the `Libtool scripts.' + section. + 2010-09-22 Ralf Wildenhues <ralf.wildenh...@gmx.de> Fix regression in command-line length computation. diff --git a/Makefile.am b/Makefile.am index 6e29a29..dcb6d0d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,63 +60,21 @@ timestamp = set dummy `$(MKSTAMP) $(srcdir)`; shift; \ rebuild = rebuild=:; $(timestamp); correctver=$$1 -## ---------------- ## -## Libtool scripts. ## -## ---------------- ## - -# The libtool distributor and the standalone libtool script. -bin_SCRIPTS = libtoolize libtool - -libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status - rm -f libtoolize.tmp libtoolize - $(timestamp); \ - $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \ - -e 's,@aclocal_DATA\@,$(aclocalfiles),g' \ - -e "s,@pkgltdl_files\@,$(ltdldatafiles),g" \ - -e "s,@pkgconfig_files\@,$(auxfiles),g" \ - $(srcdir)/libtoolize.in > libtoolize.tmp - chmod a+x libtoolize.tmp - chmod a-w libtoolize.tmp - mv -f libtoolize.tmp libtoolize - -# Use `$(srcdir)' for the benefit of non-GNU makes: this is -# how libtoolize.in appears in our dependencies. -EXTRA_DIST += libtoolize.m4sh -$(srcdir)/libtoolize.in: $(sh_files) libtoolize.m4sh Makefile.am - cd $(srcdir); \ - rm -f libtoolize.in; \ - $(M4SH) -B $(auxdir) libtoolize.m4sh > libtoolize.in - -# We used to do this with a 'stamp-vcl' file, but non-gmake builds -# would rerun configure on every invocation, so now we manually -# check the version numbers from the build rule when necessary. -libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog - @target=libtool; $(rebuild); \ - if test -f "$$target"; then \ - set dummy `./$$target --version | sed 1q`; actualver="$$5"; \ - test "$$actualver" = "$$correctver" && rebuild=false; \ - fi; \ - for prereq in $?; do \ - case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \ - done; \ - if $$rebuild; then \ - echo $(SHELL) ./config.status $$target; \ - cd $(top_builddir) && $(SHELL) ./config.status $$target; \ - fi - -.PHONY: configure-subdirs -configure-subdirs distdir: $(DIST_MAKEFILE_LIST) -...@dist_makefile_list@: - dir=`echo $@ | sed 's,^[^/]*$$,.,;s,/[^/]*$$,,'`; \ - test -d $$dir || mkdir $$dir || exit 1; \ - abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; \ - (cd $$dir && $$abs_srcdir/$$dir/configure --with-dist) || exit 1 - - # ---------- # # Bootstrap. # # ---------- # +sh_files = $(auxdir)/general.m4sh $(auxdir)/getopt.m4sh +EXTRA_DIST += bootstrap $(srcdir)/libtoolize.in $(auxdir)/ltmain.m4sh \ + $(auxdir)/mkstamp $(sh_files) \ + ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 \ + ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 \ + ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \ + ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 \ + ChangeLog.2008 ChangeLog.2009 +CLEANFILES += libtool libtoolize libtoolize.tmp \ + $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp + edit = sed \ -e 's,@EGREP\@,$(EGREP),g' \ -e 's,@FGREP\@,$(FGREP),g' \ @@ -138,17 +96,6 @@ edit = sed \ -e 's,@host_triplet\@,$(host_triplet),g' \ -e 's,@prefix\@,$(prefix),g' -sh_files = $(auxdir)/general.m4sh $(auxdir)/getopt.m4sh -EXTRA_DIST += bootstrap $(srcdir)/libtoolize.in $(auxdir)/ltmain.m4sh \ - $(auxdir)/mkstamp $(sh_files) \ - ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 \ - ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 \ - ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \ - ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 \ - ChangeLog.2008 ChangeLog.2009 -CLEANFILES += libtool libtoolize libtoolize.tmp \ - $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp - ## We build ltversion.m4 here, instead of from config.status, ## because config.status is rerun each time one of configure's ## dependencies change and ltversion.m4 happens to be a configure @@ -224,6 +171,14 @@ $(srcdir)/$(auxdir)/ltmain.sh: $(sh_files) $(auxdir)/ltmain.m4sh configure.ac Ch mv -f $(auxdir)/ltmain.tmp $(auxdir)/ltmain.sh; \ fi +# Use `$(srcdir)' for the benefit of non-GNU makes: this is +# how libtoolize.in appears in our dependencies. +EXTRA_DIST += libtoolize.m4sh +$(srcdir)/libtoolize.in: $(sh_files) libtoolize.m4sh Makefile.am + cd $(srcdir); \ + rm -f libtoolize.in; \ + $(M4SH) -B $(auxdir) libtoolize.m4sh > libtoolize.in + $(srcdir)/libltdl/Makefile.am: $(srcdir)/libltdl/Makefile.inc cd $(srcdir); \ in=libltdl/Makefile.inc; out=libltdl/Makefile.am; \ @@ -260,6 +215,58 @@ LTDL_BOOTSTRAP_DEPS = $(srcdir)/libltdl/aclocal.m4 \ all-local: $(LTDL_BOOTSTRAP_DEPS) + +## ---------------- ## +## Libtool scripts. ## +## ---------------- ## + +# The libtool distributor and the standalone libtool script. +bin_SCRIPTS = libtoolize libtool + +libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status + rm -f libtoolize.tmp libtoolize + $(timestamp); \ + $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \ + -e 's,@aclocal_DATA\@,$(aclocalfiles),g' \ + -e "s,@pkgltdl_files\@,$(ltdldatafiles),g" \ + -e "s,@pkgconfig_files\@,$(auxfiles),g" \ + $(srcdir)/libtoolize.in > libtoolize.tmp + chmod a+x libtoolize.tmp + chmod a-w libtoolize.tmp + mv -f libtoolize.tmp libtoolize + +# We used to do this with a 'stamp-vcl' file, but non-gmake builds +# would rerun configure on every invocation, so now we manually +# check the version numbers from the build rule when necessary. +libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog + @target=libtool; $(rebuild); \ + if test -f "$$target"; then \ + set dummy `./$$target --version | sed 1q`; actualver="$$5"; \ + test "$$actualver" = "$$correctver" && rebuild=false; \ + fi; \ + for prereq in $?; do \ + case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \ + done; \ + if $$rebuild; then \ + echo $(SHELL) ./config.status $$target; \ + cd $(top_builddir) && $(SHELL) ./config.status $$target; \ + fi + +.PHONY: configure-subdirs +configure-subdirs distdir: $(DIST_MAKEFILE_LIST) +...@dist_makefile_list@: + dir=`echo $@ | sed 's,^[^/]*$$,.,;s,/[^/]*$$,,'`; \ + test -d $$dir || mkdir $$dir || exit 1; \ + abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; \ + (cd $$dir && $$abs_srcdir/$$dir/configure --with-dist) || exit 1 + + +## -------- ## +## Libltdl. ## +## -------- ## + +include libltdl/Makefile.inc + EXTRA_DIST += $(srcdir)/libltdl/stamp-mk $(m4dir)/lt~obsolete.m4 $(srcdir)/libltdl/Makefile.in: $(srcdir)/libltdl/Makefile.am \ @@ -297,13 +304,6 @@ $(srcdir)/libltdl/config-h.in: $(sub_configure_deps) touch $@ -## -------- ## -## Libltdl. ## -## -------- ## - -include libltdl/Makefile.inc - - ## -------------- ## ## Documentation. ## ## -------------- ## -- 1.7.3