5ae59dec60
This first step is mostly to prevent the code from rotting even further and to ensure these do not get wiped when fmake's code is removed from the tree. These tests are currently being skipped because they detect the underlying make is not fmake and thus disable themselves -- and the reason is that some of the tests fail, possibly due to legitimate bugs. Enabling them to run against bmake will come separately. Lastly, it would be ideal if these tests were fed upstream but they are not ready for that yet. In the interim, just put them under usr.bin/bmake/ while we sort things out. The existence of a different unit-tests directory within here makes me feel less guilty about this. Change confirmed working with a clean amd64 build.
183 lines
3.4 KiB
Makefile
183 lines
3.4 KiB
Makefile
# This is a generated file, do NOT edit!
|
|
# See contrib/bmake/bsd.after-import.mk
|
|
#
|
|
# $FreeBSD$
|
|
|
|
.include <src.opts.mk>
|
|
.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.23 2014/01/02 22:20:52 sjg Exp $
|
|
|
|
# Base version on src date
|
|
MAKE_VERSION= 20140101
|
|
|
|
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?= ${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
|
|
|
|
.if ${MK_TESTS} != no
|
|
SUBDIR+= 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
|
|
|