From: Gary V. Vaughan Date: Thu, 18 Oct 2012 17:38:28 +0000 (+0700) Subject: libtool: don't set auxscriptsdir at bootstrap time. X-Git-Tag: v2.4.2.418~120 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b07f86e9ea4d4036b4315f3806befe46000c6419;p=thirdparty%2Flibtool.git libtool: don't set auxscriptsdir at bootstrap time. * build-aux/ltmain.in: Declare relative paths to aux scripts from source commands, for early inlining during bootstrap. * Makefile.am (bootstrap_edit): Move auxscriptsdir substitution from here.... (configure_edit): ...to here. ($(ltmain_sh)): Feed ltmain.in through inline-source as ltmain.sh is generated to remove relative paths to aux scripts. (install-data-local): Simplify. No need for special treatment for ltmain.sh during installation, since aux scripts have already been inlined. Reported by Peter Rosin. Signed-off-by: Gary V. Vaughan --- diff --git a/Makefile.am b/Makefile.am index 176325cc2..95b8463ba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -93,9 +93,7 @@ EXTRA_DIST += $(extract_trace) $(funclib_sh) $(inline_source) \ ## These are the replacements that need to be made at bootstrap time, ## because they must be static in distributed files, and not accidentally ## changed by configure running on the build machine. -abs_aux_dir = `$(lt__cd) '$(srcdir)/$(aux_dir)' && pwd` bootstrap_edit = $(SED) \ - -e '/^\. /s|@auxscriptsdir\@|'$(abs_aux_dir)'|g' \ -e 's|@MACRO_VERSION\@|$(VERSION)|g' \ -e "s|@MACRO_REVISION\@|$$revision|g" \ -e "s|@MACRO_SERIAL\@|$$serial|g" \ @@ -161,8 +159,8 @@ $(ltmain_sh): $(ltmain_in) $(dotversion) if $$rebuild; then \ rm -f '$@'; \ if test 0 = '$(V)'; then echo " GEN " $@; \ - else echo $(bootstrap_edit) "< '$(ltmain_in)' > '$@'"; fi; \ - $(bootstrap_edit) < '$(ltmain_in)' > '$@'; \ + else echo "$(inline_source) '$(ltmain_in)' |" $(bootstrap_edit) "> '$@'"; fi; \ + $(inline_source) '$(ltmain_in)' | $(bootstrap_edit) > '$@'; \ chmod a-w '$@'; \ fi @@ -248,9 +246,11 @@ all-local: $(LTDL_BOOTSTRAP_DEPS) ## Libtool scripts. ## ## ---------------- ## +abs_aux_dir = `$(lt__cd) '$(srcdir)/$(aux_dir)' && pwd` ltdl_ac_aux_dir = `$(extract_trace) AC_CONFIG_AUX_DIR $(srcdir)/libltdl/configure.ac` configure_edit = $(bootstrap_edit) \ + -e '/^\. /s|@auxscriptsdir\@|'$(abs_aux_dir)'|g' \ -e 's|@aclocaldir\@|$(aclocaldir)|g' \ -e 's|@aux_dir\@|$(aux_dir)|g' \ -e 's|@datadir\@|$(datadir)|g' \ @@ -494,16 +494,8 @@ install-data-local: $(lt_Makefile_in) @list='$(pkgaux_data_files)' && for p in $$list; do \ d=`echo "$(DESTDIR)$(pkgauxdir)/$$p" |$(SED) 's|[^/]*$$||'`; \ test -d "$$d" || $(mkinstalldirs) "$$d"; \ - case $$p in \ - ltmain.sh) \ - echo "$(inline_source) '$(srcdir)/$(aux_dir)/$$p' > '$(DESTDIR)$(pkgauxdir)/$$p'"; \ - $(inline_source) "$(srcdir)/$(aux_dir)/$$p" > "$(DESTDIR)$(pkgauxdir)/$$p"; \ - ;; \ - *) \ - echo " $(INSTALL_DATA) '$(srcdir)/$(aux_dir)/$$p' '$(DESTDIR)$(pkgauxdir)/$$p'"; \ - $(INSTALL_DATA) "$(srcdir)/$(aux_dir)/$$p" "$(DESTDIR)$(pkgauxdir)/$$p"; \ - ;; \ - esac; \ + echo " $(INSTALL_DATA) '$(srcdir)/$(aux_dir)/$$p' '$(DESTDIR)$(pkgauxdir)/$$p'"; \ + $(INSTALL_DATA) "$(srcdir)/$(aux_dir)/$$p" "$(DESTDIR)$(pkgauxdir)/$$p"; \ done ## install the libltdl files @list='$(pkgltdl_files)' && for p in $$list; do \ diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in index e48e45fda..b94115d48 100644 --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in @@ -59,12 +59,10 @@ package_revision=@package_revision@ ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external -# libraries, which are installed to $pkgauxdir under normal use, though -# we also need to be able to find them in $srcdir during testing, or if -# executed directly from the build tree. +# libraries, which are installed to $pkgauxdir. -. "@auxscriptsdir@/funclib.sh" -. "@auxscriptsdir@/options-parser" +. "build-aux/funclib.sh" +. "build-aux/options-parser" # Set a version string. scriptversion='(GNU @PACKAGE@) @VERSION@'