[Midnightbsd-cvs] src [9622] trunk/usr.bin/bmake: update to 20151201
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Oct 6 10:44:06 EDT 2017
Revision: 9622
http://svnweb.midnightbsd.org/src/?rev=9622
Author: laffer1
Date: 2017-10-06 10:44:06 -0400 (Fri, 06 Oct 2017)
Log Message:
-----------
update to 20151201
Modified Paths:
--------------
trunk/usr.bin/bmake/Makefile
trunk/usr.bin/bmake/Makefile.config
trunk/usr.bin/bmake/config.h
trunk/usr.bin/bmake/unit-tests/Makefile
Modified: trunk/usr.bin/bmake/Makefile
===================================================================
--- trunk/usr.bin/bmake/Makefile 2017-10-06 14:43:55 UTC (rev 9621)
+++ trunk/usr.bin/bmake/Makefile 2017-10-06 14:44:06 UTC (rev 9622)
@@ -1,7 +1,7 @@
# This is a generated file, do NOT edit!
# See contrib/bmake/bsd.after-import.mk
#
-# $FreeBSD: stable/10/usr.bin/bmake/Makefile 255463 2013-09-10 23:31:38Z sjg $
+# $FreeBSD: stable/10/usr.bin/bmake/Makefile 293174 2016-01-04 20:05:40Z sjg $
.sinclude "Makefile.inc"
@@ -14,10 +14,10 @@
CLEANDIRS+= FreeBSD
CLEANFILES+= bootstrap
-# $Id: Makefile,v 1.20 2013/09/04 15:42:03 sjg Exp $
+# $Id: Makefile,v 1.49 2015/12/20 22:54:40 sjg Exp $
# Base version on src date
-MAKE_VERSION= 20140620
+MAKE_VERSION= 20151220
PROG?= ${.CURDIR:T}
@@ -34,6 +34,7 @@
make.c \
make_malloc.c \
meta.c \
+ metachar.c \
parse.c \
str.c \
strlist.c \
@@ -84,7 +85,7 @@
prefix?= /usr
srcdir?= ${.CURDIR}
-DEFAULT_SYS_PATH?= .../share/mk:${prefix}/share/mk
+DEFAULT_SYS_PATH?= ${prefix}/share/mk
CPPFLAGS+= -DUSE_META
CFLAGS+= ${CPPFLAGS}
@@ -106,7 +107,6 @@
SUBDIR+= unit-tests
.endif
-
MAN= ${PROG}.1
MAN1= ${MAN}
@@ -148,9 +148,9 @@
COPTS.var.c += -Wno-format-nonliteral
# Force these
-SHAREDIR= ${prefix}/share
-BINDIR= ${prefix}/bin
-MANDIR= ${SHAREDIR}/man
+SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share}
+BINDIR= ${BINDIR.bmake:U${prefix}/bin}
+MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man}
.if !exists(.depend)
${OBJS}: config.h
@@ -167,7 +167,6 @@
# override some simple things
BINDIR= /usr/bin
MANDIR= /usr/share/man/man
-DEFAULT_SYS_PATH= /usr/share/mk
# make sure we get this
CFLAGS+= ${COPTS.${.IMPSRC:T}}
Modified: trunk/usr.bin/bmake/Makefile.config
===================================================================
--- trunk/usr.bin/bmake/Makefile.config 2017-10-06 14:43:55 UTC (rev 9621)
+++ trunk/usr.bin/bmake/Makefile.config 2017-10-06 14:44:06 UTC (rev 9622)
@@ -1,7 +1,7 @@
# This is a generated file, do NOT edit!
# See contrib/bmake/bsd.after-import.mk
#
-# $FreeBSD: stable/10/usr.bin/bmake/Makefile.config 246325 2013-02-04 17:41:17Z sjg $
+# $FreeBSD: stable/10/usr.bin/bmake/Makefile.config 276305 2014-12-27 16:43:22Z ngie $
SRCTOP?= ${.CURDIR:H:H}
Modified: trunk/usr.bin/bmake/config.h
===================================================================
--- trunk/usr.bin/bmake/config.h 2017-10-06 14:43:55 UTC (rev 9621)
+++ trunk/usr.bin/bmake/config.h 2017-10-06 14:44:06 UTC (rev 9622)
@@ -1,4 +1,4 @@
-/* $FreeBSD: stable/10/usr.bin/bmake/config.h 276305 2014-12-27 16:43:22Z ngie $ */
+/* $FreeBSD: stable/10/usr.bin/bmake/config.h 292068 2015-12-10 23:44:34Z sjg $ */
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.in by autoheader. */
@@ -61,6 +61,12 @@
/* Define to 1 if you have the `killpg' function. */
#define HAVE_KILLPG 1
+/* Define to 1 if you have the <libgen.h> header file. */
+#define HAVE_LIBGEN_H 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
@@ -160,6 +166,9 @@
*/
/* #undef HAVE_SYS_NDIR_H */
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
/* Define to 1 if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
@@ -236,7 +245,7 @@
#define PACKAGE_NAME "bmake"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "bmake 20140214"
+#define PACKAGE_STRING "bmake 20151022"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "bmake"
@@ -245,7 +254,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "20140214"
+#define PACKAGE_VERSION "20151022"
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
@@ -306,6 +315,11 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
/* #undef _POSIX_SOURCE */
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+/* #undef _UINT32_T */
+
/* C99 function name */
/* #undef __func__ */
@@ -321,5 +335,9 @@
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+/* #undef uint32_t */
+
/* Define as `fork' if `vfork' does not work. */
/* #undef vfork */
Modified: trunk/usr.bin/bmake/unit-tests/Makefile
===================================================================
--- trunk/usr.bin/bmake/unit-tests/Makefile 2017-10-06 14:43:55 UTC (rev 9621)
+++ trunk/usr.bin/bmake/unit-tests/Makefile 2017-10-06 14:44:06 UTC (rev 9622)
@@ -1,24 +1,25 @@
# This is a generated file, do NOT edit!
# See contrib/bmake/bsd.after-import.mk
#
-# $FreeBSD: stable/10/usr.bin/bmake/unit-tests/Makefile 255253 2013-09-05 15:57:26Z sjg $
+# $FreeBSD: stable/10/usr.bin/bmake/unit-tests/Makefile 292068 2015-12-10 23:44:34Z sjg $
SRCTOP?= ${.CURDIR:H:H:H}
-# $Id: Makefile.in,v 1.44 2013/08/28 22:09:29 sjg Exp $
+# $Id: Makefile.in,v 1.48 2015/12/07 04:06:29 sjg Exp $
#
-# $NetBSD: Makefile,v 1.38 2013/08/28 21:56:50 sjg Exp $
+# $NetBSD: Makefile,v 1.52 2015/05/05 21:51:09 sjg Exp $
#
# Unit tests for make(1)
# The main targets are:
#
# all: run all the tests
-# test: run 'all', capture output and compare to expected results
+# test: run 'all', and compare to expected results
# accept: move generated output to expected results
#
# Adding a test case.
# Each feature should get its own set of tests in its own suitably
-# named makefile which should be added to SUBFILES to hook it in.
+# named makefile (*.mk), with its own set of expected results (*.exp),
+# and it should be added to the TESTNAMES list.
#
srcdir= ${SRCTOP}/contrib/bmake/unit-tests
@@ -26,12 +27,14 @@
.MAIN: all
UNIT_TESTS:= ${srcdir}
+.PATH: ${UNIT_TESTS}
-# Simple sub-makefiles - we run them as a black box
-# keep the list sorted.
-SUBFILES= \
+# Each test is in a sub-makefile.
+# Keep the list sorted.
+TESTNAMES= \
comment \
cond1 \
+ cond2 \
error \
export \
export-all \
@@ -49,7 +52,6 @@
modts \
modword \
order \
- phony-end \
posix \
qequals \
sunshcmd \
@@ -57,24 +59,37 @@
ternary \
unexport \
unexport-env \
- varcmd
+ varcmd \
+ varmisc \
+ varshell
-all: ${SUBFILES}
+# these tests were broken by referting POSIX chanegs
+STRICT_POSIX_TESTS = \
+ escape \
+ impsrc \
+ phony-end \
+ posix1 \
+ suffixes
+# Override make flags for certain tests
flags.doterror=
flags.order=-j1
-# the tests are actually done with sub-makes.
-.PHONY: ${SUBFILES}
-.PRECIOUS: ${SUBFILES}
-${SUBFILES}:
- -@${.MAKE} ${flags.$@:U-k} -f ${UNIT_TESTS}/$@
+OUTFILES= ${TESTNAMES:S/$/.out/}
+all: ${OUTFILES}
+
+CLEANFILES += *.rawout *.out *.status *.tmp *.core *.tmp
+CLEANFILES += obj*.[och] lib*.a # posix1.mk
+CLEANFILES += issue* .[ab]* # suffixes.mk
+CLEANRECURSIVE += dir dummy # posix1.mk
+
clean:
- rm -f *.out *.fail *.core
+ rm -f ${CLEANFILES}
+.if !empty(CLEANRECURSIVE)
+ rm -rf ${CLEANRECURSIVE}
+.endif
-.sinclude <bsd.obj.mk>
-
TEST_MAKE?= ${.MAKE}
TOOL_SED?= sed
TOOL_TR?= tr
@@ -88,22 +103,56 @@
.export LANG LC_ALL
.endif
-# The driver.
+# some tests need extra post-processing
+SED_CMDS.varshell = -e 's,^[a-z]*sh: ,,' \
+ -e '/command/s,No such.*,not found,'
+
+# the tests are actually done with sub-makes.
+.SUFFIXES: .mk .rawout .out
+.mk.rawout:
+ @echo ${TEST_MAKE} ${flags.${.TARGET:R}:U-k} -f ${.IMPSRC}
+ - at cd ${.OBJDIR} && \
+ { ${TEST_MAKE} ${flags.${.TARGET:R}:U-k} -f ${.IMPSRC} \
+ 2>&1 ; echo $$? >${.TARGET:R}.status ; } > ${.TARGET}.tmp
+ @mv ${.TARGET}.tmp ${.TARGET}
+
# We always pretend .MAKE was called 'make'
# and strip ${.CURDIR}/ from the output
# and replace anything after 'stopped in' with unit-tests
# so the results can be compared.
-test:
- @echo "${TEST_MAKE} -f ${MAKEFILE} > ${.TARGET}.out 2>&1"
- @cd ${.OBJDIR} && ${TEST_MAKE} -f ${MAKEFILE} 2>&1 | \
- ${TOOL_TR} -d '\015' | \
- ${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 || { \
- tail ${.TARGET}.out; mv ${.TARGET}.out ${.TARGET}.fail; exit 1; }
- ${TOOL_DIFF} ${DIFF_FLAGS} ${UNIT_TESTS}/${.TARGET}.exp ${.TARGET}.out
+.rawout.out:
+ @echo postprocess ${.TARGET}
+ @${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}[][0-9]*:,make:,' \
+ -e 's,${TEST_MAKE:C/\./\\\./g},make,' \
+ -e '/stopped/s, /.*, unit-tests,' \
+ -e 's,${.CURDIR:C/\./\\\./g}/,,g' \
+ -e 's,${UNIT_TESTS:C/\./\\\./g}/,,g' ${SED_CMDS.${.TARGET:T:R}} \
+ < ${.IMPSRC} > ${.TARGET}.tmp
+ @echo "exit status `cat ${.TARGET:R}.status`" >> ${.TARGET}.tmp
+ @mv ${.TARGET}.tmp ${.TARGET}
+# Compare all output files
+test: ${OUTFILES} .PHONY
+ @failed= ; \
+ for test in ${TESTNAMES}; do \
+ ${TOOL_DIFF} ${DIFF_FLAGS} ${UNIT_TESTS}/$${test}.exp $${test}.out \
+ || failed="$${failed}$${failed:+ }$${test}" ; \
+ done ; \
+ if [ -n "$${failed}" ]; then \
+ echo "Failed tests: $${failed}" ; false ; \
+ else \
+ echo "All tests passed" ; \
+ fi
+
accept:
- mv test.out ${srcdir}/test.exp
+ @for test in ${TESTNAMES}; do \
+ cmp -s ${UNIT_TESTS}/$${test}.exp $${test}.out \
+ || { echo "Replacing $${test}.exp" ; \
+ cp $${test}.out ${UNIT_TESTS}/$${test}.exp ; } \
+ done
+.if exists(${TEST_MAKE})
+${TESTNAMES:S/$/.rawout/}: ${TEST_MAKE}
+.endif
+
+.sinclude <bsd.obj.mk>
More information about the Midnightbsd-cvs
mailing list