From 3b262e8278e5eabd913d41d02b4963e62938ec8f Mon Sep 17 00:00:00 2001 From: David Krause Date: Wed, 29 Dec 2004 06:02:15 +0000 Subject: use bsd.regress.mk framework and update dejagnu detection --- regress/gnu/egcs/gcc/Makefile | 40 ++++++++++++++++++++----------------- regress/gnu/egcs/libf2c/Makefile | 40 +++++++++++++++++++------------------ regress/gnu/egcs/libiberty/Makefile | 35 +++++++++++++++++--------------- 3 files changed, 62 insertions(+), 53 deletions(-) (limited to 'regress') diff --git a/regress/gnu/egcs/gcc/Makefile b/regress/gnu/egcs/gcc/Makefile index d6a3e85334a..91c8e3edb58 100644 --- a/regress/gnu/egcs/gcc/Makefile +++ b/regress/gnu/egcs/gcc/Makefile @@ -1,32 +1,36 @@ -# $OpenBSD: Makefile,v 1.4 2004/07/21 04:28:49 david Exp $ +# $OpenBSD: Makefile,v 1.5 2004/12/29 06:02:14 david Exp $ .include NOMAN= NOPROG= +HAVE_DEJAGNU!=pkg_info dejagnu + .if ${USE_GCC3:L:Myes} TESTDIR=${BSDSRCDIR}/gnu/usr.bin/gcc .else TESTDIR=${BSDSRCDIR}/gnu/egcs/gcc .endif -regress: - @if ${RUNTEST} --help >/dev/null; then \ - if ${RUNTEST} --version|grep 'Framework version is.*1.3$$' >/dev/null; then \ - echo "Error: you must have a dejagnu more recent than 1.3"; \ - echo "For instance: ${PORTSDIR}/devel/dejagnu."; \ - else \ - cd ${TESTDIR} && ${MAKE} -f Makefile.bsd-wrapper && \ - ${MAKE} check RUNTEST=${RUNTEST}; \ - fi; \ - else \ - echo "Error: you must have a dejagnu more recent than 1.3 to run this test."; \ - echo " You can install the package from the ftp site or recompile it"; \ - echo " from the ports tree (${PORTSDIR}/devel/dejagnu)."; \ - fi - - -.include +REGRESS_TARGETS=do-gcc + +.if !defined(DO_DEJATESTS) +REGRESS_SKIP_TARGETS=do-gcc +.endif + +.if empty(HAVE_DEJAGNU) +do-gcc: + @echo "Error: DejaGnu is required to run this test."; + @echo " You can install the package from the ftp site or compile it"; + @echo " from the ports tree (${PORTSDIR}/devel/dejagnu)."; + @exit 1 +.else +do-gcc: + @cd ${TESTDIR} && ${MAKE} -f Makefile.bsd-wrapper && \ + ${MAKE} check RUNTEST=${RUNTEST}; +.endif + +.include PORTSDIR?=/usr/ports diff --git a/regress/gnu/egcs/libf2c/Makefile b/regress/gnu/egcs/libf2c/Makefile index ac73af0211a..8824d52a6af 100644 --- a/regress/gnu/egcs/libf2c/Makefile +++ b/regress/gnu/egcs/libf2c/Makefile @@ -1,10 +1,11 @@ -# $OpenBSD: Makefile,v 1.4 2004/07/21 04:28:49 david Exp $ +# $OpenBSD: Makefile,v 1.5 2004/12/29 06:02:14 david Exp $ .include NOMAN= NOPROG= +HAVE_DEJAGNU!=pkg_info dejagnu .if ${USE_GCC3:L:Myes} TESTDIR=${BSDSRCDIR}/gnu/lib/libf2c @@ -18,24 +19,25 @@ TEST2DIR=${BSDSRCDIR}/gnu/egcs/gcc TEST3DIR=${TESTDIR}/libU77 TEST4DIR=${TEST2DIR}/ +REGRESS_TARGETS=do-libf2c -regress: - @if ${RUNTEST} --help >/dev/null; then \ - if ${RUNTEST} --version|grep 'Framework version is.*1.3$$' >/dev/null; then \ - echo "Error: you must have a dejagnu more recent than 1.3"; \ - echo "For instance: ${PORTSDIR}/devel/dejagnu."; \ - else \ - cd ${TESTDIR} && ${MAKE} -f Makefile.bsd-wrapper && \ - cd ${TEST2DIR} && ${MAKE} -f Makefile.bsd-wrapper && \ - cd ${TEST3DIR} && ${MAKE} G77DIR=${TEST4DIR} check RUNTEST=${RUNTEST}; \ - fi; \ - else \ - echo "Error: you must have a dejagnu more recent than 1.3 to run this test."; \ - echo " You can install the package from the ftp site or recompile it"; \ - echo " from the ports tree (${PORTSDIR}/devel/dejagnu)."; \ - fi - - -.include +.if !defined(DO_DEJATESTS) +REGRESS_SKIP_TARGETS=do-libf2c +.endif + +.if empty(HAVE_DEJAGNU) +do-libf2c: + @echo "Error: DejaGnu is required to run this test."; + @echo " You can install the package from the ftp site or compile it"; + @echo " from the ports tree (${PORTSDIR}/devel/dejagnu)."; + @exit 1 +.else +do-libf2c: + @cd ${TESTDIR} && ${MAKE} -f Makefile.bsd-wrapper && \ + cd ${TEST2DIR} && ${MAKE} -f Makefile.bsd-wrapper && \ + cd ${TEST3DIR} && ${MAKE} G77DIR=${TEST4DIR} check RUNTEST=${RUNTEST}; +.endif + +.include PORTSDIR?=/usr/ports diff --git a/regress/gnu/egcs/libiberty/Makefile b/regress/gnu/egcs/libiberty/Makefile index 32cb6c0f6fb..3b075d09922 100644 --- a/regress/gnu/egcs/libiberty/Makefile +++ b/regress/gnu/egcs/libiberty/Makefile @@ -1,27 +1,30 @@ -# $OpenBSD: Makefile,v 1.3 2004/07/09 21:56:32 david Exp $ +# $OpenBSD: Makefile,v 1.4 2004/12/29 06:02:14 david Exp $ NOMAN= NOPROG= +HAVE_DEJAGNU!=pkg_info dejagnu + TESTDIR=${BSDSRCDIR}/gnu/lib/libiberty +REGRESS_TARGETS=do-libiberty -regress: - @if ${RUNTEST} --help >/dev/null; then \ - if ${RUNTEST} --version|grep 'Framework version is.*1.3$$' >/dev/null; then \ - echo "Error: you must have a dejagnu more recent than 1.3"; \ - echo "For instance: ${PORTSDIR}/devel/dejagnu."; \ - else \ - cd ${TESTDIR} && ${MAKE} -f Makefile.bsd-wrapper && \ - ${MAKE} check RUNTEST=${RUNTEST}; \ - fi; \ - else \ - echo "Error: you must have a dejagnu more recent than 1.3 to run this test."; \ - echo " You can install the package from the ftp site or recompile it"; \ - echo " from the ports tree (${PORTSDIR}/devel/dejagnu)."; \ - fi +.if !defined(DO_DEJATESTS) +REGRESS_SKIP_TARGETS=do-libiberty +.endif +.if empty(HAVE_DEJAGNU) +do-libiberty: + @echo "Error: DejaGnu is required to run this test."; + @echo " You can install the package from the ftp site or compile it"; + @echo " from the ports tree (${PORTSDIR}/devel/dejagnu)."; + @exit 1 +.else +do-libiberty: + @cd ${TESTDIR} && ${MAKE} -f Makefile.bsd-wrapper && \ + ${MAKE} check RUNTEST=${RUNTEST}; +.endif -.include +.include PORTSDIR?=/usr/ports -- cgit v1.2.3