From 2a43c87092aff0e133282b089b7cda0c4de17728 Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Sun, 7 Oct 2012 22:32:18 +0700 Subject: libtoolize: source extract-trace rather than fork and execute each call. Rather than forking and executing a full $SHELL for each macro extraction, source the script and its dependencies into our execution space and use the provided func_extract_trace API. * libtoolize.m4sh: Source extract-trace from an appropriate directory determined presently by make. (func_extract_trace): Remove this wrapper. * Makefile.am (abs_aux_dir): Absolute path to extract-trace directory. (configure_edit): Inject abs_aux_dir into uninstalled libtoolize. (bin_SCRIPTS): Remove libtoolize. (uninstall-hook): Manually uninstall libtoolize. (install-data-local): Inject pkgauxdir into installed libtoolize during installation. Signed-off-by: Gary V. Vaughan --- Makefile.am | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 3bcfb866..d778f9d6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -266,6 +266,7 @@ all-local: $(LTDL_BOOTSTRAP_DEPS) ## ---------------- ## ltdl_ac_aux_dir = `$(extract_trace) AC_CONFIG_AUX_DIR $(srcdir)/libltdl/configure.ac` +abs_aux_dir = `$(lt__cd) $(srcdir)/$(aux_dir) && pwd` configure_edit = $(SED) \ -e 's|@aclocaldir\@|$(aclocaldir)|g' \ @@ -287,10 +288,11 @@ configure_edit = $(SED) \ -e 's|@pkgmacro_files\@|$(pkgmacro_files)|g' \ -e 's|@prefix\@|$(prefix)|g' \ -e 's|@SED\@|$(SED)|g' \ + -e "/^\\. /s|@auxscriptsdir\@|$(abs_aux_dir)|g" \ -e 's|@srcdir\@|$(srcdir)|g' # The libtool distributor and the standalone libtool script. -bin_SCRIPTS = libtoolize libtool +bin_SCRIPTS = libtool libtoolize: $(libtoolize_in) $(config_status) $(AM_V_at)rm -f '$@' @@ -501,7 +503,7 @@ install-data-local: $(lt_Makefile_in) $(INSTALL_DATA) "$(srcdir)/$(macro_dir)/$$p" "$(DESTDIR)$(aclocaldir)/$$p"; \ done ## install the helper scripts - @list='extract-trace options-parser $(pkgaux_scripts)' && \ + @list='extract-trace funclib.sh options-parser $(pkgaux_scripts)' && \ for p in $$list; do \ d=`echo "$(DESTDIR)$(pkgauxdir)/$$p" |$(SED) 's|[^/]*$$||'`; \ test -d "$$d" || $(mkinstalldirs) "$$d"; \ @@ -521,7 +523,10 @@ install-data-local: $(lt_Makefile_in) echo " $(INSTALL_DATA) '$(ltdldir)/$$p' '$(DESTDIR)$(pkgdatadir)/$$p'"; \ $(INSTALL_DATA) "$(ltdldir)/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \ done - -chmod a+x '$(DESTDIR)$(pkgdatadir)/configure' +## Update direcory locations for installed libtoolize script + $(SED) -e "/^\\. /s|$(abs_aux_dir)|$(pkgauxdir)|g" libtoolize \ + > '$(DESTDIR)$(bindir)/libtoolize'; + -chmod a+x '$(DESTDIR)$(pkgdatadir)/configure' '$(DESTDIR)$(bindir)/libtoolize' ## ------------- ## @@ -602,6 +607,8 @@ uninstall-hook: echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \ rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \ done + @echo " rm -f '$(DESTDIR)$(bindir)/libtoolize'"; \ + rm -f '$(DESTDIR)$(bindir)/libtoolize' ## ----------- ## -- cgit v1.2.1