1241279Smarcel# This is a generated file, do NOT edit! 2241279Smarcel# See contrib/bmake/bsd.after-import.mk 3241279Smarcel# 4241279Smarcel# $FreeBSD: stable/10/usr.bin/bmake/Makefile 321964 2017-08-03 01:40:05Z sjg $ 5241279Smarcel 6241279Smarcel.sinclude "Makefile.inc" 7241279Smarcel 8241279SmarcelSRCTOP?= ${.CURDIR:H:H} 9241279Smarcel 10241279Smarcel# look here first for config.h 11241279SmarcelCFLAGS+= -I${.CURDIR} 12241279Smarcel 13246223Ssjg# for after-import 14246223SsjgCLEANDIRS+= FreeBSD 15246223SsjgCLEANFILES+= bootstrap 16241279Smarcel 17321964Ssjg# $Id: Makefile,v 1.95 2017/07/20 19:36:13 sjg Exp $ 18241279Smarcel 19246223Ssjg# Base version on src date 20321964Ssjg_MAKE_VERSION= 20170720 21246223Ssjg 22241279SmarcelPROG?= ${.CURDIR:T} 23241279Smarcel 24246223SsjgSRCS= \ 25246223Ssjg arch.c \ 26246223Ssjg buf.c \ 27246223Ssjg compat.c \ 28246223Ssjg cond.c \ 29246223Ssjg dir.c \ 30246223Ssjg for.c \ 31246223Ssjg hash.c \ 32246223Ssjg job.c \ 33246223Ssjg main.c \ 34246223Ssjg make.c \ 35246223Ssjg make_malloc.c \ 36246223Ssjg meta.c \ 37292068Ssjg metachar.c \ 38246223Ssjg parse.c \ 39246223Ssjg str.c \ 40246223Ssjg strlist.c \ 41246223Ssjg suff.c \ 42246223Ssjg targ.c \ 43246223Ssjg trace.c \ 44246223Ssjg util.c \ 45246223Ssjg var.c 46241279Smarcel 47246223Ssjg# from lst.lib/ 48246223SsjgSRCS+= \ 49246223Ssjg lstAppend.c \ 50246223Ssjg lstAtEnd.c \ 51246223Ssjg lstAtFront.c \ 52246223Ssjg lstClose.c \ 53246223Ssjg lstConcat.c \ 54246223Ssjg lstDatum.c \ 55246223Ssjg lstDeQueue.c \ 56246223Ssjg lstDestroy.c \ 57246223Ssjg lstDupl.c \ 58246223Ssjg lstEnQueue.c \ 59246223Ssjg lstFind.c \ 60246223Ssjg lstFindFrom.c \ 61246223Ssjg lstFirst.c \ 62246223Ssjg lstForEach.c \ 63246223Ssjg lstForEachFrom.c \ 64246223Ssjg lstInit.c \ 65246223Ssjg lstInsert.c \ 66246223Ssjg lstIsAtEnd.c \ 67246223Ssjg lstIsEmpty.c \ 68246223Ssjg lstLast.c \ 69246223Ssjg lstMember.c \ 70246223Ssjg lstNext.c \ 71246223Ssjg lstOpen.c \ 72246223Ssjg lstPrev.c \ 73246223Ssjg lstRemove.c \ 74246223Ssjg lstReplace.c \ 75246223Ssjg lstSucc.c 76241279Smarcel 77246223Ssjg# this file gets generated by configure 78246223Ssjg.sinclude "Makefile.config" 79241279Smarcel 80241279Smarcel.if !empty(LIBOBJS) 81241279SmarcelSRCS+= ${LIBOBJS:T:.o=.c} 82241279Smarcel.endif 83241279Smarcel 84246223Ssjg# just in case 85246223Ssjgprefix?= /usr 86246223Ssjgsrcdir?= ${.CURDIR} 87246223Ssjg 88276305SngieDEFAULT_SYS_PATH?= ${prefix}/share/mk 89246223Ssjg 90241279SmarcelCPPFLAGS+= -DUSE_META 91246223SsjgCFLAGS+= ${CPPFLAGS} 92246223SsjgCFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" 93246223SsjgCFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE 94246223SsjgCFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} 95321964SsjgCOPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" 96246223Ssjg 97246223Ssjg# meta mode can be useful even without filemon 98241279SmarcelFILEMON_H ?= /usr/include/dev/filemon/filemon.h 99241279Smarcel.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" 100241279SmarcelCOPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} 101241279Smarcel.endif 102241279Smarcel 103241279Smarcel.PATH: ${srcdir} 104241279Smarcel.PATH: ${srcdir}/lst.lib 105241279Smarcel 106241279Smarcel.if make(obj) || make(clean) 107241279SmarcelSUBDIR+= unit-tests 108241279Smarcel.endif 109241279Smarcel 110321964Ssjg 111246223SsjgMAN= ${PROG}.1 112246223SsjgMAN1= ${MAN} 113241279Smarcel 114241279Smarcel.if (${PROG} != "make") 115246223SsjgCLEANFILES+= my.history 116246223Ssjg.if make(${MAN}) || !exists(${srcdir}/${MAN}) 117242102Ssjgmy.history: ${MAKEFILE} 118242102Ssjg @(echo ".Nm"; \ 119241279Smarcel echo "is derived from NetBSD"; \ 120241279Smarcel echo ".Xr make 1 ."; \ 121242102Ssjg echo "It uses autoconf to facilitate portability to other platforms."; \ 122242102Ssjg echo ".Pp") > $@ 123241279Smarcel 124246223Ssjg.NOPATH: ${MAN} 125242102Ssjg${MAN}: make.1 my.history 126246223Ssjg @echo making $@ 127321964Ssjg @sed \ 128321964Ssjg -e '/^.Dt/s/MAKE/${PROG:tu}/' \ 129321964Ssjg -e 's/^.Nx/NetBSD/' \ 130321964Ssjg -e '/^.Nm/s/make/${PROG}/' \ 131242102Ssjg -e '/^.Sh HISTORY/rmy.history' \ 132242102Ssjg -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@ 133242102Ssjg 134246223Ssjgall beforeinstall: ${MAN} 135246223Ssjg_mfromdir=. 136241279Smarcel.endif 137241279Smarcel.endif 138241279Smarcel 139241279SmarcelMANTARGET?= cat 140241279SmarcelMANDEST?= ${MANDIR}/${MANTARGET}1 141241279Smarcel 142241279Smarcel.if ${MANTARGET} == "cat" 143241279Smarcel_mfromdir=${srcdir} 144241279Smarcel.endif 145241279Smarcel 146246223Ssjg.include <bsd.prog.mk> 147241279Smarcel 148246223SsjgCPPFLAGS+= -DMAKE_NATIVE -DHAVE_CONFIG_H 149241279SmarcelCOPTS.var.c += -Wno-cast-qual 150241279SmarcelCOPTS.job.c += -Wno-format-nonliteral 151241279SmarcelCOPTS.parse.c += -Wno-format-nonliteral 152241279SmarcelCOPTS.var.c += -Wno-format-nonliteral 153241279Smarcel 154241279Smarcel# Force these 155292068SsjgSHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} 156292068SsjgBINDIR= ${BINDIR.bmake:U${prefix}/bin} 157292068SsjgMANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} 158241279Smarcel 159246223Ssjg.if !exists(.depend) 160246223Ssjg${OBJS}: config.h 161246223Ssjg.endif 162246223Ssjg 163241279Smarcel# make sure that MAKE_VERSION gets updated. 164241279Smarcelmain.o: ${SRCS} ${MAKEFILE} 165241279Smarcel 166241279Smarcel 167241279Smarcel# A simple unit-test driver to help catch regressions 168241279Smarcelaccept test: 169241279Smarcel cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET} 170241279Smarcel 171241279Smarcel# override some simple things 172241279SmarcelBINDIR= /usr/bin 173241279SmarcelMANDIR= /usr/share/man/man 174241279Smarcel 175241279Smarcel# make sure we get this 176241279SmarcelCFLAGS+= ${COPTS.${.IMPSRC:T}} 177241279Smarcel 178241279Smarcelafter-import: ${SRCTOP}/contrib/bmake/bsd.after-import.mk 179241279Smarcel cd ${.CURDIR} && ${.MAKE} -f ${SRCTOP}/contrib/bmake/bsd.after-import.mk 180241279Smarcel 181