head	1.9;
access;
symbols
	RELENG_9:1.9.0.2;
locks; strict;
comment	@# @;


1.9
date	2013.06.06.00.29.03;	author svnexp;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	2013.05.21.00.36.03;	author svnexp;	state Exp;
branches;
next	1.7;

1.7
date	2013.04.03.00.46.16;	author svnexp;	state Exp;
branches;
next	1.6;

1.6
date	2013.02.02.00.55.37;	author svnexp;	state Exp;
branches;
next	1.5;

1.5
date	2012.11.17.04.43.43;	author svnexp;	state Exp;
branches;
next	1.4;

1.4
date	2012.11.17.01.54.14;	author svnexp;	state Exp;
branches;
next	1.3;

1.3
date	2012.10.25.23.18.05;	author sjg;	state Exp;
branches;
next	1.2;

1.2
date	2012.10.19.19.56.17;	author marcel;	state Exp;
branches;
next	1.1;

1.1
date	2012.10.06.19.19.21;	author marcel;	state Exp;
branches;
next	;

1.9.2.1
date	2013.06.06.00.29.03;	author svnexp;	state dead;
branches;
next	1.9.2.2;

1.9.2.2
date	2014.03.16.00.01.48;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.9
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251422
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# This is a generated file, do NOT edit!
# See contrib/bmake/bsd.after-import.mk
#
# $FreeBSD: head/usr.bin/bmake/Makefile 251422 2013-06-05 16:12:50Z 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.14 2013/06/05 04:03:22 sjg Exp $

# Base version on src date
MAKE_VERSION= 20130604

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

# 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

@


1.9.2.1
log
@file Makefile was added on branch RELENG_9 on 2014-03-16 00:01:48 +0000
@
text
@d1 176
@


1.9.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/263212
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 177
# This is a generated file, do NOT edit!
# See contrib/bmake/bsd.after-import.mk
#
# $FreeBSD: stable/9/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

@


1.8
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/250837
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d4 1
a4 1
# $FreeBSD: head/usr.bin/bmake/Makefile 250837 2013-05-20 22:51:11Z sjg $
d17 1
a17 1
#	$Id: Makefile,v 1.12 2013/05/20 16:05:10 sjg Exp $
d20 1
a20 1
MAKE_VERSION= 20130520
@


1.7
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249033
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d4 1
a4 1
# $FreeBSD: head/usr.bin/bmake/Makefile 249033 2013-04-02 21:31:11Z sjg $
d17 1
a17 1
#	$Id: Makefile,v 1.10 2013/03/31 05:57:19 sjg Exp $
d20 1
a20 1
MAKE_VERSION= 20130330
@


1.6
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/246223
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d4 1
a4 1
# $FreeBSD: head/usr.bin/bmake/Makefile 246223 2013-02-01 22:55:27Z sjg $
d17 1
a17 1
#	$Id: Makefile,v 1.5 2013/01/28 19:31:58 sjg Exp $
d20 1
a20 1
MAKE_VERSION= 20130123
@


1.5
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/243115
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r243115 | sjg | 2012-11-16 01:37:25 +0000 (Fri, 16 Nov 2012) | 5 lines
## SVN ##
## SVN ## Merge bmake-20121111
## SVN ## Also pay attention to MK_SHARED_TOOLCHAIN.
## SVN ##
## SVN ## Approved by:	marcel (mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d4 1
a4 1
# $FreeBSD: head/usr.bin/bmake/Makefile 243115 2012-11-16 01:37:25Z sjg $
d13 5
a17 2
#	$NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $
#	@@(#)Makefile	5.2 (Berkeley) 12/28/90
d19 2
a20 1
#	$Id: Makefile.in,v 1.178 2012/11/15 16:48:59 sjg Exp $
a22 15
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
d24 51
a74 3
# Base version on src date
MAKE_VERSION= 20121111
DEFAULT_SYS_PATH = .../share/mk:/usr/share/mk
d76 2
a77 10
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= 
d83 6
a88 3
USE_META = yes
.if ${USE_META} != "no"
SRCS+=	meta.c
d90 7
a100 1
.endif
a104 31
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

a107 8
.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
a108 1
CFLAGS_main.o+= "-DMACHINE=\"${MACHINE}\"" "-DMACHINE_ARCH=\"${MACHINE_ARCH}\""
d110 2
a111 1
EXTRACT_MAN=no
a112 1
MAN=${PROG}.1
d114 2
d123 1
d125 1
a125 1
	@@echo making ${PROG}.1
d130 2
a132 6

.if !empty(isBSD44:M${OS})
.if "${OS}" != "NetBSD" 
MAN1=${MAN}
.endif
MANTARGET?=man
d142 1
a142 12
.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
d144 1
a144 1
CPPFLAGS+= -DMAKE_NATIVE
d151 1
d153 5
a157 1
MANDIR= ${prefix}/man
a158 1
arch.o:	config.h
a161 25
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
a172 1
CLEANFILES+= bootstrap
@


1.4
log
@Switching exporter and resync
@
text
@d4 1
a4 1
# $FreeBSD: head/usr.bin/bmake/Makefile 242102 2012-10-25 23:18:05Z sjg $
d16 1
a16 1
#	$Id: Makefile.in,v 1.174 2012/10/10 18:46:24 sjg Exp $
d36 1
a36 1
MAKE_VERSION= 20121010
@


1.3
log
@SVN rev 242102 on 2012-10-25 23:18:05Z by sjg

Merge bmake-20121010

Approved by:	marcel (mentor)
@
text
@d4 1
a4 1
# $FreeBSD$
@


1.2
log
@SVN rev 241751 on 2012-10-19 19:56:17Z by marcel

Fix a bootstrapping problem where the first bmake (built by FreeBSD's
make) ended up being built with -DFORCE_MACHINE. This broke the lib32
built for amd64 & powerpc64.
This fix is comes with the next import of bmake, but is committed here
and now to minimize the exposure to the bug.

Submitted by:	Simon Gerraty <sjg@@juniper.net>
@
text
@d16 1
a16 1
#	$Id: Makefile.in,v 1.170 2012/08/31 06:46:22 sjg Exp $
d36 1
a36 1
MAKE_VERSION= 20120831
d116 2
a117 5
${MAN}:	make.1
	@@echo making ${PROG}.1
	@@sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' -e '/^.Sh HISTORY/,$$d' ${srcdir}/make.1 > $@@
	@@(echo ".Sh HISTORY"; \
	echo ".Nm"; \
d120 8
a127 1
	echo It uses autoconf to facilitate portability to other platforms.) >> $@@
@


1.1
log
@SVN rev 241279 on 2012-10-06 19:19:21Z by marcel

Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE.  The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here.  The option will be removed in due time.

Submitted by:	Simon Gerraty (sjg@@juniper.net)
@
text
@d84 2
a86 3
# XXX not sure if we still want this given that configure
# lets us force or not the definition of MACHINE.
CFLAGS_main.o+= "-DFORCE_MACHINE=\"${MACHINE}\""
d97 1
a97 1
.if defined(.PARSEDIR)
@

