From d4e67a97b48f1b52d1ab469d4665694e452560c5 Mon Sep 17 00:00:00 2001 From: bluhm Date: Wed, 5 Jul 2017 15:31:45 +0000 Subject: [PATCH] Implement the generated dependency with a stamp file to avoid needless recompiling of the test programs. Add some RCS ids. --- regress/lib/libedit/Makefile.inc | 10 +++++----- regress/lib/libedit/chared/Makefile | 6 ++---- regress/lib/libedit/chared/test_gets.c | 1 + regress/lib/libedit/keymacro/test_get.c | 1 + regress/lib/libedit/read/Makefile | 6 +++--- regress/lib/libedit/read/glue.c | 1 + regress/lib/libedit/read/test_getcmd.c | 1 + regress/lib/libedit/read/test_read_char.c | 1 + regress/lib/libedit/read/test_read_char.sh | 1 + regress/lib/libedit/readline/history.c | 1 + regress/sbin/isakmpd/Makefile.inc | 10 +++++----- 11 files changed, 22 insertions(+), 17 deletions(-) diff --git a/regress/lib/libedit/Makefile.inc b/regress/lib/libedit/Makefile.inc index b6701196b45..b3d42faef59 100644 --- a/regress/lib/libedit/Makefile.inc +++ b/regress/lib/libedit/Makefile.inc @@ -1,12 +1,12 @@ -# $OpenBSD: Makefile.inc,v 1.2 2017/07/04 21:56:05 bluhm Exp $ +# $OpenBSD: Makefile.inc,v 1.3 2017/07/05 15:31:45 bluhm Exp $ TOPSRC= ${.CURDIR}/../../../../lib/libedit TOPOBJ!!= ${MAKE} -C ${TOPSRC} -V .OBJDIR CFLAGS+= -I${TOPSRC} -I${TOPOBJ} +CLEANFILES+= stamp-generated -.PHONY: generated +${PROG}: stamp-generated -${PROG}: generated - -generated: +stamp-generated: ${MAKE} -C ${TOPSRC} generated + date >$@ diff --git a/regress/lib/libedit/chared/Makefile b/regress/lib/libedit/chared/Makefile index ca502d07934..6a1c3208468 100644 --- a/regress/lib/libedit/chared/Makefile +++ b/regress/lib/libedit/chared/Makefile @@ -1,13 +1,11 @@ -# $OpenBSD: Makefile,v 1.4 2017/07/03 18:19:55 bluhm Exp $ +# $OpenBSD: Makefile,v 1.5 2017/07/05 15:31:45 bluhm Exp $ # # Author: Ingo Schwarze , 2016. Public Domain. -REGRESS_TARGETS = gets - PROG = test_gets CLEANFILES += out_gets.utf8 out_gets.ascii -gets: +run-regress-${PROG}: LC_ALL=en_US.UTF-8 ./test_gets < ${.CURDIR}/inp_gets.txt > out_gets.utf8 diff -au ${.CURDIR}/exp_gets.utf8 out_gets.utf8 LC_ALL=C ./test_gets < ${.CURDIR}/inp_gets.txt > out_gets.ascii diff --git a/regress/lib/libedit/chared/test_gets.c b/regress/lib/libedit/chared/test_gets.c index 306c6ba5708..40303299c84 100644 --- a/regress/lib/libedit/chared/test_gets.c +++ b/regress/lib/libedit/chared/test_gets.c @@ -1,3 +1,4 @@ +/* $OpenBSD: test_gets.c,v 1.4 2017/07/05 15:31:45 bluhm Exp $ */ /* * Copyright (c) 2016 Ingo Schwarze * diff --git a/regress/lib/libedit/keymacro/test_get.c b/regress/lib/libedit/keymacro/test_get.c index f54393410ce..0b3e3be5eb2 100644 --- a/regress/lib/libedit/keymacro/test_get.c +++ b/regress/lib/libedit/keymacro/test_get.c @@ -1,3 +1,4 @@ +/* $OpenBSD: test_get.c,v 1.4 2017/07/05 15:31:45 bluhm Exp $ */ /* * Copyright (c) 2016 Ingo Schwarze * diff --git a/regress/lib/libedit/read/Makefile b/regress/lib/libedit/read/Makefile index 8d9c1936322..ac9b82fd4b7 100644 --- a/regress/lib/libedit/read/Makefile +++ b/regress/lib/libedit/read/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2017/07/04 21:56:05 bluhm Exp $ +# $OpenBSD: Makefile,v 1.8 2017/07/05 15:31:45 bluhm Exp $ # # Author: Ingo Schwarze , 2016. Public Domain. @@ -6,10 +6,10 @@ REGRESS_TARGETS = getcmd read_char CLEANFILES += test_read_char test_getcmd out_getcmd.txt -read_char: generated test_read_char +read_char: stamp-generated test_read_char sh ${.CURDIR}/test_read_char.sh -getcmd: generated test_getcmd +getcmd: stamp-generated test_getcmd echo -n s | ./test_getcmd > out_getcmd.txt diff -u ${.CURDIR}/exp_getcmd.txt out_getcmd.txt diff --git a/regress/lib/libedit/read/glue.c b/regress/lib/libedit/read/glue.c index 7364a4f20d9..ddc386f7526 100644 --- a/regress/lib/libedit/read/glue.c +++ b/regress/lib/libedit/read/glue.c @@ -1,3 +1,4 @@ +/* $OpenBSD: glue.c,v 1.4 2017/07/05 15:31:45 bluhm Exp $ */ /* * Copyright (c) 2016 Ingo Schwarze * diff --git a/regress/lib/libedit/read/test_getcmd.c b/regress/lib/libedit/read/test_getcmd.c index 8341b1d6578..2257d8814cc 100644 --- a/regress/lib/libedit/read/test_getcmd.c +++ b/regress/lib/libedit/read/test_getcmd.c @@ -1,3 +1,4 @@ +/* $OpenBSD: test_getcmd.c,v 1.8 2017/07/05 15:31:45 bluhm Exp $ */ /* * Copyright (c) 2016 Ingo Schwarze * diff --git a/regress/lib/libedit/read/test_read_char.c b/regress/lib/libedit/read/test_read_char.c index 653456957ea..8a0aa62311d 100644 --- a/regress/lib/libedit/read/test_read_char.c +++ b/regress/lib/libedit/read/test_read_char.c @@ -1,3 +1,4 @@ +/* $OpenBSD: test_read_char.c,v 1.5 2017/07/05 15:31:45 bluhm Exp $ */ /* * Copyright (c) 2016 Ingo Schwarze * diff --git a/regress/lib/libedit/read/test_read_char.sh b/regress/lib/libedit/read/test_read_char.sh index 2493c73915e..576931ae279 100644 --- a/regress/lib/libedit/read/test_read_char.sh +++ b/regress/lib/libedit/read/test_read_char.sh @@ -1,4 +1,5 @@ #!/bin/sh +# $OpenBSD: test_read_char.sh,v 1.3 2017/07/05 15:31:45 bluhm Exp $ # # Copyright (c) 2016 Ingo Schwarze # diff --git a/regress/lib/libedit/readline/history.c b/regress/lib/libedit/readline/history.c index e74c650fc3d..f4a9e797bf4 100644 --- a/regress/lib/libedit/readline/history.c +++ b/regress/lib/libedit/readline/history.c @@ -1,3 +1,4 @@ +/* $OpenBSD: history.c,v 1.7 2017/07/05 15:31:45 bluhm Exp $ */ /* * Copyright (c) 2016 Bastian Maerkisch * Copyright (c) 2016 Ingo Schwarze diff --git a/regress/sbin/isakmpd/Makefile.inc b/regress/sbin/isakmpd/Makefile.inc index b4c7600ad5c..a910fc58d47 100644 --- a/regress/sbin/isakmpd/Makefile.inc +++ b/regress/sbin/isakmpd/Makefile.inc @@ -1,16 +1,16 @@ -# $OpenBSD: Makefile.inc,v 1.2 2017/07/04 18:02:21 bluhm Exp $ +# $OpenBSD: Makefile.inc,v 1.3 2017/07/05 15:31:45 bluhm Exp $ TOPSRC= ${.CURDIR}/../../../../sbin/isakmpd TOPOBJ!!= ${MAKE} -C ${TOPSRC} -V .OBJDIR CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/openbsd -I${TOPOBJ} -Wall DEBUG= -g +CLEANFILES+= stamp-generated -.PHONY: generated +${PROG}: stamp-generated -${PROG}: generated - -generated: +stamp-generated: ${MAKE} -C ${TOPSRC} generated + date >$@ .PATH: ${.CURDIR}/../common .PATH: ${TOPSRC} ${TOPSRC}/sysdep/openbsd -- 2.20.1