Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
- Fix for default mtree style
- Update libelf
- Importing libexecinfo
- Resynchronize GCC, mpc, gmp, mpfr
- build.sh: Replace params with show-params.
This has been done as the make target has been renamed in the same
way, while a new target named params has been added. This new
target generates a file containing all the parameters, instead of
printing it on the console.
- Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
get getservbyport() out of the inner loop
Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.34 2012/06/19 23:25:53 sjg Exp $
|
||||
# $NetBSD: Makefile,v 1.38 2013/08/28 21:56:50 sjg Exp $
|
||||
#
|
||||
# Unit tests for make(1)
|
||||
# The main targets are:
|
||||
@@ -24,6 +24,7 @@ SUBFILES= \
|
||||
error \
|
||||
export \
|
||||
export-all \
|
||||
export-env \
|
||||
doterror \
|
||||
dotwait \
|
||||
forloop \
|
||||
@@ -36,9 +37,11 @@ SUBFILES= \
|
||||
modorder \
|
||||
modts \
|
||||
modword \
|
||||
order \
|
||||
phony-end \
|
||||
posix \
|
||||
qequals \
|
||||
sunshcmd \
|
||||
sysv \
|
||||
ternary \
|
||||
unexport \
|
||||
@@ -48,6 +51,7 @@ SUBFILES= \
|
||||
all: ${SUBFILES}
|
||||
|
||||
flags.doterror=
|
||||
flags.order=-j1
|
||||
|
||||
# the tests are actually done with sub-makes.
|
||||
.PHONY: ${SUBFILES}
|
||||
@@ -76,7 +80,7 @@ LANG= C
|
||||
test:
|
||||
@echo "${TEST_MAKE} -f ${MAKEFILE} > ${.TARGET}.out 2>&1"
|
||||
@cd ${.OBJDIR} && ${TEST_MAKE} -f ${MAKEFILE} 2>&1 | \
|
||||
${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}:,make:,' \
|
||||
${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}[^:]*:,make:,' \
|
||||
-e '/stopped/s, /.*, unit-tests,' \
|
||||
-e 's,${.CURDIR:C/\./\\\./g}/,,g' \
|
||||
-e 's,${UNIT_TESTS:C/\./\\\./g}/,,g' > ${.TARGET}.out || { \
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# $Id: export-env,v 1.1 2013/03/22 16:36:46 sjg Exp $
|
||||
|
||||
# our normal .export, subsequent changes affect the environment
|
||||
UT_TEST=this
|
||||
.export UT_TEST
|
||||
UT_TEST:= ${.PARSEFILE}
|
||||
|
||||
# not so with .export-env
|
||||
UT_ENV=exported
|
||||
.export-env UT_ENV
|
||||
UT_ENV=not-exported
|
||||
|
||||
# gmake style export goes further; affects nothing but the environment
|
||||
UT_EXP=before-export
|
||||
export UT_EXP=exported
|
||||
UT_EXP=not-exported
|
||||
|
||||
all:
|
||||
@echo make:; ${UT_TEST UT_ENV UT_EXP:L:@v@echo $v=${$v};@}
|
||||
@echo env:; ${UT_TEST UT_ENV UT_EXP:L:@v@echo $v=$${$v};@}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# $NetBSD: order,v 1.1 2012/11/09 19:08:28 sjg Exp $
|
||||
|
||||
# Test that .ORDER is handled correctly.
|
||||
# The explicit dependency the.o: the.h will make us examine the.h
|
||||
# the .ORDER will prevent us building it immediately,
|
||||
# we should then examine the.c rather than stop.
|
||||
|
||||
all: the.o
|
||||
|
||||
.ORDER: the.c the.h
|
||||
|
||||
the.c the.h:
|
||||
@echo Making $@
|
||||
|
||||
.SUFFIXES: .o .c
|
||||
|
||||
.c.o:
|
||||
@echo Making $@ from $?
|
||||
|
||||
the.o: the.h
|
||||
@@ -0,0 +1,10 @@
|
||||
BYECMD = echo bye
|
||||
LATERCMD = echo later
|
||||
TEST1 :sh = echo hello
|
||||
TEST2 :sh = ${BYECMD}
|
||||
TEST3 = ${LATERCMD:sh}
|
||||
|
||||
all:
|
||||
@echo "TEST1=${TEST1}"
|
||||
@echo "TEST2=${TEST2}"
|
||||
@echo "TEST3=${TEST3}"
|
||||
@@ -43,6 +43,14 @@ UT_OK=good
|
||||
UT_OKDIR=unit-tests
|
||||
UT_TEST=export-all
|
||||
UT_ZOO=hoopie
|
||||
make:
|
||||
UT_TEST=export-env
|
||||
UT_ENV=not-exported
|
||||
UT_EXP=not-exported
|
||||
env:
|
||||
UT_TEST=export-env
|
||||
UT_ENV=exported
|
||||
UT_EXP=exported
|
||||
At first, I am
|
||||
happy
|
||||
and now: sad
|
||||
@@ -310,6 +318,9 @@ LIST:tw:C/ /,/g="one two three four five six"
|
||||
LIST:tw:C/ /,/1g="one two three four five six"
|
||||
LIST:tw:tW:C/ /,/="one,two three four five six"
|
||||
LIST:tW:tw:C/ /,/="one two three four five six"
|
||||
Making the.c
|
||||
Making the.h
|
||||
Making the.o from the.h the.c
|
||||
.TARGET="phony" .PREFIX="phony" .IMPSRC=""
|
||||
.TARGET="all" .PREFIX="all" .IMPSRC=""
|
||||
.TARGET="ok" .PREFIX="ok" .IMPSRC=""
|
||||
@@ -338,6 +349,9 @@ Now we expect an error...
|
||||
*** Error code 1 (continuing)
|
||||
`all' not remade because of errors.
|
||||
V.i386 ?= OK
|
||||
TEST1=hello
|
||||
TEST2=bye
|
||||
TEST3=later
|
||||
FOOBAR =
|
||||
FOOBAR = foobar fubar
|
||||
fun
|
||||
|
||||
Reference in New Issue
Block a user