diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2013-02-08 16:10:16 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2013-02-08 16:10:16 +0000 |
commit | d9a447559bc04121f7c6682e64abe67efa154864 (patch) | |
tree | b2f038222ff8a70f687652441df00d2b564c8abe /usr.bin/bmake | |
parent | 3cbf5f97aafc2b249c509ee1162c47c9b28e591e (diff) | |
parent | fbda3d5daeeb730a49d025b614b35a32f0319718 (diff) | |
download | src-d9a447559bc04121f7c6682e64abe67efa154864.tar.gz src-d9a447559bc04121f7c6682e64abe67efa154864.zip |
Sync with HEAD.
Notes
Notes:
svn path=/projects/bmake/; revision=246555
Diffstat (limited to 'usr.bin/bmake')
-rw-r--r-- | usr.bin/bmake/Makefile | 216 | ||||
-rw-r--r-- | usr.bin/bmake/Makefile.config | 21 | ||||
-rw-r--r-- | usr.bin/bmake/Makefile.inc | 4 | ||||
-rw-r--r-- | usr.bin/bmake/config.h | 6 | ||||
-rw-r--r-- | usr.bin/bmake/unit-tests/Makefile | 8 |
5 files changed, 124 insertions, 131 deletions
diff --git a/usr.bin/bmake/Makefile b/usr.bin/bmake/Makefile index 44ce56f3e168..6cac1ec5c15e 100644 --- a/usr.bin/bmake/Makefile +++ b/usr.bin/bmake/Makefile @@ -10,109 +10,109 @@ SRCTOP?= ${.CURDIR:H:H} # look here first for config.h CFLAGS+= -I${.CURDIR} -# $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $ -# @(#)Makefile 5.2 (Berkeley) 12/28/90 - -# $Id: Makefile.in,v 1.174 2012/10/10 18:46:24 sjg Exp $ +# for after-import +CLEANDIRS+= FreeBSD +CLEANFILES+= bootstrap -PROG?= ${.CURDIR:T} -SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ - make.c parse.c str.c suff.c targ.c trace.c var.c util.c -SRCS+= strlist.c -SRCS+= make_malloc.c -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 lstRemove.c lstReplace.c lstSucc.c -SRCS += lstPrev.c - -# you can use this Makefile if you have an earlier version of bmake. -prefix= /usr -srcdir= ${SRCTOP}/contrib/bmake -CC?= gcc +# $Id: Makefile,v 1.5 2013/01/28 19:31:58 sjg Exp $ # Base version on src date -MAKE_VERSION= 20121010 -DEFAULT_SYS_PATH = .../share/mk:/usr/share/mk +MAKE_VERSION= 20130123 -CPPFLAGS+= -CFLAGS+= ${CPPFLAGS} -CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" -CFLAGS+= -I. -I${srcdir} -DHAVE_CONFIG_H ${XDEFS} -DMAKE_NATIVE -CFLAGS+= ${CFLAGS_${.TARGET:T}} -CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} -COPTS.main.c+= "-DMAKE_VERSION=\"${MAKE_VERSION}\"" -LDFLAGS= -LIBOBJS= ${LIBOBJDIR}stresep$U.o -LDADD= +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 -USE_META = yes -.if ${USE_META} != "no" -SRCS+= meta.c +# 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 -.endif .PATH: ${srcdir} .PATH: ${srcdir}/lst.lib -OS!= uname -s -ARCH!= uname -p 2>/dev/null || uname -m - -# list of OS's which are derrived from BSD4.4 -isBSD44= NetBSD FreeBSD OpenBSD DragonFly - -.if ${OS} == "NetBSD" -# Don't set these for anyone else since we don't know what the effect may be. -# On FreeBSD WARNS=2 sets a bunch of -W flags that make does not handle. -WFORMAT= 1 -WARNS=4 -.NOPATH: bmake.cat1 -.if make(install) && exists(${DESTDIR}/usr/share/doc) -SUBDIR= PSD.doc -.endif -.endif - -.if defined(.PARSEDIR) -# we cannot rely on anything but bmake to parse this correctly. -.if empty(isBSD44:M${OS}) -MANTARGET=cat -INSTALL?=${srcdir}/install-sh -.if (${MACHINE} == "sun386") -# even I don't have one of these anymore :-) -CFLAGS+= -DPORTAR -.elif (${MACHINE} != "sunos") -SRCS+= sigcompat.c -CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART -.endif -.endif - .if make(obj) || make(clean) SUBDIR+= unit-tests .endif -.endif - -# many systems use gcc these days -CC_IS_GCC=yes -.if ${CC_IS_GCC} == "yes" -# problem with gcc3 -CFLAGS_var.o+= -Wno-cast-qual -.endif -CFLAGS_main.o+= "-DMACHINE=\"${MACHINE}\"" "-DMACHINE_ARCH=\"${MACHINE_ARCH}\"" -EXTRACT_MAN=no +MAN= ${PROG}.1 +MAN1= ${MAN} -MAN=${PROG}.1 .if (${PROG} != "make") +CLEANFILES+= my.history +.if make(${MAN}) || !exists(${srcdir}/${MAN}) my.history: ${MAKEFILE} @(echo ".Nm"; \ echo "is derived from NetBSD"; \ @@ -120,19 +120,16 @@ my.history: ${MAKEFILE} echo "It uses autoconf to facilitate portability to other platforms."; \ echo ".Pp") > $@ +.NOPATH: ${MAN} ${MAN}: make.1 my.history - @echo making ${PROG}.1 + @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 - -.if !empty(isBSD44:M${OS}) -.if "${OS}" != "NetBSD" -MAN1=${MAN} -.endif -MANTARGET?=man .endif MANTARGET?= cat @@ -142,58 +139,26 @@ MANDEST?= ${MANDIR}/${MANTARGET}1 _mfromdir=${srcdir} .endif -.if exists(${srcdir}/../Makefile.inc) -.include "${srcdir}/../Makefile.inc" -.endif -.sinclude <bsd.prog.mk> -# sigh, FreeBSD at least includes bsd.subdir.mk via bsd.obj.mk -# so the inclusion below, results in complaints about re-defined -# targets. For NetBSD though we need to explicitly include it. -.if defined(.PARSEDIR) -.if defined(SUBDIR) && !target(${SUBDIR:[1]}) -.sinclude <bsd.subdir.mk> -.endif -.endif +.include <bsd.prog.mk> -CPPFLAGS+= -DMAKE_NATIVE +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= ${prefix}/man +MANDIR= ${SHAREDIR}/man + +.if !exists(.depend) +${OBJS}: config.h +.endif -arch.o: config.h # make sure that MAKE_VERSION gets updated. main.o: ${SRCS} ${MAKEFILE} -MK?=${prefix}/share/mk -MKSRC?=mk -INSTALL?=${srcdir}/install-sh - -beforeinstall: - test -d ${DESTDIR}${BINDIR} || ${INSTALL} -m 775 -d ${DESTDIR}${BINDIR} - test -d ${DESTDIR}${MANDEST} || ${INSTALL} -m 775 -d ${DESTDIR}${MANDEST} - -# latest version of *.mk includes an installer. -# you should not need to set USE_OS -install-mk: -.if exists(${MKSRC}/install-mk) - test -d ${DESTDIR}${MK} || ${INSTALL} -m 775 -d ${DESTDIR}${MK} - ${MKSRC}/install-mk -v -m 644 ${DESTDIR}${MK} ${USE_OS} -.else - @echo need to unpack mk.tar.gz under ${srcdir} or set MKSRC; false -.endif - -.ifdef TOOLDIR -# this is a native netbsd build, -# use libutil rather than the local emalloc etc. -CPPFLAGS+= -DUSE_EMALLOC -LDADD+=-lutil -DPADD+=${LIBUTIL} -.endif # A simple unit-test driver to help catch regressions accept test: @@ -205,7 +170,6 @@ MANDIR= /usr/share/man/man # make sure we get this CFLAGS+= ${COPTS.${.IMPSRC:T}} -CLEANFILES+= bootstrap after-import: ${SRCTOP}/contrib/bmake/bsd.after-import.mk cd ${.CURDIR} && ${.MAKE} -f ${SRCTOP}/contrib/bmake/bsd.after-import.mk diff --git a/usr.bin/bmake/Makefile.config b/usr.bin/bmake/Makefile.config new file mode 100644 index 000000000000..e4c4d3daae22 --- /dev/null +++ b/usr.bin/bmake/Makefile.config @@ -0,0 +1,21 @@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# +# $FreeBSD$ + +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 diff --git a/usr.bin/bmake/Makefile.inc b/usr.bin/bmake/Makefile.inc index 4b126c77f887..c8ca110f933c 100644 --- a/usr.bin/bmake/Makefile.inc +++ b/usr.bin/bmake/Makefile.inc @@ -11,4 +11,8 @@ PROG= make .endif +.if ${MK_SHARED_TOOLCHAIN} == "no" +NO_SHARED?= YES +.endif + WARNS=3 diff --git a/usr.bin/bmake/config.h b/usr.bin/bmake/config.h index 64777b8d625f..32026c71bfff 100644 --- a/usr.bin/bmake/config.h +++ b/usr.bin/bmake/config.h @@ -1,6 +1,6 @@ +/* $FreeBSD$ */ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.in by autoheader. */ -/* $FreeBSD$ */ /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ @@ -230,7 +230,7 @@ #define PACKAGE_NAME "bmake" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "bmake 20120620" +#define PACKAGE_STRING "bmake 20121212" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "bmake" @@ -239,7 +239,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "20120620" +#define PACKAGE_VERSION "20121212" /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void diff --git a/usr.bin/bmake/unit-tests/Makefile b/usr.bin/bmake/unit-tests/Makefile index c22dbc5c198d..0b9db1e93b58 100644 --- a/usr.bin/bmake/unit-tests/Makefile +++ b/usr.bin/bmake/unit-tests/Makefile @@ -5,9 +5,9 @@ SRCTOP?= ${.CURDIR:H:H:H} -# $Id: Makefile.in,v 1.38 2012/06/19 23:38:48 sjg Exp $ +# $Id: Makefile.in,v 1.40 2012/12/28 21:28:19 sjg Exp $ # -# $NetBSD: Makefile,v 1.34 2012/06/19 23:25:53 sjg Exp $ +# $NetBSD: Makefile,v 1.35 2012/11/09 19:08:28 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -47,6 +47,7 @@ SUBFILES= \ modorder \ modts \ modword \ + order \ phony-end \ posix \ qequals \ @@ -59,6 +60,7 @@ SUBFILES= \ all: ${SUBFILES} flags.doterror= +flags.order=-j1 # the tests are actually done with sub-makes. .PHONY: ${SUBFILES} @@ -77,10 +79,12 @@ 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' |