diff --git a/tools/regression/acct/Makefile b/tools/regression/acct/Makefile index 09f8b323ecd..6da91b6a914 100644 --- a/tools/regression/acct/Makefile +++ b/tools/regression/acct/Makefile @@ -1,26 +1,22 @@ # # $FreeBSD$ # -# "make" will compile what is needed and run the regression tests. +# "make" will compile the acct test programs # + PROG= pack +SRCS= pack.c NO_MAN= +CFLAGS+= -I${.OBJDIR} -CFLAGS= -include /usr/include/sys/limits.h \ - -include /usr/include/sys/syslog.h - -all: regress - -pack: pack.c convert.c +pack.o: convert.c +CLEANFILES+= convert.c convert.c: ../../../sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' $? >$@ regress: pack regress.t - ./regress.t - -clean: - rm -f $(PROG) convert.c + ${.CURDIR}/regress.t .include diff --git a/tools/regression/acct/pack.c b/tools/regression/acct/pack.c index 122b623206f..d1d30856f7f 100644 --- a/tools/regression/acct/pack.c +++ b/tools/regression/acct/pack.c @@ -25,15 +25,18 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include +#include #include #include +#include #include #include - -#include -#include +#include +#include #define KASSERT(val, msg) assert(val) diff --git a/tools/regression/acct/regress.t b/tools/regression/acct/regress.t index 8bb8969af7e..3f63c3ac3ac 100755 --- a/tools/regression/acct/regress.t +++ b/tools/regression/acct/regress.t @@ -3,7 +3,12 @@ # $FreeBSD$ # -DIR=`dirname $0` +if test -z "${DIR}" ; then + DIR=$( make -V .OBJDIR ) +fi +if test -z "${DIR}" ; then + DIR=$( dirname $0 ) +fi check() {