[Midnightbsd-cvs] src [6787] trunk/usr.bin: depending on MK_BMAKE flag, turn on netbsd make or freebsd make.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Sep 28 10:08:57 EDT 2014
Revision: 6787
http://svnweb.midnightbsd.org/src/?rev=6787
Author: laffer1
Date: 2014-09-28 10:08:57 -0400 (Sun, 28 Sep 2014)
Log Message:
-----------
depending on MK_BMAKE flag, turn on netbsd make or freebsd make. If bmake is on, install freebsd make as fmake
Modified Paths:
--------------
trunk/usr.bin/Makefile
trunk/usr.bin/make/Makefile
Added Paths:
-----------
trunk/usr.bin/bmake/
trunk/usr.bin/bmake/Makefile
trunk/usr.bin/bmake/Makefile.config
trunk/usr.bin/bmake/Makefile.inc
trunk/usr.bin/bmake/config.h
trunk/usr.bin/bmake/unit-tests/
trunk/usr.bin/bmake/unit-tests/Makefile
Modified: trunk/usr.bin/Makefile
===================================================================
--- trunk/usr.bin/Makefile 2014-09-28 14:07:51 UTC (rev 6786)
+++ trunk/usr.bin/Makefile 2014-09-28 14:08:57 UTC (rev 6787)
@@ -278,8 +278,12 @@
.endif
.if ${MK_MAKE} != "no"
+.if ${MK_BMAKE} != "no"
+SUBDIR+= bmake
+.else
SUBDIR+= make
.endif
+.endif
.if ${MK_MAN_UTILS} != "no"
_makewhatis= makewhatis
@@ -359,4 +363,6 @@
SUBDIR:= ${SUBDIR:O}
+SUBDIR_PARALLEL=
+
.include <bsd.subdir.mk>
Added: trunk/usr.bin/bmake/Makefile
===================================================================
--- trunk/usr.bin/bmake/Makefile (rev 0)
+++ trunk/usr.bin/bmake/Makefile 2014-09-28 14:08:57 UTC (rev 6787)
@@ -0,0 +1,177 @@
+# 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 $
+
+.sinclude "Makefile.inc"
+
+SRCTOP?= ${.CURDIR:H:H}
+
+# look here first for config.h
+CFLAGS+= -I${.CURDIR}
+
+# for after-import
+CLEANDIRS+= FreeBSD
+CLEANFILES+= bootstrap
+
+# $Id: Makefile,v 1.20 2013/09/04 15:42:03 sjg Exp $
+
+# Base version on src date
+MAKE_VERSION= 20130904
+
+PROG?= ${.CURDIR:T}
+
+SRCS= \
+ arch.c \
+ buf.c \
+ compat.c \
+ cond.c \
+ dir.c \
+ for.c \
+ hash.c \
+ job.c \
+ main.c \
+ make.c \
+ make_malloc.c \
+ meta.c \
+ parse.c \
+ str.c \
+ strlist.c \
+ suff.c \
+ targ.c \
+ trace.c \
+ util.c \
+ var.c
+
+# from lst.lib/
+SRCS+= \
+ lstAppend.c \
+ lstAtEnd.c \
+ lstAtFront.c \
+ lstClose.c \
+ lstConcat.c \
+ lstDatum.c \
+ lstDeQueue.c \
+ lstDestroy.c \
+ lstDupl.c \
+ lstEnQueue.c \
+ lstFind.c \
+ lstFindFrom.c \
+ lstFirst.c \
+ lstForEach.c \
+ lstForEachFrom.c \
+ lstInit.c \
+ lstInsert.c \
+ lstIsAtEnd.c \
+ lstIsEmpty.c \
+ lstLast.c \
+ lstMember.c \
+ lstNext.c \
+ lstOpen.c \
+ lstPrev.c \
+ lstRemove.c \
+ lstReplace.c \
+ lstSucc.c
+
+# this file gets generated by configure
+.sinclude "Makefile.config"
+
+.if !empty(LIBOBJS)
+SRCS+= ${LIBOBJS:T:.o=.c}
+.endif
+
+# just in case
+prefix?= /usr
+srcdir?= ${.CURDIR}
+
+DEFAULT_SYS_PATH?= .../share/mk:${prefix}/share/mk
+
+CPPFLAGS+= -DUSE_META
+CFLAGS+= ${CPPFLAGS}
+CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\"
+CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE
+CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}}
+COPTS.main.c+= "-DMAKE_VERSION=\"${MAKE_VERSION}\""
+
+# meta mode can be useful even without filemon
+FILEMON_H ?= /usr/include/dev/filemon/filemon.h
+.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
+COPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
+.endif
+
+.PATH: ${srcdir}
+.PATH: ${srcdir}/lst.lib
+
+.if make(obj) || make(clean)
+SUBDIR+= unit-tests
+.endif
+
+
+MAN= ${PROG}.1
+MAN1= ${MAN}
+
+.if (${PROG} != "make")
+CLEANFILES+= my.history
+.if make(${MAN}) || !exists(${srcdir}/${MAN})
+my.history: ${MAKEFILE}
+ @(echo ".Nm"; \
+ echo "is derived from NetBSD"; \
+ echo ".Xr make 1 ."; \
+ echo "It uses autoconf to facilitate portability to other platforms."; \
+ echo ".Pp") > $@
+
+.NOPATH: ${MAN}
+${MAN}: make.1 my.history
+ @echo making $@
+ @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' \
+ -e '/^.Sh HISTORY/rmy.history' \
+ -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@
+
+all beforeinstall: ${MAN}
+_mfromdir=.
+.endif
+.endif
+
+MANTARGET?= cat
+MANDEST?= ${MANDIR}/${MANTARGET}1
+
+.if ${MANTARGET} == "cat"
+_mfromdir=${srcdir}
+.endif
+
+.include <bsd.prog.mk>
+
+CPPFLAGS+= -DMAKE_NATIVE -DHAVE_CONFIG_H
+COPTS.var.c += -Wno-cast-qual
+COPTS.job.c += -Wno-format-nonliteral
+COPTS.parse.c += -Wno-format-nonliteral
+COPTS.var.c += -Wno-format-nonliteral
+
+# Force these
+SHAREDIR= ${prefix}/share
+BINDIR= ${prefix}/bin
+MANDIR= ${SHAREDIR}/man
+
+.if !exists(.depend)
+${OBJS}: config.h
+.endif
+
+# make sure that MAKE_VERSION gets updated.
+main.o: ${SRCS} ${MAKEFILE}
+
+
+# A simple unit-test driver to help catch regressions
+accept test:
+ cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
+
+# 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}}
+
+after-import: ${SRCTOP}/contrib/bmake/bsd.after-import.mk
+ cd ${.CURDIR} && ${.MAKE} -f ${SRCTOP}/contrib/bmake/bsd.after-import.mk
+
Added: trunk/usr.bin/bmake/Makefile.config
===================================================================
--- trunk/usr.bin/bmake/Makefile.config (rev 0)
+++ trunk/usr.bin/bmake/Makefile.config 2014-09-28 14:08:57 UTC (rev 6787)
@@ -0,0 +1,21 @@
+# 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 $
+
+SRCTOP?= ${.CURDIR:H:H}
+
+# things set by configure
+
+prefix= /usr
+srcdir= ${SRCTOP}/contrib/bmake
+CC?= gcc
+DEFAULT_SYS_PATH= .../share/mk:/usr/share/mk
+
+CPPFLAGS+=
+CFLAGS+= ${CPPFLAGS} -DHAVE_CONFIG_H
+LDFLAGS=
+LIBOBJS= ${LIBOBJDIR}stresep$U.o
+LDADD=
+USE_META= yes
+FILEMON_H= /usr/include/dev/filemon/filemon.h
Added: trunk/usr.bin/bmake/Makefile.inc
===================================================================
--- trunk/usr.bin/bmake/Makefile.inc (rev 0)
+++ trunk/usr.bin/bmake/Makefile.inc 2014-09-28 14:08:57 UTC (rev 6787)
@@ -0,0 +1,25 @@
+# $FreeBSD: stable/10/usr.bin/bmake/Makefile.inc 250755 2013-05-17 22:18:27Z sjg $
+
+.include "bsd.own.mk"
+
+.if defined(.PARSEDIR)
+# make sure this is available to unit-tests/Makefile
+.export SRCTOP
+.endif
+
+# Sadly, we cannot assume bsd.own.mk did its job,
+# nor can we safely include the one we want
+.if !defined(WITHOUT_BMAKE)
+MK_BMAKE= yes
+.endif
+
+.if defined(MK_BMAKE) && ${MK_BMAKE} != "no"
+PROG= make
+.endif
+
+.if !defined(MK_SHARED_TOOLCHAIN) || ${MK_SHARED_TOOLCHAIN} == "no"
+NO_SHARED?= YES
+.endif
+
+WARNS=3
+CFLAGS+= -DNO_PWD_OVERRIDE
Added: trunk/usr.bin/bmake/config.h
===================================================================
--- trunk/usr.bin/bmake/config.h (rev 0)
+++ trunk/usr.bin/bmake/config.h 2014-09-28 14:08:57 UTC (rev 6787)
@@ -0,0 +1,324 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* Path of default shell */
+/* #undef DEFSHELL_CUSTOM */
+
+/* Shell spec to use by default */
+/* #undef DEFSHELL_INDEX */
+
+/* Define to 1 if you have the <ar.h> header file. */
+#define HAVE_AR_H 1
+
+/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
+ don't. */
+#define HAVE_DECL_SYS_SIGLIST 1
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the `dirname' function. */
+#define HAVE_DIRNAME 1
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* #undef HAVE_DOPRNT */
+
+/* Define to 1 if you have the `err' function. */
+#define HAVE_ERR 1
+
+/* Define to 1 if you have the `errx' function. */
+#define HAVE_ERRX 1
+
+/* Define to 1 if you have the <err.h> header file. */
+#define HAVE_ERR_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `fork' function. */
+#define HAVE_FORK 1
+
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define to 1 if you have the `getenv' function. */
+#define HAVE_GETENV 1
+
+/* Define to 1 if you have the `getopt' function. */
+#define HAVE_GETOPT 1
+
+/* Define to 1 if you have the `getwd' function. */
+#define HAVE_GETWD 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `killpg' function. */
+#define HAVE_KILLPG 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mmap' function. */
+#define HAVE_MMAP 1
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the <paths.h> header file. */
+#define HAVE_PATHS_H 1
+
+/* Define to 1 if you have the <poll.h> header file. */
+#define HAVE_POLL_H 1
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV 1
+
+/* Define to 1 if you have the <ranlib.h> header file. */
+#define HAVE_RANLIB_H 1
+
+/* Define to 1 if you have the `realpath' function. */
+#define HAVE_REALPATH 1
+
+/* Define to 1 if you have the `select' function. */
+#define HAVE_SELECT 1
+
+/* Define to 1 if you have the `setenv' function. */
+#define HAVE_SETENV 1
+
+/* Define to 1 if you have the `setpgid' function. */
+#define HAVE_SETPGID 1
+
+/* Define to 1 if you have the `setsid' function. */
+#define HAVE_SETSID 1
+
+/* Define to 1 if you have the `sigaction' function. */
+#define HAVE_SIGACTION 1
+
+/* Define to 1 if you have the `sigvec' function. */
+#define HAVE_SIGVEC 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `stresep' function. */
+/* #undef HAVE_STRESEP */
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcpy' function. */
+#define HAVE_STRLCPY 1
+
+/* Define to 1 if you have the `strsep' function. */
+#define HAVE_STRSEP 1
+
+/* Define to 1 if you have the `strtod' function. */
+#define HAVE_STRTOD 1
+
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
+/* Define to 1 if `struct stat' is a member of `st_rdev'. */
+#define HAVE_STRUCT_STAT_ST_RDEV 1
+
+/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use
+ `HAVE_STRUCT_STAT_ST_RDEV' instead. */
+#define HAVE_ST_RDEV 1
+
+/* Define to 1 if you have the `sysctl' function. */
+#define HAVE_SYSCTL 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#define HAVE_SYS_MMAN_H 1
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/sysctl.h> header file. */
+#define HAVE_SYS_SYSCTL_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#define HAVE_SYS_UIO_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `unsetenv' function. */
+#define HAVE_UNSETENV 1
+
+/* Define to 1 if you have the <utime.h> header file. */
+#define HAVE_UTIME_H 1
+
+/* Define to 1 if you have the `vfork' function. */
+#define HAVE_VFORK 1
+
+/* Define to 1 if you have the <vfork.h> header file. */
+/* #undef HAVE_VFORK_H */
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#define HAVE_VSNPRINTF 1
+
+/* Define to 1 if you have the `wait3' function. */
+#define HAVE_WAIT3 1
+
+/* Define to 1 if you have the `wait4' function. */
+#define HAVE_WAIT4 1
+
+/* Define to 1 if you have the `waitpid' function. */
+#define HAVE_WAITPID 1
+
+/* Define to 1 if you have the `warn' function. */
+#define HAVE_WARN 1
+
+/* Define to 1 if you have the `warnx' function. */
+#define HAVE_WARNX 1
+
+/* Define to 1 if `fork' works. */
+#define HAVE_WORKING_FORK 1
+
+/* Define to 1 if `vfork' works. */
+#define HAVE_WORKING_VFORK 1
+
+/* define if your compiler has __attribute__ */
+/* #undef HAVE___ATTRIBUTE__ */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "sjg at NetBSD.org"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "bmake"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "bmake 20140214"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "bmake"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "20140214"
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+/* #undef STAT_MACROS_BROKEN */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* #undef TM_IN_SYS_TIME */
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* # undef WORDS_BIGENDIAN */
+# endif
+#endif
+
+/* Define to 1 if on MINIX. */
+/* #undef _MINIX */
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* C99 function name */
+/* #undef __func__ */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `long int' if <sys/types.h> does not define. */
+/* #undef off_t */
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef pid_t */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define as `fork' if `vfork' does not work. */
+/* #undef vfork */
Added: trunk/usr.bin/bmake/unit-tests/Makefile
===================================================================
--- trunk/usr.bin/bmake/unit-tests/Makefile (rev 0)
+++ trunk/usr.bin/bmake/unit-tests/Makefile 2014-09-28 14:08:57 UTC (rev 6787)
@@ -0,0 +1,109 @@
+# 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 $
+
+SRCTOP?= ${.CURDIR:H:H:H}
+
+# $Id: Makefile.in,v 1.44 2013/08/28 22:09:29 sjg Exp $
+#
+# $NetBSD: Makefile,v 1.38 2013/08/28 21:56:50 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
+# 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.
+#
+
+srcdir= ${SRCTOP}/contrib/bmake/unit-tests
+
+.MAIN: all
+
+UNIT_TESTS:= ${srcdir}
+
+# Simple sub-makefiles - we run them as a black box
+# keep the list sorted.
+SUBFILES= \
+ comment \
+ cond1 \
+ error \
+ export \
+ export-all \
+ export-env \
+ doterror \
+ dotwait \
+ forloop \
+ forsubst \
+ hash \
+ misc \
+ moderrs \
+ modmatch \
+ modmisc \
+ modorder \
+ modts \
+ modword \
+ order \
+ phony-end \
+ posix \
+ qequals \
+ sunshcmd \
+ sysv \
+ ternary \
+ unexport \
+ unexport-env \
+ varcmd
+
+all: ${SUBFILES}
+
+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}/$@
+
+clean:
+ rm -f *.out *.fail *.core
+
+.sinclude <bsd.obj.mk>
+
+TEST_MAKE?= ${.MAKE}
+TOOL_SED?= sed
+TOOL_TR?= tr
+TOOL_DIFF?= diff
+DIFF_FLAGS?= -u
+
+.if defined(.PARSEDIR)
+# ensure consistent results from sort(1)
+LC_ALL= C
+LANG= C
+.export LANG LC_ALL
+.endif
+
+# The driver.
+# 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
+
+accept:
+ mv test.out ${srcdir}/test.exp
+
Modified: trunk/usr.bin/make/Makefile
===================================================================
--- trunk/usr.bin/make/Makefile 2014-09-28 14:07:51 UTC (rev 6786)
+++ trunk/usr.bin/make/Makefile 2014-09-28 14:08:57 UTC (rev 6787)
@@ -112,4 +112,12 @@
.error "MAKE_SHELL must be set to one of \"csh\", \"sh\" or \"ksh\"."
.endif
+.if defined(MK_BMAKE) && ${MK_BMAKE} != "no"
+# if we are here we don't want this called 'make'
+PROG= fmake
+fmake.1: make.1
+ cp ${.ALLSRC} ${.TARGET}
+.endif
+
+
.include <bsd.prog.mk>
More information about the Midnightbsd-cvs
mailing list