DATA = $(pkgdata_DATA)
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
-Makefile.in NEWS README README-alpha THANKS TODO aclocal.in aclocal.m4 \
-ansi2knr.1 ansi2knr.c automake.in config.guess config.sub configure \
-configure.in elisp-comp install-sh interlock mdate-sh mkinstalldirs \
-stamp-vti texinfo.tex version.texi ylwrap
+Makefile.in NEWS README README-alpha THANKS TODO aclocal.m4 ansi2knr.1 \
+ansi2knr.c automake.in config.guess config.sub configure configure.in \
+elisp-comp install-sh interlock mdate-sh mkinstalldirs stamp-vti \
+texinfo.tex version.texi ylwrap
PACKAGE = @PACKAGE@
cd $(srcdir) && autoconf
automake: $(top_builddir)/config.status automake.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
-aclocal: $(top_builddir)/config.status aclocal.in
+aclocal: $(top_builddir)/config.status automake.in aclocal.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
install-binSCRIPTS: $(bin_SCRIPTS)
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info dvi check \
+distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
installcheck-local installcheck all-am install-exec-am install-data-am \
uninstall-am install-exec install-data install uninstall all \
installdirs mostlyclean-generic distclean-generic clean-generic \
&& &variable_defined ($key . '_SCRIPTS'))
{
$scripts_installed = 1;
- # push (@check, 'check-' . $key . 'SCRIPTS');
+ # push (@check_tests, 'check-' . $key . 'SCRIPTS');
}
}
}
&push_phony_cleaners ('recursive');
- push (@check, "check-recursive");
+ push (@check_tests, "check-recursive");
push (@installcheck, "installcheck-recursive");
push (@info, "info-recursive");
push (@dvi, "dvi-recursive");
&do_one_merge_target ('info', @info);
&do_one_merge_target ('dvi', @dvi);
- &do_one_merge_target ('check', @check);
+ &do_check_merge_target;
&do_one_merge_target ('installcheck', @installcheck);
if (defined $options{'no-installinfo'})
push (@phony, $name . '-local');
}
- local ($done) = 0;
- if ($name eq 'check')
+ &pretty_print_rule ($name . ":", "\t\t", @values);
+ push (@phony, $name);
+}
+
+# Handle check merge target specially.
+sub do_check_merge_target
+{
+ if (defined $contents{'check-local'})
{
- if (! &variable_defined ('SUBDIRS'))
- {
- # 'check' must depend on `all', but not when doing
- # recursive build.
- unshift (@values, 'all');
- }
- else
- {
- # When subdirs are used, do the `all' build and then do
- # all the recursive stuff. Actually use `all-am' because
- # it doesn't recurse; we rely on the check target in the
- # subdirs to do the required builds there.
- $output_rules .= "check: all-am\n";
- &pretty_print_rule ("\t\$(MAKE)", "\t ", @values);
- $done = 1;
- }
+ # User defined local form of target. So include it.
+ push (@check_tests, 'check-local');
+ push (@phony, 'check-local');
}
- &pretty_print_rule ($name . ":", "\t\t", @values)
- unless $done;
- push (@phony, $name);
+ if (! &variable_defined ('SUBDIRS'))
+ {
+ # 'check' must depend on `all', but not when doing recursive
+ # build.
+ unshift (@check, 'all');
+ }
+ else
+ {
+ # When subdirs are used, do the `all' build and then do all
+ # the recursive stuff. Actually use `all-am' because it
+ # doesn't recurse; we rely on the check target in the subdirs
+ # to do the required builds there.
+ unshift (@check, 'all-am');
+ }
+
+ # The check target must depend on the local equivalent of `all',
+ # to ensure all the primary targets are built. Also it must
+ # depend on the test code named in @check.
+ &pretty_print_rule ('check:', "\t\t", @check);
+
+ # Now the check rules must explicitly run anything named in
+ # @check_tests. This is done via a separate make invocation to
+ # avoid problems with parallel makes. Every time I write code
+ # like this I wonder: how could you invent a parallel make and not
+ # provide any real synchronization facilities?
+ &pretty_print_rule ("\t\$(MAKE)", "\t ", @check_tests);
}
# Handle all 'clean' targets.
{
if (defined $options{'dejagnu'})
{
- push (@check, 'check-DEJAGNU');
+ push (@check_tests, 'check-DEJAGNU');
push (@phony, 'check-DEJAGNU');
local ($xform);
if (&variable_defined ('TESTS'))
{
- push (@check, 'check-TESTS');
+ push (@check_tests, 'check-TESTS');
push (@phony, 'check-TESTS');
# FIXME: use $(SHELL) here? That is what Ulrich suggests.
# Maybe a new macro, $(TEST_SHELL), a la $(CONFIG_SHELL)? For
@dvi = ();
@all = ();
@check = ();
+ @check_tests = ();
@installcheck = ();
@clean = ();