Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Add .NOPATH for all files generated from .l or .y f...
details: https://anonhg.NetBSD.org/src/rev/ca134f5e257a
branches: trunk
changeset: 516258:ca134f5e257a
user: tv <tv%NetBSD.org@localhost>
date: Fri Oct 19 15:55:52 2001 +0000
description:
Add .NOPATH for all files generated from .l or .y files in SRCS. Fixes PRs
bin/14187 and lib/14239.
Also simplify the handling of these transforms to .c and .h files a bit by
leveraging make's builtin macro operators.
diffstat:
share/mk/bsd.hostprog.mk | 11 ++++-------
share/mk/bsd.lib.mk | 12 +++++-------
share/mk/bsd.prog.mk | 12 +++++-------
3 files changed, 14 insertions(+), 21 deletions(-)
diffs (98 lines):
diff -r d6331a1b6db2 -r ca134f5e257a share/mk/bsd.hostprog.mk
--- a/share/mk/bsd.hostprog.mk Fri Oct 19 15:36:36 2001 +0000
+++ b/share/mk/bsd.hostprog.mk Fri Oct 19 15:55:52 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.hostprog.mk,v 1.13 2001/09/25 02:19:26 tv Exp $
+# $NetBSD: bsd.hostprog.mk,v 1.14 2001/10/19 15:55:52 tv Exp $
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
.if !target(__initialized__)
@@ -80,11 +80,8 @@
.if defined(HOSTPROG)
SRCS?= ${HOSTPROG}.c
-DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
-CLEANFILES+= ${DPSRCS}
-.if defined(YHEADER)
-CLEANFILES+= ${SRCS:M*.y:.y=.h}
-.endif
+DPSRCS+= ${SRCS:M*.[ly]:C/..$/.c/}
+CLEANFILES+= ${DPSRCS} ${YHEADER:D${SRCS:M*.y:.y=.h}}
.if !empty(SRCS:N*.h:N*.sh)
OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.lo/g}
@@ -92,7 +89,7 @@
.endif
.if defined(OBJS) && !empty(OBJS)
-.NOPATH: ${OBJS} ${HOSTPROG}
+.NOPATH: ${OBJS} ${HOSTPROG} ${SRCS:M*.[ly]:C/..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}
${HOSTPROG}: ${DPSRCS} ${OBJS} ${LIBC} ${DPADD}
${HOST_LINK.c} ${HOST_LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
diff -r d6331a1b6db2 -r ca134f5e257a share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk Fri Oct 19 15:36:36 2001 +0000
+++ b/share/mk/bsd.lib.mk Fri Oct 19 15:55:52 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.lib.mk,v 1.185 2001/09/21 15:25:49 tv Exp $
+# $NetBSD: bsd.lib.mk,v 1.186 2001/10/19 15:55:52 tv Exp $
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.if !target(__initialized__)
@@ -340,7 +340,8 @@
.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
ALLOBJS+=${LOBJS}
.endif
-.NOPATH: ${ALLOBJS} ${_LIBS}
+
+.NOPATH: ${ALLOBJS} ${_LIBS} ${SRCS:M*.[ly]:C/..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}
realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
@@ -355,11 +356,8 @@
${RANLIB} -t ${.TARGET}
chmod ${LIBMODE} ${.TARGET}
-DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
-CLEANFILES+= ${DPSRCS}
-.if defined(YHEADER)
-CLEANFILES+= ${SRCS:M*.y:.y=.h}
-.endif
+DPSRCS+= ${SRCS:M*.[ly]:C/..$/.c/}
+CLEANFILES+= ${DPSRCS} ${YHEADER:D${SRCS:M*.y:.y=.h}}
lib${LIB}.a:: ${OBJS} __archivebuild
@echo building standard ${LIB} library
diff -r d6331a1b6db2 -r ca134f5e257a share/mk/bsd.prog.mk
--- a/share/mk/bsd.prog.mk Fri Oct 19 15:36:36 2001 +0000
+++ b/share/mk/bsd.prog.mk Fri Oct 19 15:55:52 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prog.mk,v 1.136 2001/09/25 02:19:26 tv Exp $
+# $NetBSD: bsd.prog.mk,v 1.137 2001/10/19 15:55:52 tv Exp $
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
.if !target(__initialized__)
@@ -107,11 +107,8 @@
.if defined(PROG)
SRCS?= ${PROG}.c
-DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
-CLEANFILES+= ${DPSRCS}
-.if defined(YHEADER)
-CLEANFILES+= ${SRCS:M*.y:.y=.h}
-.endif
+DPSRCS+= ${SRCS:M*.[ly]:C/..$/.c/}
+CLEANFILES+= ${DPSRCS} ${YHEADER:D${SRCS:M*.y:.y=.h}}
.if !empty(SRCS:N*.h:N*.sh:N*.fth)
OBJS+= ${SRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
@@ -119,7 +116,8 @@
.endif
.if defined(OBJS) && !empty(OBJS)
-.NOPATH: ${OBJS} ${PROG}
+.NOPATH: ${OBJS} ${PROG} ${SRCS:M*.[ly]:C/..$/.c/} ${YHEADER:D${SRCS:M*.y:.y=.h}}
+
.if defined(DESTDIR)
${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
Home |
Main Index |
Thread Index |
Old Index