8 This script regenerates the DTrace test suite makefiles. It should be run
9 whenever \$srcdir/cddl/contrib/opensolaris/cmd/dtrace/test/tst is modified.
14 # Format a file list for use in a make(1) variable assignment: take the
15 # basename of each input file and append " \" to it.
22 {print " ", bn($1), " \\"}'
29 local tdir=${CONTRIB_TESTDIR}/${basedir}
30 local tfiles=$(find $tdir -type f -a \
31 \( -name \*.d -o -name \*.ksh -o -name \*.out \) | sort | fmtflist)
32 local tcfiles=$(find $tdir -type f -a -name \*.c | sort | fmtflist)
33 local texes=$(find $tdir -type f -a -name \*.exe | sort | fmtflist)
35 # One-off variable definitions.
37 if [ "$basedir" = proc ]; then
39 LDADD.tst.sigwait.exe+= -lrt
40 DPADD.tst.sigwait.exe+= \${LIBRT}
42 elif [ "$basedir" = uctf ]; then
48 local makefile=$(mktemp)
49 cat <<__EOF__ > $makefile
53 # This Makefile was generated by \$srcdir${ORIGINDIR#${TOPDIR}}/genmakefiles.sh.
66 .include "../../Makefile.inc1"
69 mv -f $makefile ${ORIGINDIR}/../common/${basedir}/Makefile
78 readonly ORIGINDIR=$(realpath $(dirname $0))
79 readonly TOPDIR=$(realpath ${ORIGINDIR}/../../../../..)
80 readonly CONTRIB_TESTDIR=${TOPDIR}/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common
82 # Generate a Makefile for each test group under common/.
83 for dir in $(find ${CONTRIB_TESTDIR} -mindepth 1 -maxdepth 1 -type d); do
84 genmakefile $(basename $dir)