]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: don't set auxscriptsdir at bootstrap time.
authorGary V. Vaughan <gary@gnu.org>
Thu, 18 Oct 2012 17:38:28 +0000 (00:38 +0700)
committerGary V. Vaughan <gary@gnu.org>
Thu, 18 Oct 2012 17:38:28 +0000 (00:38 +0700)
* 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 <gary@gnu.org>
Makefile.am
build-aux/ltmain.in

index 176325cc2a2a330c1ad057a7efa75e48562c6a28..95b8463ba24b4468e5dba8b745cb48e949f26421 100644 (file)
@@ -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 \
index e48e45fdaa20adf2fcf0c19ae5e45fbcf91bed9a..b94115d4817b2d8bfeb89f34c505d2e396289bbf 100644 (file)
@@ -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@'