Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/conf Define suffix rules at the end to override system d...
details: https://anonhg.NetBSD.org/src/rev/8f0149047e60
branches: trunk
changeset: 340371:8f0149047e60
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Tue Sep 01 23:04:35 2015 +0000
description:
Define suffix rules at the end to override system definitions. Provide them
only if ___USE_SUFFIX_RULES___ is defined (config -S).
diffstat:
sys/conf/Makefile.kern.inc | 74 +++++++++++++++++++++++++++------------------
1 files changed, 45 insertions(+), 29 deletions(-)
diffs (115 lines):
diff -r d939d36f715b -r 8f0149047e60 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc Tue Sep 01 20:18:41 2015 +0000
+++ b/sys/conf/Makefile.kern.inc Tue Sep 01 23:04:35 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.kern.inc,v 1.217 2015/09/01 16:04:04 uebayasi Exp $
+# $NetBSD: Makefile.kern.inc,v 1.218 2015/09/01 23:04:35 uebayasi Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -174,14 +174,6 @@
.endif
.endfor
-.SUFFIXES: .c .o
-.c.o:
- ${NORMAL_C}
-
-.SUFFIXES: .S .o
-.S.o:
- ${NORMAL_S}
-
##
## (3) libkern and compat
##
@@ -325,14 +317,6 @@
## (6) port independent targets and dependencies: assym.h, vers.o
##
-.SUFFIXES: .genassym .assym.h
-.genassym.assym.h:
- ${_MKTARGET_CREATE}
- cat $< | \
- ${GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \
- ${GENASSYM_CPPFLAGS} > $@.tmp && \
- mv -f $@.tmp $@
-
assym.h: ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf
${_MKTARGET_CREATE}
cat ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf | \
@@ -409,12 +393,6 @@
SRCS=${SSRCS} ${CSRCS}
DEPS= ${SRCS:T:u:R:S/$/.d/g}
-.SUFFIXES: .S .d
-.S.d:
- ${_MKTARGET_CREATE}
- ${MKDEP} -f ${.TARGET} -- ${MKDEP_AFLAGS} \
- ${CPPFLAGS} ${CPPFLAGS.${_s:T}} $<
-
.for _s in ${SSRCS}
.if !target(${_s:T:R}.d)
${_s:T:R}.d: ${_s} assym.h
@@ -424,12 +402,6 @@
.endif
.endfor
-.SUFFIXES: .c .d
-.c.d:
- ${_MKTARGET_CREATE}
- ${MKDEP} -f ${.TARGET} -- ${MKDEP_CFLAGS} \
- ${CPPFLAGS} ${CPPFLAGS.${_s:T}} $<
-
.for _s in ${CSRCS}
.if !target(${_s:T:R}.d)
${_s:T:R}.d: ${_s}
@@ -544,5 +516,49 @@
.include <bsd.clang-analyze.mk>
##
+## suffix rules
+##
+
+.if defined(___USE_SUFFIX_RULES___)
+.SUFFIXES: .genassym .assym.h
+.genassym.assym.h:
+ ${_MKTARGET_CREATE}
+ cat $< | \
+ ${GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \
+ ${GENASSYM_CPPFLAGS} > $@.tmp && \
+ mv -f $@.tmp $@
+
+.SUFFIXES: .s .d
+.s.d:
+ ${_MKTARGET_CREATE}
+ ${MKDEP} -f ${.TARGET} -- ${MKDEP_AFLAGS} \
+ ${CPPFLAGS} ${CPPFLAGS.${<:T}} $<
+
+.SUFFIXES: .S .d
+.S.d:
+ ${_MKTARGET_CREATE}
+ ${MKDEP} -f ${.TARGET} -- ${MKDEP_AFLAGS} \
+ ${CPPFLAGS} ${CPPFLAGS.${<:T}} $<
+
+.SUFFIXES: .c .d
+.c.d:
+ ${_MKTARGET_CREATE}
+ ${MKDEP} -f ${.TARGET} -- ${MKDEP_CFLAGS} \
+ ${CPPFLAGS} ${CPPFLAGS.${<:T}} $<
+
+.SUFFIXES: .c .o
+.c.o:
+ ${NORMAL_C}
+
+.SUFFIXES: .s .o
+.s.o:
+ ${NORMAL_S}
+
+.SUFFIXES: .S .o
+.S.o:
+ ${NORMAL_S}
+.endif # ___USE_SUFFIX_RULES___
+
+##
## the end
##
Home |
Main Index |
Thread Index |
Old Index