(file_contents_with_transform): Catch `.PHONY:'.
(handle_tests): Instead dumping the hard coded target check-TESTS
and registering its .PHONYsm, get them from...
* check.am: here, new file.
2001-01-29 Akim Demaille <akim@epita.fr>
+ * automake.in (handle_phony): Sort.
+ (file_contents_with_transform): Catch `.PHONY:'.
+ (handle_tests): Instead dumping the hard coded target check-TESTS
+ and registering its .PHONYsm, get them from...
+ * check.am: here, new file.
+
+2001-01-29 Akim Demaille <akim@epita.fr>
+
* automake.in (add_depend2): Use &transform.
2001-01-29 Akim Demaille <akim@epita.fr>
bin_SCRIPTS = automake aclocal
info_TEXINFOS = automake.texi
-amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \
-data-clean.am data.am dejagnu.am depend.am depend2.am dist.am \
-dist-vars.am footer.am header-vars.am header.am java-clean.am java.am \
-kr-extra.am library.am libs-clean.am libs.am libtool.am lisp-clean.am \
-lisp.am ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am \
-multilib.am program.am progs-clean.am progs.am python.am \
-python-clean.am remake-hdr.am remake.am scripts.am subdirs.am \
-tags-clean.am tags.am texi-vers.am texinfos.am
+amfiles = check.am clean-hdr.am clean-kr.am clean.am comp-vars.am \
+compile.am data-clean.am data.am dejagnu.am depend.am depend2.am \
+dist.am dist-vars.am footer.am header-vars.am header.am java-clean.am \
+java.am kr-extra.am library.am libs-clean.am libs.am libtool.am \
+lisp-clean.am lisp.am ltlib-clean.am ltlib.am ltlibrary.am \
+mans-vars.am mans.am multilib.am program.am progs-clean.am progs.am \
+python.am python-clean.am remake-hdr.am remake.am scripts.am \
+subdirs.am tags-clean.am tags.am texi-vers.am texinfos.am
dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
$(amfiles)
bin_SCRIPTS = automake aclocal
info_TEXINFOS = automake.texi
-amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \
-data-clean.am data.am dejagnu.am depend.am depend2.am dist.am \
-dist-vars.am footer.am header-vars.am header.am java-clean.am java.am \
-kr-extra.am library.am libs-clean.am libs.am libtool.am lisp-clean.am \
-lisp.am ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am \
-multilib.am program.am progs-clean.am progs.am python.am \
-python-clean.am remake-hdr.am remake.am scripts.am subdirs.am \
-tags-clean.am tags.am texi-vers.am texinfos.am
+amfiles = check.am clean-hdr.am clean-kr.am clean.am comp-vars.am \
+compile.am data-clean.am data.am dejagnu.am depend.am depend2.am \
+dist.am dist-vars.am footer.am header-vars.am header.am java-clean.am \
+java.am kr-extra.am library.am libs-clean.am libs.am libtool.am \
+lisp-clean.am lisp.am ltlib-clean.am ltlib.am ltlibrary.am \
+mans-vars.am mans.am multilib.am program.am progs-clean.am progs.am \
+python.am python-clean.am remake-hdr.am remake.am scripts.am \
+subdirs.am tags-clean.am tags.am texi-vers.am texinfos.am
dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
maintainer-clean: maintainer-clean-recursive
-rm -f config.status
-.PHONY: uninstall-binSCRIPTS install-binSCRIPTS mostlyclean-vti \
-distclean-vti clean-vti maintainer-clean-vti install-info-am \
-uninstall-info mostlyclean-aminfo distclean-aminfo clean-aminfo \
-maintainer-clean-aminfo uninstall-dist_pkgdataDATA \
-install-dist_pkgdataDATA uninstall-dist_scriptDATA \
-install-dist_scriptDATA install-recursive uninstall-recursive \
-install-data-recursive uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-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-am info \
-dvi-am dvi check check-am installcheck-local installcheck-am \
-installcheck install-exec-am install-exec install-data-am install-data \
-install-am install uninstall-am uninstall all-redirect all-am all \
-install-strip installdirs-am installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
+.PHONY: all all-am all-recursive all-redirect check check-am \
+check-recursive clean clean-aminfo clean-generic clean-recursive \
+clean-tags clean-vti distclean distclean-aminfo distclean-generic \
+distclean-recursive distclean-tags distclean-vti distdir dvi dvi-am \
+dvi-recursive info info-am info-recursive install install-am \
+install-binSCRIPTS install-data install-data-am install-data-recursive \
+install-dist_pkgdataDATA install-dist_scriptDATA install-exec \
+install-exec-am install-exec-recursive install-info-am \
+install-recursive install-strip installcheck installcheck-am \
+installcheck-local installcheck-recursive installdirs installdirs-am \
+installdirs-recursive maintainer-clean maintainer-clean-aminfo \
+maintainer-clean-generic maintainer-clean-recursive \
+maintainer-clean-tags maintainer-clean-vti mostlyclean \
+mostlyclean-aminfo mostlyclean-generic mostlyclean-recursive \
+mostlyclean-tags mostlyclean-vti tags tags-recursive uninstall \
+uninstall-am uninstall-binSCRIPTS uninstall-data-recursive \
+uninstall-dist_pkgdataDATA uninstall-dist_scriptDATA \
+uninstall-exec-recursive uninstall-info uninstall-recursive \
+uninstalldirs-recursive
install-data-hook:
# Handle .PHONY target.
sub handle_phony
{
- &pretty_print_rule ('.PHONY:', "", @phony);
+ &pretty_print_rule ('.PHONY:', "", sort @phony);
$output_rules .= "\n";
}
if (&variable_defined ('TESTS'))
{
push (@check_tests, 'check-TESTS');
- push (@phony, 'check-TESTS');
# Note: Solaris 2.7 seems to expand TESTS using VPATH. That's
# why we also try `dir='
- $output_rules .= 'check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; \\
- srcdir=$(srcdir); export srcdir; \\
- list=' . "'\$(TESTS)'; \\" . '
- if test -n "$$list"; then \\
- for tst in $$list; do \\
- if test -f ./$$tst; then dir=./; \\
- elif test -f $$tst; then dir=; \\
- else dir="$(srcdir)/"; fi; \\
- if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \\
- all=`expr $$all + 1`; \\
- case " $(XFAIL_TESTS) " in \\
- *" $$tst "*) \\
- xpass=`expr $$xpass + 1`; \\
- failed=`expr $$failed + 1`; \\
- echo "XPASS: $$tst"; \\
- ;; \\
- *) \\
- echo "PASS: $$tst"; \\
- ;; \\
- esac; \\
- elif test $$? -ne 77; then \\
- all=`expr $$all + 1`; \\
- case " $(XFAIL_TESTS) " in \\
- *" $$tst "*) \\
- xfail=`expr $$xfail + 1`; \\
- echo "XFAIL: $$tst"; \\
- ;; \\
- *) \\
- failed=`expr $$failed + 1`; \\
- echo "FAIL: $$tst"; \\
- ;; \\
- esac; \\
- fi; \\
- done; \\
- if test "$$failed" -eq 0; then \\
- if test "$$xfail" -eq 0; then \\
- banner="All $$all tests passed"; \\
- else \\
- banner="All $$all tests behaved as expected ($$xfail expected failures)"; \\
- fi; \\
- else \\
- if test "$$xpass" -eq 0; then \\
- banner="$$failed of $$all tests failed"; \\
- else \\
- banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \\
- fi; \\
- fi; \\
- dashes=`echo "$$banner" | sed s/./=/g`; \\
- echo "$$dashes"; \\
- echo "$$banner"; \\
- echo "$$dashes"; \\
- test "$$failed" -eq 0; \\
- fi
-';
+ $output_rules .= &file_contents ('check');
}
}
################################################################
+
+# $CONTENTS
+# &file_contents_with_transform ($COMMAND, $BASENAME)
+# ---------------------------------------------------
# Return contents of a file from $am_dir, automatically skipping
# macros or rules which are already known. Runs command on each line
# as it is read; this command can modify $_.
}
$saw_bk = /\\$/;
}
+ elsif (/^.PHONY: (.*)$/)
+ {
+ # Having a special case for PHONY upstream seems much easier than
+ # trying to have it fit in RULE_PATTERN and extract it later.
+ push (@phony, split (/\s+/, $1));
+ }
elsif (/$RULE_PATTERN/o)
{
# Found a rule.
--- /dev/null
+## automake - create Makefile.in from Makefile.am
+## Copyright 2001 Free Software Foundation, Inc.
+
+## 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, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+
+.PHONY: check-TESTS
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list='$(TESTS)'; \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+## Note: Solaris 2.7 seems to expand TESTS using VPATH. That's
+## why we also try `dir='
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "XPASS: $$tst"; \
+ ;; \
+ *) \
+ echo "PASS: $$tst"; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xfail=`expr $$xfail + 1`; \
+ echo "XFAIL: $$tst"; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ ;; \
+ esac; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all tests failed"; \
+ else \
+ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+ fi; \
+ fi; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0; \
+ fi
bin_SCRIPTS = automake aclocal
info_TEXINFOS = automake.texi
-amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \
-data-clean.am data.am dejagnu.am depend.am depend2.am dist.am \
-dist-vars.am footer.am header-vars.am header.am java-clean.am java.am \
-kr-extra.am library.am libs-clean.am libs.am libtool.am lisp-clean.am \
-lisp.am ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am \
-multilib.am program.am progs-clean.am progs.am python.am \
-python-clean.am remake-hdr.am remake.am scripts.am subdirs.am \
-tags-clean.am tags.am texi-vers.am texinfos.am
+amfiles = check.am clean-hdr.am clean-kr.am clean.am comp-vars.am \
+compile.am data-clean.am data.am dejagnu.am depend.am depend2.am \
+dist.am dist-vars.am footer.am header-vars.am header.am java-clean.am \
+java.am kr-extra.am library.am libs-clean.am libs.am libtool.am \
+lisp-clean.am lisp.am ltlib-clean.am ltlib.am ltlibrary.am \
+mans-vars.am mans.am multilib.am program.am progs-clean.am progs.am \
+python.am python-clean.am remake-hdr.am remake.am scripts.am \
+subdirs.am tags-clean.am tags.am texi-vers.am texinfos.am
dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
$(amfiles)
--- /dev/null
+## automake - create Makefile.in from Makefile.am
+## Copyright 2001 Free Software Foundation, Inc.
+
+## 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, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+
+.PHONY: check-TESTS
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list='$(TESTS)'; \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+## Note: Solaris 2.7 seems to expand TESTS using VPATH. That's
+## why we also try `dir='
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "XPASS: $$tst"; \
+ ;; \
+ *) \
+ echo "PASS: $$tst"; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xfail=`expr $$xfail + 1`; \
+ echo "XFAIL: $$tst"; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ ;; \
+ esac; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all tests failed"; \
+ else \
+ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+ fi; \
+ fi; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0; \
+ fi
maintainer-clean: maintainer-clean-am
-.PHONY: uninstall-m4dataDATA install-m4dataDATA tags distdir info-am \
-info dvi-am dvi check check-am installcheck-am installcheck \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all install-strip \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+.PHONY: all all-am all-redirect check check-am clean clean-generic \
+distclean distclean-generic distdir dvi dvi-am info info-am install \
+install-am install-data install-data-am install-exec install-exec-am \
+install-m4dataDATA install-strip installcheck installcheck-am \
+installdirs maintainer-clean maintainer-clean-generic mostlyclean \
+mostlyclean-generic tags uninstall uninstall-am uninstall-m4dataDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
+2001-01-29 Akim Demaille <akim@epita.fr>
+
+ * check.test: New.
+
2001-01-28 Tom Tromey <tromey@redhat.com>
* listval.test: New file.
canon3.test \
canon4.test \
canon5.test \
+check.test \
checkall.test \
clean.test \
colneq.test \
canon3.test \
canon4.test \
canon5.test \
+check.test \
checkall.test \
clean.test \
colneq.test \
tags: TAGS
TAGS:
+
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; \
srcdir=$(srcdir); export srcdir; \
maintainer-clean: maintainer-clean-am
-.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
-installcheck-am installcheck install-exec-am install-exec \
-install-data-am install-data install-am install uninstall-am uninstall \
-all-redirect all-am all install-strip installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
+.PHONY: all all-am all-redirect check check-TESTS check-am clean \
+clean-generic distclean distclean-generic distdir dvi dvi-am info \
+info-am install install-am install-data install-data-am install-exec \
+install-exec-am install-strip installcheck installcheck-am installdirs \
+maintainer-clean maintainer-clean-generic mostlyclean \
+mostlyclean-generic tags uninstall uninstall-am
distclean-local:
--- /dev/null
+#! /bin/sh
+
+# Test Automake style tests.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+TESTS = frob.test
+END
+
+: > frob.test
+
+$AUTOMAKE || exit 1
+
+grep '^check-TESTS:' Makefile.in || exit 1
+grep '^check-DEJAGNU' Makefile.in && exit 1
+
+# check-TESTS is phony.
+sed -n '/^\.PHONY:/,/^$/p' Makefile.in | grep check-TESTS || exit 1
+
+exit 0