a93ea220fc
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES. This is a change of behaviour. If a Makefile wants the clean semantics it must specifically append to CLEANFILES. Resolves PR toolchain/5204. * To recap: .d (depend) files are generated for all files in SRCS and DPSRCS that have a suffix of: .c .m .s .S .C .cc .cpp .cxx * If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES * Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d depend upon ${DPSRCS} * Deprecate the (short lived) DEPENDSRCS Update the various Makefiles to these new semantics; generally either adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing specific .o dependencies with DPSRCS entries. Tested with "make -j 8 distribution" and "make distribution".
30 lines
883 B
Makefile
30 lines
883 B
Makefile
# $NetBSD: Makefile.inc,v 1.18 2003/08/01 17:03:59 lukem Exp $
|
|
|
|
# sys sources
|
|
.PATH: ${.CURDIR}/sys
|
|
|
|
# stubs providing an entry "foo" but calling "__posix_foo()"
|
|
PSEUDO= chown.S fchown.S lchown.S rename.S
|
|
|
|
SRCS+= ${PSEUDO}
|
|
CLEANFILES+= ${PSEUDO}
|
|
|
|
ASMDEPS= ${.CURDIR}/sys/Makefile.inc ${ARCHDIR}/SYS.h \
|
|
${DESTDIR}/usr/include/sys/syscall.h
|
|
|
|
${PSEUDO}: ${ASMDEPS}
|
|
@printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/^/__posix_/})\n' \
|
|
>${.TARGET}
|
|
|
|
# Lint stubs for all automatically-generated assembly stubs (GENERATED)
|
|
.if ${MKLINT} != "no"
|
|
LSRCS+= LintSysPseudo.c
|
|
DPSRCS+= LintSysPseudo.c
|
|
CLEANFILES+= LintSysPseudo.c
|
|
.endif
|
|
|
|
LintSysPseudo.c: ${NETBSDSRCDIR}/lib/libc/sys/makelintstub \
|
|
${DESTDIR}/usr/include/sys/syscall.h
|
|
CPP=${CPP:Q} ${HOST_SH} ${NETBSDSRCDIR}/lib/libc/sys/makelintstub \
|
|
-o ${.TARGET} -p -s ${DESTDIR}/usr/include/sys/syscall.h ${PSEUDO}
|