summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2012-10-07 18:01:24 +0700
committerGary V. Vaughan <gary@gnu.org>2012-10-12 20:18:28 +0700
commita73a99b88a93e2880a6ecbfbb76a248be10aa933 (patch)
tree77020752b705f9740fadd3c1ca1af717f19e9d86 /Makefile.am
parent2a43c87092aff0e133282b089b7cda0c4de17728 (diff)
downloadlibtool-a73a99b88a93e2880a6ecbfbb76a248be10aa933.tar.gz
maint: factor common shell code into build-aux/funclib.sh.
Moving potentially reusable code into a common file that can be sourced by clients, and adjusting for impedance mismatch or necessary renames during integration. * build-aux/funclib.sh: New file. * build-aux/options-parser (Shell normalisation) (User overrideable command paths, Global variables, func_append) (require_term_colors, func_echo, func_echo_infix_1, func_warn) (func_error, func_fatal_error, func_quote_for_eval, func_verbose): Move from here... * build-aux/funclib.sh (Shell normalisation, User overrideable command paths, Global variables, func_append) (require_term_colors, func_echo, func_echo_infix_1) (func_warn_and_continue, func_error, func_fatal_error) (func_quote_for_eval, func_verbose): ...to here. * build-aux/general.m4sh (func_arith, func_basename) (func_dirname, func_dirname_and_basename, func_echo_all) (func_grep, func_len, func_mkdir_p, func_mktempdir) (func_normal_abspath, func_relative_path, func_quote_for_expand) (func_stripname, func_show_eval, func_tr_sh): Move from here... * build-aux/funclib.sh(func_arith, func_basename) (func_dirname, func_dirname_and_basename, func_echo_all) (func_grep, func_len, func_mkdir_p, func_mktempdir) (func_normal_abspath, func_relative_path, func_quote_for_expand) (func_stripname, func_show_eval, func_tr_sh): ...to here. * bootstrap (usage message): Document `-no-warn' option. (func_append_u, func_warning): Move from here... * build-aux/funclib.sh (func_append_uniq, func_warning): ...to here. * bootstrap, build-aux/extract-trace: Source build-aux/funclib.sh before build-aux/options-parser. * build-aux/options-parser (usage, long_help_message): Set default values to match what is parsed by the unmodified parser. * build-aux/extract-trace (usage, long_help_message): Only set from func_main, so that clients sourcing this file can still use the correct defaults from build-aux/options-parser. * bootstrap (bootstrap_options_prep, bootstrap_parse_options): Move warning option parsing from here... * build-aux/option-parser (func_options_prep) (func_parse_options): ...to here, where all clients can benefit. * Makefile.am (funclib_sh): New macro; path to funclib.sh. (EXTRA_DIST): Add $(funclib_sh). Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index d778f9d6..7e200864 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -86,6 +86,7 @@ CLEANFILES += libtool libtoolize
configure_ac = $(srcdir)/configure.ac
config_status = $(top_builddir)/config.status
extract_trace = $(srcdir)/$(aux_dir)/extract-trace
+funclib_sh = $(srcdir)/$(aux_dir)/funclib.sh
libtoolize_in = $(srcdir)/libtoolize.in
ltmain_sh = $(srcdir)/$(aux_dir)/ltmain.sh
libtool_m4 = $(srcdir)/$(macro_dir)/libtool.m4
@@ -93,7 +94,7 @@ ltversion_in = $(srcdir)/$(macro_dir)/ltversion.in
ltversion_m4 = $(srcdir)/$(macro_dir)/ltversion.m4
options_parser = $(srcdir)/$(aux_dir)/options-parser
-EXTRA_DIST += $(extract_trace) $(libtoolize_in) $(libtoolize_m4sh) \
+EXTRA_DIST += $(extract_trace) $(funclib_sh) $(libtoolize_in) $(libtoolize_m4sh) \
$(ltmain_m4sh) $(ltmain_sh) $(ltversion_in) \
$(ltversion_m4) $(options_parser)
@@ -491,6 +492,8 @@ pkgltdl_files = COPYING.LIB \
ltdl.mk \
slist.c
+helper_scripts = extract-trace funclib.sh options-parser
+
install-data-local: $(lt_Makefile_in)
@$(NORMAL_INSTALL)
## Don't install over the top of an old pkgdatadir
@@ -503,7 +506,7 @@ install-data-local: $(lt_Makefile_in)
$(INSTALL_DATA) "$(srcdir)/$(macro_dir)/$$p" "$(DESTDIR)$(aclocaldir)/$$p"; \
done
## install the helper scripts
- @list='extract-trace funclib.sh options-parser $(pkgaux_scripts)' && \
+ @list='$(helper_scripts) $(pkgaux_scripts)' && \
for p in $$list; do \
d=`echo "$(DESTDIR)$(pkgauxdir)/$$p" |$(SED) 's|[^/]*$$||'`; \
test -d "$$d" || $(mkinstalldirs) "$$d"; \
@@ -597,7 +600,7 @@ uninstall-hook:
echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
done
- @list='extract-trace options-parser $(pkgaux_scripts) $(pkgaux_data_files)'; \
+ @list='$(helper_scripts) $(pkgaux_scripts) $(pkgaux_data_files)'; \
for f in $$list; do \
echo " rm -f '$(DESTDIR)$(pkgauxdir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgauxdir)/$$f"; \