Merge branch 'maint'
[platform/upstream/automake.git] / Makefile.am
index 2764481..8e66894 100644 (file)
@@ -261,14 +261,13 @@ dist_automake_ac_DATA = \
   m4/ar-lib.m4 \
   m4/as.m4 \
   m4/auxdir.m4 \
-  m4/ccstdc.m4 \
   m4/cond.m4 \
   m4/cond-if.m4 \
   m4/depend.m4 \
   m4/depout.m4 \
   m4/dmalloc.m4 \
+  m4/extra-recurs.m4 \
   m4/gcj.m4 \
-  m4/header.m4 \
   m4/init.m4 \
   m4/install-sh.m4 \
   m4/lead-dot.m4 \
@@ -278,10 +277,6 @@ dist_automake_ac_DATA = \
   m4/make.m4 \
   m4/minuso.m4 \
   m4/missing.m4 \
-  m4/mkdirp.m4 \
-  m4/obsol-gt.m4 \
-  m4/obsol-lt.m4 \
-  m4/obsolete.m4 \
   m4/options.m4 \
   m4/protos.m4 \
   m4/python.m4 \
@@ -379,6 +374,11 @@ EXTRA_DIST += gen-testsuite-part
 $(generated_TESTS): $(srcdir)/gen-testsuite-part
 $(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part Makefile.am
 
+# Hand-written tests for stuff in 'contrib/'.
+include $(srcdir)/contrib/t/local.am
+TESTS += $(contrib_TESTS)
+EXTRA_DIST += $(contrib_TESTS)
+
 # Static dependencies valid for each test case.
 check_SCRIPTS = t/wrap/aclocal-$(APIVERSION) t/wrap/automake-$(APIVERSION)
 dist_check_DATA = \
@@ -427,7 +427,7 @@ check-local: check-no-repeated-test-name
 .PHONY: check-no-repeated-test-name
 
 ## Checking the list of tests.
-test_subdirs = t t/pm t/perf
+test_subdirs = t t/pm t/perf contrib/t
 include $(srcdir)/t/CheckListOfTests.am
 
 # Run the testsuite with the installed aclocal and automake.
@@ -438,13 +438,16 @@ installcheck-testsuite:
 clean-local: clean-local-check
 .PHONY: clean-local-check
 clean-local-check:
-       -set x t/*.dir; shift; \
-        if test "$$#,$$1" = "1,*.dir"; then \
-          : there is no test directory to clean; \
-        else \
-          find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
-          rm -rf "$$@"; \
-        fi;
+## Directries candidate to be test directories match this wildcard.
+       @globs='t/*.dir t/*/*.dir */t/*.dir */t/*/*.dir'; \
+## The 'nullglob' bash option is not portable, so use perl.
+       dirs=`$(PERL) -e "print join(' ', glob('$$globs'));"` || exit 1; \
+       if test -n "$$dirs"; then \
+## Errors in find are acceptable, errors in rm are not.
+           find $$dirs -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
+           echo " rm -rf $$dirs"; \
+           rm -rf $$dirs || exit 1; \
+       fi
 
 
 ## ---------------- ##