summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2012-10-07 22:32:18 +0700
committerGary V. Vaughan <gary@gnu.org>2012-10-12 18:36:38 +0700
commit2a43c87092aff0e133282b089b7cda0c4de17728 (patch)
tree4ed5bc09ef998f6f6884a4311bd4d677ca26c5d1 /Makefile.am
parent125eb722e4793a1e080975e01561082d67634fd3 (diff)
downloadlibtool-2a43c87092aff0e133282b089b7cda0c4de17728.tar.gz
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 <gary@gnu.org>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am13
1 files changed, 10 insertions, 3 deletions
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'
## ----------- ##