From: Gary V. Vaughan Date: Thu, 23 Sep 2010 11:06:09 +0000 (+0700) Subject: build: factor Makefile.am `m4sh' invocations to LT_M4SH. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=626dfe3d98569b271d8d139c6a200d1f7f3d0aff;p=thirdparty%2Flibtool.git 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. Signed-off-by: Gary V. Vaughan --- diff --git a/ChangeLog b/ChangeLog index 0efcadfc0..a9464094a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-08-31 Gary V. Vaughan + 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 (doc/notes.txt, libltdl/m4/ltversion.m4, (libltdl/config/ltmain.m4sh, libtoolize.in, libltdl/Makefile.am) diff --git a/Makefile.am b/Makefile.am index fa27af0da..ab6344649 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 $(srcdir)/libtoolize.tmp - $(M4SH) -B $(srcdir)/$(auxdir) $(srcdir)/libtoolize.m4sh > $(srcdir)/libtoolize.tmp + $(LT_M4SH) $(srcdir)/libtoolize.m4sh > $(srcdir)/libtoolize.tmp $(bootstrap_edit) libtoolize.tmp > libtoolize.in rm -f libtoolize.tmp @@ -901,7 +903,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: