summaryrefslogtreecommitdiff
path: root/regress/bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-09-29 11:04:46 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-09-29 11:04:46 +0000
commitf886cd16f49fdb47d2c015137df2434bf89190e1 (patch)
tree2ec0a11075e9502310fb90b9755bf7fea9b9d90a /regress/bin
parent457ac54c90a393e4a9a2cf2658bb19bfb6ac91ed (diff)
If a Makefile both defines SUBDIR and includes <bsd.regress.mk>,
the "all" target will depend on the "regress" target, so running "make all" will recurse into the subdirectories for "regress", and then recurse a second time into the same subdirectories for "all", running all the tests twice. Fix this by moving the Makefile to run the main-level tests into a subdirectory "main" and only including <bsd.subdir.mk> from the top level Makefile. Issue reported by otto@; patch OK'ed by otto@ and bluhm@.
Diffstat (limited to 'regress/bin')
-rw-r--r--regress/bin/ksh/Makefile23
-rw-r--r--regress/bin/ksh/main/Makefile21
2 files changed, 24 insertions, 20 deletions
diff --git a/regress/bin/ksh/Makefile b/regress/bin/ksh/Makefile
index 21760565ae6..e2dee90c682 100644
--- a/regress/bin/ksh/Makefile
+++ b/regress/bin/ksh/Makefile
@@ -1,22 +1,5 @@
-# $OpenBSD: Makefile,v 1.9 2016/01/12 09:00:39 schwarze Exp $
+# $OpenBSD: Makefile,v 1.10 2016/09/29 11:04:45 schwarze Exp $
-SUBDIR += vi
+SUBDIR += main vi
-REGRESS_TARGETS=check
-KSH=/bin/ksh
-PERL=/usr/bin/perl
-CATEGORIES=pdksh,sh,ksh,posix,posix-upu
-
-# Avoid /tmp for test temp files if we have an obj dir
-.if ${.CURDIR} != ${.OBJDIR}
-TEMPDIR=${.OBJDIR}
-.else
-TEMPDIR=/tmp
-.endif
-
-check test:
- ${PERL} ${.CURDIR}/th -s ${.CURDIR} -p ${KSH} -C ${CATEGORIES} -T ${TEMPDIR}
-
-.PHONY: ${REGRESS_TARGETS}
-
-.include <bsd.regress.mk>
+.include <bsd.subdir.mk>
diff --git a/regress/bin/ksh/main/Makefile b/regress/bin/ksh/main/Makefile
new file mode 100644
index 00000000000..20d3010c8de
--- /dev/null
+++ b/regress/bin/ksh/main/Makefile
@@ -0,0 +1,21 @@
+# $OpenBSD: Makefile,v 1.1 2016/09/29 11:04:45 schwarze Exp $
+
+REGRESS_TARGETS=check
+KSH=/bin/ksh
+PERL=/usr/bin/perl
+CATEGORIES=pdksh,sh,ksh,posix,posix-upu
+
+# Avoid /tmp for test temp files if we have an obj dir
+.if ${.CURDIR} != ${.OBJDIR}
+TEMPDIR=${.OBJDIR}
+.else
+TEMPDIR=/tmp
+.endif
+
+check test:
+ ${PERL} ${.CURDIR}/../th -s ${.CURDIR}/.. -p ${KSH} \
+ -C ${CATEGORIES} -T ${TEMPDIR}
+
+.PHONY: ${REGRESS_TARGETS}
+
+.include <bsd.regress.mk>