Makefile revision 241279
11556Srgrimes# This is a generated file, do NOT edit! 21556Srgrimes# See contrib/bmake/bsd.after-import.mk 31556Srgrimes# 41556Srgrimes# $FreeBSD: head/usr.bin/bmake/Makefile 241279 2012-10-06 19:19:21Z marcel $ 51556Srgrimes 61556Srgrimes.sinclude "Makefile.inc" 71556Srgrimes 81556SrgrimesSRCTOP?= ${.CURDIR:H:H} 91556Srgrimes 101556Srgrimes# look here first for config.h 111556SrgrimesCFLAGS+= -I${.CURDIR} 121556Srgrimes 131556Srgrimes# $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $ 141556Srgrimes# @(#)Makefile 5.2 (Berkeley) 12/28/90 151556Srgrimes 161556Srgrimes# $Id: Makefile.in,v 1.170 2012/08/31 06:46:22 sjg Exp $ 171556Srgrimes 181556SrgrimesPROG?= ${.CURDIR:T} 191556SrgrimesSRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ 201556Srgrimes make.c parse.c str.c suff.c targ.c trace.c var.c util.c 211556SrgrimesSRCS+= strlist.c 221556SrgrimesSRCS+= make_malloc.c 231556SrgrimesSRCS+= lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \ 241556Srgrimes lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \ 251556Srgrimes lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \ 261556Srgrimes lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \ 271556Srgrimes lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c 281556SrgrimesSRCS += lstPrev.c 291556Srgrimes 301556Srgrimes# you can use this Makefile if you have an earlier version of bmake. 311556Srgrimesprefix= /usr 321556Srgrimessrcdir= ${SRCTOP}/contrib/bmake 331556SrgrimesCC?= gcc 341556Srgrimes 351556Srgrimes# Base version on src date 3617987SpeterMAKE_VERSION= 20120831 3717988SpeterDEFAULT_SYS_PATH = .../share/mk:/usr/share/mk 381556Srgrimes 391556SrgrimesCPPFLAGS+= 401556SrgrimesCFLAGS+= ${CPPFLAGS} 411556SrgrimesCFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" 421556SrgrimesCFLAGS+= -I. -I${srcdir} -DHAVE_CONFIG_H ${XDEFS} -DMAKE_NATIVE 431556SrgrimesCFLAGS+= ${CFLAGS_${.TARGET:T}} 441556SrgrimesCFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} 451556SrgrimesCOPTS.main.c+= "-DMAKE_VERSION=\"${MAKE_VERSION}\"" 461556SrgrimesLDFLAGS= 471556SrgrimesLIBOBJS= ${LIBOBJDIR}stresep$U.o 481556SrgrimesLDADD= 491556Srgrimes 501556Srgrimes.if !empty(LIBOBJS) 511556SrgrimesSRCS+= ${LIBOBJS:T:.o=.c} 521556Srgrimes.endif 531556Srgrimes 541556SrgrimesUSE_META = yes 551556Srgrimes.if ${USE_META} != "no" 561556SrgrimesSRCS+= meta.c 571556SrgrimesCPPFLAGS+= -DUSE_META 581556SrgrimesFILEMON_H ?= /usr/include/dev/filemon/filemon.h 591556Srgrimes.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" 6017988SpeterCOPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} 611556Srgrimes.endif 621556Srgrimes.endif 631556Srgrimes 641556Srgrimes.PATH: ${srcdir} 651556Srgrimes.PATH: ${srcdir}/lst.lib 661556Srgrimes 671556SrgrimesOS!= uname -s 681556SrgrimesARCH!= uname -p 2>/dev/null || uname -m 691556Srgrimes 701556Srgrimes# list of OS's which are derrived from BSD4.4 711556SrgrimesisBSD44= NetBSD FreeBSD OpenBSD DragonFly 721556Srgrimes 731556Srgrimes.if ${OS} == "NetBSD" 741556Srgrimes# Don't set these for anyone else since we don't know what the effect may be. 751556Srgrimes# On FreeBSD WARNS=2 sets a bunch of -W flags that make does not handle. 761556SrgrimesWFORMAT= 1 771556SrgrimesWARNS=4 781556Srgrimes.NOPATH: bmake.cat1 791556Srgrimes.if make(install) && exists(${DESTDIR}/usr/share/doc) 801556SrgrimesSUBDIR= PSD.doc 811556Srgrimes.endif 8217987Speter.endif 831556Srgrimes 841556Srgrimes.if empty(isBSD44:M${OS}) 851556Srgrimes# XXX not sure if we still want this given that configure 86# lets us force or not the definition of MACHINE. 87CFLAGS_main.o+= "-DFORCE_MACHINE=\"${MACHINE}\"" 88MANTARGET=cat 89INSTALL?=${srcdir}/install-sh 90.if (${MACHINE} == "sun386") 91# even I don't have one of these anymore :-) 92CFLAGS+= -DPORTAR 93.elif (${MACHINE} != "sunos") 94SRCS+= sigcompat.c 95CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART 96.endif 97.endif 98.if defined(.PARSEDIR) 99.if make(obj) || make(clean) 100SUBDIR+= unit-tests 101.endif 102.endif 103 104# many systems use gcc these days 105CC_IS_GCC=yes 106.if ${CC_IS_GCC} == "yes" 107# problem with gcc3 108CFLAGS_var.o+= -Wno-cast-qual 109.endif 110 111CFLAGS_main.o+= "-DMACHINE=\"${MACHINE}\"" "-DMACHINE_ARCH=\"${MACHINE_ARCH}\"" 112 113EXTRACT_MAN=no 114 115MAN=${PROG}.1 116.if (${PROG} != "make") 117${MAN}: make.1 118 @echo making ${PROG}.1 119 @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' -e '/^.Sh HISTORY/,$$d' ${srcdir}/make.1 > $@ 120 @(echo ".Sh HISTORY"; \ 121 echo ".Nm"; \ 122 echo "is derived from NetBSD"; \ 123 echo ".Xr make 1 ."; \ 124 echo It uses autoconf to facilitate portability to other platforms.) >> $@ 125 126.endif 127 128.if !empty(isBSD44:M${OS}) 129.if "${OS}" != "NetBSD" 130MAN1=${MAN} 131.endif 132MANTARGET?=man 133.endif 134 135MANTARGET?= cat 136MANDEST?= ${MANDIR}/${MANTARGET}1 137 138.if ${MANTARGET} == "cat" 139_mfromdir=${srcdir} 140.endif 141 142.if exists(${srcdir}/../Makefile.inc) 143.include "${srcdir}/../Makefile.inc" 144.endif 145.sinclude <bsd.prog.mk> 146# sigh, FreeBSD at least includes bsd.subdir.mk via bsd.obj.mk 147# so the inclusion below, results in complaints about re-defined 148# targets. For NetBSD though we need to explicitly include it. 149.if defined(.PARSEDIR) 150.if defined(SUBDIR) && !target(${SUBDIR:[1]}) 151.sinclude <bsd.subdir.mk> 152.endif 153.endif 154 155CPPFLAGS+= -DMAKE_NATIVE 156COPTS.var.c += -Wno-cast-qual 157COPTS.job.c += -Wno-format-nonliteral 158COPTS.parse.c += -Wno-format-nonliteral 159COPTS.var.c += -Wno-format-nonliteral 160 161# Force these 162BINDIR= ${prefix}/bin 163MANDIR= ${prefix}/man 164 165arch.o: config.h 166# make sure that MAKE_VERSION gets updated. 167main.o: ${SRCS} ${MAKEFILE} 168 169MK?=${prefix}/share/mk 170MKSRC?=mk 171INSTALL?=${srcdir}/install-sh 172 173beforeinstall: 174 test -d ${DESTDIR}${BINDIR} || ${INSTALL} -m 775 -d ${DESTDIR}${BINDIR} 175 test -d ${DESTDIR}${MANDEST} || ${INSTALL} -m 775 -d ${DESTDIR}${MANDEST} 176 177# latest version of *.mk includes an installer. 178# you should not need to set USE_OS 179install-mk: 180.if exists(${MKSRC}/install-mk) 181 test -d ${DESTDIR}${MK} || ${INSTALL} -m 775 -d ${DESTDIR}${MK} 182 ${MKSRC}/install-mk -v -m 644 ${DESTDIR}${MK} ${USE_OS} 183.else 184 @echo need to unpack mk.tar.gz under ${srcdir} or set MKSRC; false 185.endif 186 187.ifdef TOOLDIR 188# this is a native netbsd build, 189# use libutil rather than the local emalloc etc. 190CPPFLAGS+= -DUSE_EMALLOC 191LDADD+=-lutil 192DPADD+=${LIBUTIL} 193.endif 194 195# A simple unit-test driver to help catch regressions 196accept test: 197 cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET} 198 199# override some simple things 200BINDIR= /usr/bin 201MANDIR= /usr/share/man/man 202 203# make sure we get this 204CFLAGS+= ${COPTS.${.IMPSRC:T}} 205CLEANFILES+= bootstrap 206 207after-import: ${SRCTOP}/contrib/bmake/bsd.after-import.mk 208 cd ${.CURDIR} && ${.MAKE} -f ${SRCTOP}/contrib/bmake/bsd.after-import.mk 209 210