From be85f384d5782caf480f22c52b36f3c74ddc8211 Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Thu, 23 Sep 2010 18:06:09 +0700 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ Makefile.am | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9280b63d9..c92c2bb0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +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. + 2010-08-31 Gary V. Vaughan build: avoid unnecessary directory changes in Makefile rules. diff --git a/Makefile.am b/Makefile.am index 66bce74d8..d93582804 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 @@ -904,7 +906,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: -- 2.47.2