diff options
author | obrien <obrien@FreeBSD.org> | 2010-01-04 18:57:22 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2010-01-04 18:57:22 +0000 |
commit | d2744b88e92689da349b5de750666f235ea9a4ce (patch) | |
tree | a3e67a307d511e8bb94e2cef9388c3b1c989d519 /tools | |
parent | f86eec131ecd8165dffb9b3c544d58e63f18a772 (diff) | |
download | FreeBSD-src-d2744b88e92689da349b5de750666f235ea9a4ce.zip FreeBSD-src-d2744b88e92689da349b5de750666f235ea9a4ce.tar.gz |
Add ability to search up the directory hierarchy for the system directory.
Do by specifying ".../" with '-m' or MAKESYSPATH (new) environment variable.
Reviewed by: <sjg@NetBSD.org>
Obtained from: NetBSD (+ embellishment by me, sent back to NetBSD)
Diffstat (limited to 'tools')
19 files changed, 88 insertions, 0 deletions
diff --git a/tools/regression/usr.bin/make/common.sh b/tools/regression/usr.bin/make/common.sh index 34aacf8..e685ea1 100644 --- a/tools/regression/usr.bin/make/common.sh +++ b/tools/regression/usr.bin/make/common.sh @@ -233,6 +233,12 @@ reset_test() # eval_clean() { + # + # If you have special cleaning needs, provide a 'cleanup' shell script. + # + if [ -n "${TEST_CLEANUP}" ] ; then + . ${SRC_DIR}/cleanup + fi rm -rf ${WORK_DIR} rm -rf ${OUTPUT_DIR} } diff --git a/tools/regression/usr.bin/make/sysmk/t0/2/1/Makefile b/tools/regression/usr.bin/make/sysmk/t0/2/1/Makefile new file mode 100644 index 0000000..fc95f46 --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t0/2/1/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ +# +# Can we traverse up to / and find a 'mk/sys.mk'? +# +all: + @echo ${DASH_M_DOTDOTDOT} diff --git a/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.status.1 b/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.status.1 new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.status.1 @@ -0,0 +1 @@ +0 diff --git a/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.stderr.1 b/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.stderr.1 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.stderr.1 diff --git a/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.stdout.1 b/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.stdout.1 new file mode 100644 index 0000000..6f29307 --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.stdout.1 @@ -0,0 +1 @@ +Found_DotDotDot_sys_mk diff --git a/tools/regression/usr.bin/make/sysmk/t0/2/1/test.t b/tools/regression/usr.bin/make/sysmk/t0/2/1/test.t new file mode 100644 index 0000000..9a78157 --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t0/2/1/test.t @@ -0,0 +1,17 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../../../common.sh + +# Description +DESC="Can we traverse up to / and find a 'mk/sys.mk'?" + +# Run +TEST_N=1 +TEST_1="-m .../mk" +TEST_MAKE_DIRS="../../mk 755" +TEST_COPY_FILES="../../mk/sys.mk 644" + +eval_cmd $* diff --git a/tools/regression/usr.bin/make/sysmk/t0/mk/sys.mk b/tools/regression/usr.bin/make/sysmk/t0/mk/sys.mk new file mode 100644 index 0000000..60f1955 --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t0/mk/sys.mk @@ -0,0 +1,3 @@ +# $FreeBSD$ + +DASH_M_DOTDOTDOT=Found_DotDotDot_sys_mk diff --git a/tools/regression/usr.bin/make/sysmk/t1/2/1/cleanup b/tools/regression/usr.bin/make/sysmk/t1/2/1/cleanup new file mode 100644 index 0000000..c3d58b7 --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t1/2/1/cleanup @@ -0,0 +1,3 @@ +# $FreeBSD$ + +rm -rf ${WORK_DIR}/../../../t0/2/1 diff --git a/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.status.1 b/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.status.1 new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.status.1 @@ -0,0 +1 @@ +0 diff --git a/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.stderr.1 b/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.stderr.1 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.stderr.1 diff --git a/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.stdout.1 b/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.stdout.1 new file mode 100644 index 0000000..6f29307 --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.stdout.1 @@ -0,0 +1 @@ +Found_DotDotDot_sys_mk diff --git a/tools/regression/usr.bin/make/sysmk/t1/2/1/test.t b/tools/regression/usr.bin/make/sysmk/t1/2/1/test.t new file mode 100644 index 0000000..ad1584f --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t1/2/1/test.t @@ -0,0 +1,19 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../../../common.sh + +# Description +DESC="Can we traverse up to / and find a 'mk/sys.mk' with -C -m?" + +# Run +TEST_N=1 +TEST_1="-C ../../../t0/2/1 -m .../mk" +TEST_MAKE_DIRS="../../mk 755 ../../../t0/mk 755 ../../../t0/2/1 755" +TEST_COPY_FILES="../../mk/sys.mk 644 ../../../t0/mk/sys.mk 644 ../../../t0/2/1/Makefile 644" +TEST_CLEAN_FILES="../../../t0/2/1" +TEST_CLEANUP=clean-special + +eval_cmd $* diff --git a/tools/regression/usr.bin/make/sysmk/t1/mk/sys.mk b/tools/regression/usr.bin/make/sysmk/t1/mk/sys.mk new file mode 100644 index 0000000..99b8ecc --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t1/mk/sys.mk @@ -0,0 +1,3 @@ +# $FreeBSD$ + +DASH_M_DOTDOTDOT=Found_WRONG_DotDotDot_sys_mk__with_C_before_m diff --git a/tools/regression/usr.bin/make/sysmk/t2/2/1/cleanup b/tools/regression/usr.bin/make/sysmk/t2/2/1/cleanup new file mode 100644 index 0000000..c3d58b7 --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t2/2/1/cleanup @@ -0,0 +1,3 @@ +# $FreeBSD$ + +rm -rf ${WORK_DIR}/../../../t0/2/1 diff --git a/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.status.1 b/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.status.1 new file mode 100644 index 0000000..573541a --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.status.1 @@ -0,0 +1 @@ +0 diff --git a/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.stderr.1 b/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.stderr.1 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.stderr.1 diff --git a/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.stdout.1 b/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.stdout.1 new file mode 100644 index 0000000..70f1be3 --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.stdout.1 @@ -0,0 +1 @@ +Found_DotDotDot_sys_mk__with_m_before_C diff --git a/tools/regression/usr.bin/make/sysmk/t2/2/1/test.t b/tools/regression/usr.bin/make/sysmk/t2/2/1/test.t new file mode 100644 index 0000000..2c4dff3 --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t2/2/1/test.t @@ -0,0 +1,19 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../../../common.sh + +# Description +DESC="Can we traverse up to / and find a 'mk/sys.mk' with -m -C?" + +# Run +TEST_N=1 +TEST_1="-m .../mk -C ../../../t0/2/1" +TEST_MAKE_DIRS="../../mk 755 ../../../t0/mk 755 ../../../t0/2/1 755" +TEST_COPY_FILES="../../mk/sys.mk 644 ../../../t0/mk/sys.mk 644 ../../../t0/2/1/Makefile 644" +TEST_CLEAN_FILES="../../../t0/2/1" +TEST_CLEANUP=clean-special + +eval_cmd $* diff --git a/tools/regression/usr.bin/make/sysmk/t2/mk/sys.mk b/tools/regression/usr.bin/make/sysmk/t2/mk/sys.mk new file mode 100644 index 0000000..55632fd --- /dev/null +++ b/tools/regression/usr.bin/make/sysmk/t2/mk/sys.mk @@ -0,0 +1,3 @@ +# $FreeBSD$ + +DASH_M_DOTDOTDOT=Found_DotDotDot_sys_mk__with_m_before_C |