Another patch factored from the original 3/4. This is the first readability improvement to the rules that got lengthier in the last patch... now that the groundwork is done.
I did run a build and minimal testing (as I described earlier in this series) from a clean tree without problems at this stage. Okay to push? * Makefile.am (LT_M4SH): Now that all directories are listed as fully qualified paths, the search path argument to M4SH is always the same, so factor it out into a variable. Adjust all callers. Signed-off-by: Gary V. Vaughan <g...@gnu.org> --- ChangeLog | 5 +++++ Makefile.am | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20599a6..f812d1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-08-31 Gary V. Vaughan <g...@gnu.org> + build: factor Makefile.am `m4sh' invocations to LT_M4SH. + * Makefile.am (LT_M4SH): Now that all directories are listed as + fully qualified paths, the search path argument to M4SH is always + the same, so factor it out into a variable. Adjust all callers. + build: avoid unnecessary directory changes in Makefile rules. * Makefile.am (libltdl/m4/ltversion.m4, libltdl/config/ltmain.m4sh) (libtoolize.in, libltdl/Makefile.am, libltdl/config/mkstamp) diff --git a/Makefile.am b/Makefile.am index 64db1b9..0f5cd52 100644 --- a/Makefile.am +++ b/Makefile.am @@ -46,6 +46,8 @@ EXTRA_LTLIBRARIES = auxdir = libltdl/config m4dir = libltdl/m4 +LT_M4SH = $(M4SH) -B $(srcdir)/$(auxdir) + # Using `cd' in backquotes may print the directory name, use this instead: lt__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd @@ -147,9 +149,9 @@ $(srcdir)/$(auxdir)/ltmain.sh: $(sh_files) $(auxdir)/ltmain.m4sh configure.ac Ch if $$rebuild; then \ rm -f $(srcdir)/$(auxdir)/ltmain.in $(srcdir)/$(auxdir)/ltmain.tmp \ $(srcdir)/$(auxdir)/ltmain.sh; \ - echo $(M4SH) -B $(srcdir)/$(auxdir) $(srcdir)/$(auxdir)/ltmain.m4sh \ + echo $(LT_M4SH) $(srcdir)/$(auxdir)/ltmain.m4sh \ \> $(srcdir)/$(auxdir)/ltmain.in; \ - $(M4SH) -B $(srcdir)/$(auxdir) $(srcdir)/$(auxdir)/ltmain.m4sh \ + $(LT_M4SH) $(srcdir)/$(auxdir)/ltmain.m4sh \ > $(srcdir)/$(auxdir)/ltmain.in; \ echo $(bootstrap_edit) \ $(srcdir)/$(auxdir)/ltmain.in "> $$target"; \ @@ -165,7 +167,7 @@ $(srcdir)/$(auxdir)/ltmain.sh: $(sh_files) $(auxdir)/ltmain.m4sh configure.ac Ch EXTRA_DIST += libtoolize.m4sh $(srcdir)/libtoolize.in: $(sh_files) libtoolize.m4sh Makefile.am rm -f $(srcdir)/libtoolize.in - $(M4SH) -B $(srcdir)/$(auxdir) $(srcdir)/libtoolize.m4sh > $(srcdir)/libtoolize.in + $(LT_M4SH) $(srcdir)/libtoolize.m4sh > $(srcdir)/libtoolize.in $(srcdir)/libltdl/Makefile.am: $(srcdir)/libltdl/Makefile.inc in=$(srcdir)/libltdl/Makefile.inc; out=$(srcdir)/libltdl/Makefile.am; \ @@ -900,7 +902,7 @@ tests/defs: $(srcdir)/tests/defs.in # how defs.in appears in our dependencies. $(srcdir)/tests/defs.in: $(auxdir)/general.m4sh tests/defs.m4sh Makefile.am rm -f $(srcdir)/tests/defs.in; \ - $(M4SH) -B $(srcdir)/$(auxdir) $(srcdir)/tests/defs.m4sh > $(srcdir)/tests/defs.in + $(LT_M4SH) $(srcdir)/tests/defs.m4sh > $(srcdir)/tests/defs.in # We need to remove any files that the above tests created. clean-local-legacy: -- 1.7.3