summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Automake/Options.pm21
-rw-r--r--lib/am/check.am13
-rw-r--r--lib/am/configure.am6
-rw-r--r--lib/am/data.am3
-rw-r--r--lib/am/dejagnu.am29
-rw-r--r--lib/am/distdir.am27
-rw-r--r--lib/am/libs.am6
-rw-r--r--lib/am/lisp.am90
-rw-r--r--lib/am/ltlib.am9
-rw-r--r--lib/am/progs.am16
-rw-r--r--lib/am/python.am3
-rw-r--r--lib/am/scripts.am3
-rw-r--r--lib/am/subdirs.am17
-rw-r--r--lib/am/tags.am103
-rw-r--r--lib/am/texibuild.am32
-rw-r--r--lib/am/texinfos.am32
-rwxr-xr-xlib/elisp-comp93
-rwxr-xr-xlib/missing403
-rwxr-xr-xlib/test-driver2
19 files changed, 312 insertions, 596 deletions
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 2f977bd54..186d4ca8c 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -269,7 +269,6 @@ sub _is_valid_easy_option ($)
return scalar grep { $opt eq $_ } qw(
check-news
color-tests
- cygnus
dejagnu
dist-bzip2
dist-lzip
@@ -287,6 +286,9 @@ sub _is_valid_easy_option ($)
no-texinfo.tex
nostdinc
readme-alpha
+ serial-tests
+ parallel-tests
+ silent-rules
std-options
subdir-objects
);
@@ -319,29 +321,20 @@ sub _process_option_list (\%@)
error ($where,
"automatic de-ANSI-fication support has been removed");
}
+ elsif ($_ eq 'cygnus')
+ {
+ error $where, "support for Cygnus-style trees has been removed";
+ }
elsif ($_ eq 'dist-lzma')
{
error ($where, "support for lzma-compressed distribution " .
"archives has been removed");
}
- elsif ($_ eq 'parallel-tests')
- {
- # Just recognize it explicitly.
- }
- elsif ($_ eq 'serial-tests')
- {
- # This is a little of an hack, but good enough for the moment.
- delete $options->{'parallel-tests'};
- }
elsif (/^filename-length-max=(\d+)$/)
{
delete $options->{$_};
$options->{'filename-length-max'} = [$_, $1];
}
- elsif ($_ eq 'silent-rules')
- {
- _option_must_be_from_configure ($_, $where);
- }
elsif ($_ eq 'tar-v7' || $_ eq 'tar-ustar' || $_ eq 'tar-pax')
{
_option_must_be_from_configure ($_, $where);
diff --git a/lib/am/check.am b/lib/am/check.am
index f319e36f8..f085f8e9e 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -17,7 +17,7 @@
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
am__color_tests=no
-if %?COLOR%
+
am__tty_colors = { \
$(am__tty_colors_dummy); \
if test "X$(AM_COLOR_TESTS)" = Xno; then \
@@ -40,13 +40,10 @@ am__tty_colors = { \
std=''; \
fi; \
}
-else !%?COLOR%
-am__tty_colors = $(am__tty_colors_dummy)
-endif !%?COLOR%
.PHONY: check-TESTS
-if %?PARALLEL_TESTS%
+if !%?SERIAL_TESTS%
include inst-vars.am
@@ -463,7 +460,9 @@ AM_RECURSIVE_TARGETS += check recheck
.PHONY: recheck
-else !%?PARALLEL_TESTS%
+else %?SERIAL_TESTS%
+
+## Obsolescent serial testsuite driver.
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
@@ -569,4 +568,4 @@ check-TESTS: $(TESTS)
test "$$failed" -eq 0; \
else :; fi
-endif !%?PARALLEL_TESTS%
+endif %?SERIAL_TESTS%
diff --git a/lib/am/configure.am b/lib/am/configure.am
index 20534c7be..95332fae9 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -113,13 +113,13 @@ $(top_srcdir)/configure: %MAINTAINER-MODE% $(am__configure_deps)
## aclocal.m4. ##
## ------------ ##
-## aclocal.m4 must be built by the top-level Makefile, because this is
-## where the user is expected to define $(ACLOCAL_AMFLAGS).
-##
## Whenever a configure dependency changes we need to rebuild
## aclocal.m4 too. Changing configure.ac, or any file included by
## aclocal.m4 might require adding more files to aclocal.m4. Hence
## the $(am__configure_deps) dependency.
+## We still need $(ACLOCAL_AMFLAGS) for sake of backward-compatibility;
+## we should hopefully be able to get rid of it in a not-so-distant
+## future.
if %?REGEN-ACLOCAL-M4%
$(ACLOCAL_M4): %MAINTAINER-MODE% $(am__aclocal_m4_deps)
?TOPDIR_P? $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
diff --git a/lib/am/data.am b/lib/am/data.am
index b8b658800..b91f55ca1 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -24,7 +24,8 @@ endif %?INSTALL%
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%%PRIMARY%
+?EXEC?.PHONY install-exec-am: install-%DIR%%PRIMARY%
+?!EXEC?.PHONY install-data-am: install-%DIR%%PRIMARY%
install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
@$(NORMAL_INSTALL)
if %?BASE%
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am
index f1ee47199..50c1f511b 100644
--- a/lib/am/dejagnu.am
+++ b/lib/am/dejagnu.am
@@ -20,24 +20,8 @@ DEJATOOL = $(PACKAGE)
## Default flags to pass to dejagnu. The user can override this.
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
-## In Cygnus mode, these are found in the build tree.
-## Otherwise they are looked for in $PATH.
-if %?CYGNUS%
-EXPECT = `if test -f $(top_builddir)/../expect/expect; then \
- echo $(top_builddir)/../expect/expect; \
- else \
- echo expect; \
- fi`
-
-RUNTEST = `if test -f $(top_srcdir)/../dejagnu/runtest; then \
- echo $(top_srcdir)/../dejagnu/runtest; \
- else \
- echo runtest; \
- fi`
-else ! %?CYGNUS%
EXPECT = expect
RUNTEST = runtest
-endif ! %?CYGNUS%
.PHONY: check-DEJAGNU
@@ -45,21 +29,14 @@ check-DEJAGNU: site.exp
## Life is easiest with an absolute srcdir, so do that.
srcdir='$(srcdir)'; export srcdir; \
EXPECT=$(EXPECT); export EXPECT; \
-## Allow this to work when expect and DejaGnu are in tree.
-## Only required when --cygnus in force.
-?CYGNUS? if [ -f $(top_builddir)/../expect/expect ]; then \
-?CYGNUS? TCL_LIBRARY=`$(am__cd) $(top_srcdir)/../tcl/library && pwd`; \
-?CYGNUS? export TCL_LIBRARY; \
-?CYGNUS? fi; \
- runtest=$(RUNTEST); \
## If runtest can't be found, print a warning but don't die. It is
## pointless to cause a failure if the tests cannot be run at all.
- if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+ if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
- if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+ if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
then :; else exit_status=1; fi; \
done; \
- else echo "WARNING: could not find 'runtest'" 1>&2; :;\
+ else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
fi; \
exit $$exit_status
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 07f05023c..1f2eef0d2 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -14,7 +14,6 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-## DIST_COMMON comes first so that README can be the very first file.
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
if %?TOPDIR_P%
@@ -91,32 +90,6 @@ if %?CK-NEWS%
endif %?CK-NEWS%
endif %?TOPDIR_P%
##
-## 'missing help2man' may have created some bogus man pages. Ensure they
-## are not distributed.
-##
-if %?INSTALL-MAN%
-if %?HAVE-MANS%
- @list='$(MANS)'; if test -n "$$list"; then \
- list=`for p in $$list; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-## Note that we check existing man pages here only. If there are man pages
-## which are not distributed, and may be generated only conditionally, then
-## we should not error out because of them. This could be refined to take
-## into account only dist_*_MANS, but then we'd be missing out on those
-## the user distributes with EXTRA_DIST.
- if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
- if test -n "$$list" && \
- grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
- echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
- grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
- echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
- echo " typically 'make maintainer-clean' will remove them" >&2; \
- exit 1; \
- else :; fi; \
- else :; fi
-endif %?HAVE-MANS%
-endif %?INSTALL-MAN%
-##
## Only for the top dir.
##
if %?TOPDIR_P%
diff --git a/lib/am/libs.am b/lib/am/libs.am
index d1f63ae84..f94a7124e 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -24,7 +24,8 @@ endif %?INSTALL%
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%LIBRARIES
+?EXEC?.PHONY install-exec-am: install-%DIR%LIBRARIES
+?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
@$(NORMAL_INSTALL)
if %?BASE%
@@ -69,7 +70,8 @@ endif !%?BASE%
@list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
for p in $$list; do \
if test -f $$p; then \
- %BASE?$(am__strip_dir):f=$$p;% \
+?BASE? $(am__strip_dir) \
+?!BASE? f=$$p; \
## Must ranlib after installing because mod time changes.
## cd to target directory because AIX ranlib messes up with whitespace
## in the argument.
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 050d7dc47..fc3575b85 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -22,60 +22,28 @@ endif %?INSTALL%
## Building. ##
## ---------- ##
-elc-stamp: $(LISP)
- @echo 'WARNING: Warnings can be ignored. :-)'
- @rm -f elc-temp && touch elc-temp
- if test "$(EMACS)" != no; then \
-## Make sure "$@" isn't empty initially.
- set x; \
-## Populate "$@" with elisp files (found in the current directory
-## or in $srcdir).
- list='$(LISP)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- set x "$$@" "$$d$$p"; shift; \
- done; \
-## Finally call elisp-comp for all files.
- shift; \
- abs_srcdir="$(abs_srcdir)" EMACS="$(EMACS)" $(SHELL) \
- $(elisp_comp) "$$@" || exit 1; \
- else : ; fi
- @mv -f elc-temp $@
-
-## Do not use $(ELCFILES) as target, because it may have been emptied
-## by the user (to disable byte-compilation), and POSIX does not allow
-## an empty target.
-$(am__ELCFILES): elc-stamp
-## Recover from the removal of $@.
-##
-## Do not call "make elc-stamp" if emacs is not available, because it would
-## be useless.
-##
-## If "make -n" is called, do not execute any command in the recipe that
-## changes the tree; however, invoke the recursive make for debuggability.
- @if $(am__make_dryrun); then dry=:; else dry=; fi; \
- if test "$(EMACS)" != no && test ! -f $@; then \
-## If "make -j" is used and more than one file has been erased, several
-## processes can execute this block. We have to make sure that only
-## the first one will run "$(MAKE) $(AM_MAKEFLAGS) elc-stamp", and the
-## other ones will wait.
-##
-## There is a race here if only one child of make receive a signal.
-## In that case the build may fail. We remove elc-stamp when we receive
-## a signal so we are sure the build will succeed the next time.
- $$dry trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
- if $$dry mkdir elc-lock 2>/dev/null; then \
-## This code is being executed by the first process.
- $$dry rm -f elc-stamp; \
- $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
- $$dry rmdir elc-lock; \
- else \
-## This code is being executed by the follower processes.
-## Wait until the first process is done.
- while test -d elc-lock && test -z "$$dry"; do sleep 1; done; \
-## Succeed if and only if the first process succeeded.
- $$dry test -f elc-stamp; exit $$?; \
- fi; \
- else : ; fi
+.el.elc:
+## We add $(builddir) and $(srcdir) to load-path, so that any '.el' files
+## that $< depends upon can be found (including generated ones).
+## We prefer files from the build directory to those from the source
+## directory, in true VPATH spirit.
+## The destination file is normally determined by appending "c" to the
+## input (which would erronously put it in $(srcdir) in VPATH builds),
+## so we override that, too.
+ if test "$(EMACS)" != "no"; then \
+ am__subdir_includes=''; \
+ case $@ in */*) \
+ am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
+ am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
+ esac; \
+## Emacs byte-compilation won't create this automatically, sadly.
+ test -d $$am__dir || $(MKDIR_P) $$am__dir || exit 1; \
+ $(EMACS) --batch \
+ $(AM_ELCFLAGS) $(ELCFLAGS) \
+ $$am__subdir_includes -L $(builddir) -L $(srcdir) \
+ --eval "(defun byte-compile-dest-file (f) \"$@\")" \
+ --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \
+ else :; fi
## ------------ ##
@@ -84,8 +52,13 @@ $(am__ELCFILES): elc-stamp
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-%DIR%LISP_INSTALL = %BASE?$(INSTALL_DATA):$(install_sh_DATA)%
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%LISP
+
+?BASE?%DIR%LISP_INSTALL = $(INSTALL_DATA)
+?!BASE?%DIR%LISP_INSTALL = $(install_sh_DATA)
+
+?EXEC?.PHONY install-exec-am: install-%DIR%LISP
+?!EXEC?.PHONY install-data-am: install-%DIR%LISP
+
install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
@$(NORMAL_INSTALL)
## Do not install anything if EMACS was not found.
@@ -101,7 +74,8 @@ install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
for p in $$list; do \
## A lisp file can be in the source directory or the build directory.
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- %BASE?$(am__strip_dir):$(am__vpath_adj)% \
+?BASE? $(am__strip_dir) \
+?!BASE? $(am__vpath_adj) \
echo " $(%DIR%LISP_INSTALL) '$$d$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
$(%DIR%LISP_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || exit $$?; \
## Only install .elc file if it exists.
@@ -138,7 +112,7 @@ endif %?INSTALL%
.PHONY clean-am: clean-lisp
clean-lisp:
- -rm -f elc-stamp $(ELCFILES)
+ -rm -f $(ELCFILES)
## -------------- ##
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index 1ca26b58f..af3a25659 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -23,8 +23,12 @@ endif %?INSTALL%
## ------------ ##
if %?INSTALL%
+
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%LTLIBRARIES
+
+?EXEC?.PHONY install-exec-am: install-%DIR%LTLIBRARIES
+?!EXEC?.PHONY install-data-am: install-%DIR%LTLIBRARIES
+
install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
@$(NORMAL_INSTALL)
if %?BASE%
@@ -89,7 +93,8 @@ uninstall-%DIR%LTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
for p in $$list; do \
- %BASE?$(am__strip_dir):f=$$p;% \
+?BASE? $(am__strip_dir) \
+?!BASE? f=$$p; \
?LIBTOOL? echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
?LIBTOOL? $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
?!LIBTOOL? echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
diff --git a/lib/am/progs.am b/lib/am/progs.am
index 2be8bcab4..104270c8b 100644
--- a/lib/am/progs.am
+++ b/lib/am/progs.am
@@ -20,7 +20,8 @@
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%PROGRAMS
+?EXEC?.PHONY install-exec-am: install-%DIR%PROGRAMS
+?!EXEC?.PHONY install-data-am: install-%DIR%PROGRAMS
install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
@$(NORMAL_INSTALL)
## Funny invocation because Makefile variable can be empty, leading to
@@ -34,13 +35,16 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
## On Cygwin with libtool test won't see 'foo.exe' but instead 'foo'.
## So we check for both.
sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p%LIBTOOL? || test -f $$p1%; \
- then echo "$$p"; echo "$$p"; else :; fi; \
+ while read p p1; do if test -f $$p \
+?LIBTOOL? || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
## We now have a list of sourcefile pairs, separated by newline.
## Turn that into "sourcefile source_base target_dir xformed_target_base",
## with newlines being turned into spaces in a second step.
- sed -e 'p;s,.*/,,;n;h' -e '%BASE?s|.*|.|:s|[^/]*$$||; s|^$$|.|%' \
+ sed -e 'p;s,.*/,,;n;h' \
+?BASE? -e 's|.*|.|' \
+?!BASE? -e 's|[^/]*$$||; s|^$$|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
## The following awk script turns that into one line containing directories
@@ -86,7 +90,9 @@ uninstall-%DIR%PROGRAMS:
## but keep the directory part in the hold buffer, in order to
## reapply it again afterwards in the nobase case. Append $(EXEEXT).
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/'%BASE? : -e 'x;s,[^/]*$$,,;G;s,\n,,'%`; \
+ -e 's/$$/$(EXEEXT)/' \
+?!BASE? -e 'x;s,[^/]*$$,,;G;s,\n,,' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files
diff --git a/lib/am/python.am b/lib/am/python.am
index cab61294a..f9b7790c8 100644
--- a/lib/am/python.am
+++ b/lib/am/python.am
@@ -26,7 +26,8 @@ endif %?INSTALL%
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%PYTHON
+?EXEC?.PHONY install-exec-am: install-%DIR%PYTHON
+?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
install-%DIR%PYTHON: $(%DIR%_PYTHON)
@$(NORMAL_INSTALL)
if %?BASE%
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index 64e093e64..88c1c9217 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -25,7 +25,8 @@ endif %?INSTALL%
if %?INSTALL%
## if doesn't work properly for Automake variables yet.
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%SCRIPTS
+?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS
+?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
@$(NORMAL_INSTALL)
## Funny invocation because Makefile variable can be empty, leading to
diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am
index 3fc28884b..005483a9a 100644
--- a/lib/am/subdirs.am
+++ b/lib/am/subdirs.am
@@ -17,13 +17,17 @@
RECURSIVE_TARGETS += all-recursive check-recursive installcheck-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
+
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+
## All documented targets which invoke 'make' recursively, or depend
-## on targets that do so.
-AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=)
+## on targets that do so. GNUmakefile from gnulib depends on this.
+AM_RECURSIVE_TARGETS += $(am__recursive_targets:-recursive=)
-.PHONY: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
-.MAKE: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
+.PHONY .MAKE: $(am__recursive_targets)
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
@@ -32,7 +36,7 @@ AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
-$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
+$(am__recursive_targets):
## Using $failcom allows "-k" to keep its natural meaning when running a
## recursive rule.
@fail= failcom='exit 1'; \
@@ -66,7 +70,6 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-
mostlyclean: mostlyclean-recursive
clean: clean-recursive
distclean: distclean-recursive
diff --git a/lib/am/tags.am b/lib/am/tags.am
index fccacca49..730ccc511 100644
--- a/lib/am/tags.am
+++ b/lib/am/tags.am
@@ -14,20 +14,31 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+## Handle VPATH correctly.
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+
## ---- ##
## ID. ##
## ---- ##
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-## Make sure the list of sources is unique.
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
-## Handle VPATH correctly.
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
## ------ ##
@@ -35,14 +46,17 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
## ------ ##
ETAGS = etags
-.PHONY: tags
+.PHONY: TAGS tags
if %?SUBDIRS%
-AM_RECURSIVE_TARGETS += tags TAGS
-endif %?SUBDIRS%
-tags: TAGS
-
-TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+AM_RECURSIVE_TARGETS += TAGS
+RECURSIVE_TARGETS += tags-recursive
+tags: tags-recursive
+else !%?SUBDIRS%
+tags: tags-am
+endif !%?SUBDIRS%
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
## We use the positional parameters to build the subdir list with
## absolute names, without the need to worry about white space in `pwd`.
set x; \
@@ -67,14 +81,7 @@ TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
?SUBDIRS? set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
?SUBDIRS? fi; \
?SUBDIRS? done; \
-## Make sure the list of sources is unique.
- list='$(SOURCES) $(HEADERS) %CONFIG% $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
-## Handle VPATH correctly.
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
## Remove the 'x' we added first:
shift; \
## Make sure we have something to run etags on.
@@ -97,23 +104,16 @@ TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
CTAGS = ctags
.PHONY: CTAGS ctags
if %?SUBDIRS%
-AM_RECURSIVE_TARGETS += ctags CTAGS
-endif %?SUBDIRS%
-ctags: CTAGS
-
-## We have a dummy name here because 'tags' has already been in use
-## for a long time to mean Emacs-style tags. Oops. This means the
-## dependencies here are useless.
-CTAGS: %CTAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
-## Make sure the list of sources is unique.
- list='$(SOURCES) $(HEADERS) %CONFIG% $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
-## Handle VPATH correctly.
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+AM_RECURSIVE_TARGETS += CTAGS
+RECURSIVE_TARGETS += ctags-recursive
+ctags: ctags-recursive
+else !%?SUBDIRS%
+ctags: ctags-am
+endif !%?SUBDIRS%
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
## Make sure we have something to run ctags on.
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
@@ -136,25 +136,26 @@ GTAGS:
## ------- ##
if %?TOPDIR_P%
-
CSCOPE = cscope
.PHONY: cscope clean-cscope
AM_RECURSIVE_TARGETS += cscope
-
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
-
clean-cscope:
-rm -f cscope.files
-
-cscope.files: clean-cscope %CSCOPEDIRS% cscopelist
-
+cscope.files: clean-cscope cscopelist
endif %?TOPDIR_P%
-.PHONY: cscopelist
-cscopelist: %CSCOPEDIRS% $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
+if %?SUBDIRS%
+RECURSIVE_TARGETS += cscopelist-recursive
+cscopelist: cscopelist-recursive
+else !%?SUBDIRS%
+cscopelist: cscopelist-am
+endif !%?SUBDIRS%
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index f77748a3e..0fe09b1f9 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -65,14 +65,18 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
-## Do not use '-o' unless necessary: it is only supported since Texinfo 4.1.
## texi2dvi doesn't silence everything with -q, redirect to /dev/null instead.
## We still want -q (%TEXIQUIET%) because it turns on batch mode.
-## Use '--clean' to avoid leaving auxiliary files behind cluttering the build
-## directory (see automake bug#11146). We should start using '--tidy' when we
-## can assume Texinf 4.9 or later.
-?GENERIC? $(TEXI2DVI) %TEXIQUIET% --clean %SOURCE% %TEXIDEVNULL%
-?!GENERIC? $(TEXI2DVI) %TEXIQUIET% --clean -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
+## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
+## by-products are left in there, instead of cluttering the current
+## directory (see automake bug#11146). Use a different build-dir for
+## each file (and distinct from that of the corresponding PDF file) to
+## avoid hitting a Texinfop bug that could cause low-probability racy
+## failure when doing parallel builds; see:
+## http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html
+ $(TEXI2DVI) %TEXIQUIET% --build-dir=$(@:.dvi=.t2d) -o $@ %TEXIDEVNULL% \
+?GENERIC? %SOURCE%
+?!GENERIC? `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
?GENERIC?%SOURCE_SUFFIX%.pdf:
?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
@@ -80,14 +84,18 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
-## Do not use '-o' unless necessary: it is only supported since Texinfo 4.1.
## texi2pdf doesn't silence everything with -q, redirect to /dev/null instead.
## We still want -q (%TEXIQUIET%) because it turns on batch mode.
-## Use '--clean' to avoid leaving auxiliary files behind cluttering the build
-## directory (see automake bug#11146). We should start using '--tidy' when we
-## can assume Texinf 4.9 or later.
-?GENERIC? $(TEXI2PDF) %TEXIQUIET% --clean %SOURCE% %TEXIDEVNULL%
-?!GENERIC? $(TEXI2PDF) %TEXIQUIET% --clean -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
+## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
+## by-products are left in there, instead of cluttering the current
+## directory (see automake bug#11146). Use a different build-dir for
+## each file (and distinct from that of the corresponding DVI file) to
+## avoid hitting a Texinfop bug that could cause low-probability racy
+## failure when doing parallel builds; see:
+## http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html
+ $(TEXI2PDF) %TEXIQUIET% --build-dir=$(@:.pdf=.t2p) -o $@ %TEXIDEVNULL% \
+?GENERIC? %SOURCE%
+?!GENERIC? `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
?GENERIC?%SOURCE_SUFFIX%.html:
?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index 42787c778..6d45c950a 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -20,26 +20,7 @@
## ----------- ##
if %?LOCAL-TEXIS%
-if ! %?CYGNUS%
TEXI2DVI = texi2dvi
-
-else %?CYGNUS%
-
-## Find these programs wherever they may lie. Yes, this has
-## intimate knowledge of the structure of the texinfo distribution.
-MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then \
- echo $(top_builddir)/../texinfo/makeinfo/makeinfo; \
- else \
- echo makeinfo; \
- fi`
-
-TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
- echo $(top_srcdir)/../texinfo/util/texi2dvi; \
- else \
- echo texi2dvi; \
- fi`
-endif %?CYGNUS%
-
TEXI2PDF = $(TEXI2DVI) --pdf --batch
MAKEINFOHTML = $(MAKEINFO) --html
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
@@ -405,13 +386,14 @@ if %?LOCAL-TEXIS%
.PHONY: mostlyclean-aminfo
mostlyclean-aminfo:
## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
-## contain any directory created by "makeinfo --html".
+## contain any directory created by "makeinfo --html", as well as the
+## '*.t2d' and '*.t2p' directories used by texi2dvi and texi2pdf.
-rm -rf %MOSTLYCLEAN%
.PHONY clean-am: clean-aminfo
clean-aminfo:
-## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
-## contain any directory created by "makeinfo --html".
+## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
+## above for details.
?TEXICLEAN? -test -z "%TEXICLEAN%" \
?TEXICLEAN? || rm -rf %TEXICLEAN%
@@ -423,11 +405,9 @@ maintainer-clean-aminfo:
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
-## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
-## contain any directory created by "makeinfo --html".
+## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
+## above for details.
?MAINTCLEAN? -test -z "%MAINTCLEAN%" \
?MAINTCLEAN? || rm -rf %MAINTCLEAN%
-?CYGNUS?.PHONY: clean-info
-?CYGNUS?clean-info: mostlyclean-aminfo clean-aminfo
endif %?LOCAL-TEXIS%
diff --git a/lib/elisp-comp b/lib/elisp-comp
deleted file mode 100755
index 5e888bd94..000000000
--- a/lib/elisp-comp
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/sh
-# Copyright (C) 1995-2012 Free Software Foundation, Inc.
-
-scriptversion=2012-07-05.17; # UTC
-
-# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1995.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
- '')
- echo "$0: No files. Try '$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: elisp-comp [--help] [--version] FILES...
-
-This script byte-compiles all '.el' files listed as FILES using GNU
-Emacs, and put the resulting '.elc' files into the current directory,
-so disregarding the original directories used in '.el' arguments.
-
-This script manages in such a way that all Emacs LISP files to
-be compiled are made visible between themselves, in the event
-they require or load-library one another.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "elisp-comp $scriptversion"
- exit $?
- ;;
-esac
-
-if test -z "$EMACS" || test "$EMACS" = "t"; then
- # Value of "t" means we are running in a shell under Emacs.
- # Just assume Emacs is called "emacs".
- EMACS=emacs
-fi
-
-tempdir=elc.$$
-
-# Cleanup the temporary directory on exit.
-trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0
-do_exit='(exit $ret); exit $ret'
-trap "ret=129; $do_exit" 1
-trap "ret=130; $do_exit" 2
-trap "ret=141; $do_exit" 13
-trap "ret=143; $do_exit" 15
-
-mkdir $tempdir
-cp "$@" $tempdir
-
-(
- cd $tempdir
- echo "(setq load-path (cons nil (cons \"$abs_srcdir\" load-path)))" > script
- $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $?
- mv *.elc ..
-) || exit $?
-
-(exit 0); exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/lib/missing b/lib/missing
index 9a5564823..ed429b4dd 100755
--- a/lib/missing
+++ b/lib/missing
@@ -1,10 +1,10 @@
#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2012-01-06.18; # UTC
+scriptversion=2012-06-26.16; # UTC
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,61 +29,33 @@ if test $# -eq 0; then
exit 1
fi
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, 'missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
+case $1 in
-msg="missing on your system"
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
-case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
-Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
- aclocal touch file 'aclocal.m4'
- autoconf touch file 'configure'
- autoheader touch file 'config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all 'Makefile.in' files
- bison create 'y.tab.[ch]', if possible, from existing .[ch]
- flex create 'lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create 'lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- yacc create 'y.tab.[ch]', if possible, from existing .[ch]
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
@@ -98,228 +70,141 @@ Send bug reports to <bug-automake@gnu.org>."
;;
-*)
- echo 1>&2 "$0: Unknown '$1' option"
+ echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program). This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
- lex*|yacc*)
- # Not GNU programs, they don't have --version.
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running '$TOOL --version' or '$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
- aclocal*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'acinclude.m4' or '${configure_ac}'. You might want
- to install the Automake and Perl packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified '${configure_ac}'. You might want to install the
- Autoconf and GNU m4 packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'acconfig.h' or '${configure_ac}'. You might want
- to install the Autoconf and GNU m4 packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
- You might want to install the Automake and Perl packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te*)
- echo 1>&2 "\
-WARNING: '$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get '$1' as part of Autoconf from any GNU
- archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison*|yacc*)
- echo 1>&2 "\
-WARNING: '$1' $msg. You should only need it if
- you modified a '.y' file. You may need the Bison package
- in order for those modifications to take effect. You can get
- Bison from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex*|flex*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a '.l' file. You may need the Flex package
- in order for those modifications to take effect. You can get
- Flex from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- Help2man package in order for those modifications to take
- effect. You can get Help2man from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- fi
- ;;
-
- makeinfo*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a '.texi' or '.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy 'make' (AIX,
- DU, IRIX). You might want to install the Texinfo package or
- the GNU make package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /^@setfilename/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
- *)
- echo 1>&2 "\
-WARNING: '$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the 'README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing '$1' program."
- exit 1
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'automa4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
;;
-esac
-
-exit 0
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/lib/test-driver b/lib/test-driver
index aba4d1d26..53e19b814 100755
--- a/lib/test-driver
+++ b/lib/test-driver
@@ -1,5 +1,5 @@
#! /bin/sh
-# test-driver - basic driver script for the 'parallel-tests' mode.
+# test-driver - basic testsuite driver script.
scriptversion=2012-06-27.10; # UTC