Module Name:    src
Committed By:   uebayasi
Date:           Wed Sep  2 14:17:03 UTC 2015

Modified Files:
        src/sys/conf: Makefile.kern.inc files
        src/usr.bin/config: defs.h mkmakefile.c

Log Message:
Define ${OBJS} in `Makefile.kern.inc'.  Relative paths are not truncated
(a/b/c/x.c -> x.c) in `-S' mode.  Don't provide some explicit rules for `-S'
mode for safety.


To generate a diff of this commit:
cvs rdiff -u -r1.221 -r1.222 src/sys/conf/Makefile.kern.inc
cvs rdiff -u -r1.1145 -r1.1146 src/sys/conf/files
cvs rdiff -u -r1.85 -r1.86 src/usr.bin/config/defs.h
cvs rdiff -u -r1.58 -r1.59 src/usr.bin/config/mkmakefile.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.221 src/sys/conf/Makefile.kern.inc:1.222
--- src/sys/conf/Makefile.kern.inc:1.221	Wed Sep  2 13:42:14 2015
+++ src/sys/conf/Makefile.kern.inc	Wed Sep  2 14:17:03 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.221 2015/09/02 13:42:14 uebayasi Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.222 2015/09/02 14:17:03 uebayasi Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -303,9 +303,21 @@ SYSTEM_LD_TAIL_STAGE2+=	${SYSTEM_LD_TAIL
 ## (6) port independent targets and dependencies: assym.h, vers.o
 ##
 
-_CFILES=${CFILES:M/*} ${CFILES:Nswapnetbsd*:N/*:C|^|$S/|}
+.if !defined(___USE_SUFFIX_RULES___)
+OBJS=	${CFILES:T:R:C|$|.o|:N*swapnetbsd*} \
+	${SFILES:T:R:C|$|.o|} \
+	${OFILES}
+_CFILES=${CFILES:M/*} ${CFILES:N*swapnetbsd*:N/*:C|^|$S/|}
 _SFILES=${SFILES:M/*} ${SFILES:N/*:C|^|$S/|}
+.else
+OBJS=	${CFILES:R:C|$|.o|:N*swapnetbsd*} \
+	${SFILES:R:C|$|.o|} \
+	${OFILES}
+_CFILES=${CFILES:N*swapnetbsd*}
+_SFILES=${SFILES}
+.endif # ___USE_SUFFIX_RULES___
 
+.if !defined(___USE_SUFFIX_RULES___)
 .for _s in ${_CFILES}
 .if !commands(${_s:T:R}.o)
 ${_s:T:R}.o: ${_s}
@@ -319,6 +331,7 @@ ${_s:T:R}.o: ${_s}
 	${NORMAL_S}
 .endif
 .endfor
+.endif # !___USE_SUFFIX_RULES___
 
 assym.h: ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf
 	${_MKTARGET_CREATE}
@@ -394,8 +407,13 @@ MKDEP_CFLAGS?=	${CFLAGS}
 SSRCS=${MD_SFILES} ${_SFILES}
 CSRCS=${MD_CFILES} ${MI_CFILES} ${_CFILES}
 SRCS=${SSRCS} ${CSRCS}
+.if !defined(___USE_SUFFIX_RULES___)
 DEPS=	${SRCS:T:u:R:S/$/.d/g}
+.else
+DEPS=	${SRCS:u:R:S/$/.d/g}
+.endif
 
+.if !defined(___USE_SUFFIX_RULES___)
 .for _s in ${SSRCS}
 .if !target(${_s:T:R}.d)
 ${_s:T:R}.d: ${_s} assym.h
@@ -415,6 +433,7 @@ ${_s:T:R}.d: ${_s}
 	mv -f ${.TARGET}.tmp ${.TARGET}
 .endif
 .endfor
+.endif # !___USE_SUFFIX_RULES___
 
 assym.d: assym.h
 	${_MKTARGET_CREATE}

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1145 src/sys/conf/files:1.1146
--- src/sys/conf/files:1.1145	Wed Sep  2 13:42:14 2015
+++ src/sys/conf/files	Wed Sep  2 14:17:03 2015
@@ -1,7 +1,7 @@
-#	$NetBSD: files,v 1.1145 2015/09/02 13:42:14 uebayasi Exp $
+#	$NetBSD: files,v 1.1146 2015/09/02 14:17:03 uebayasi Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
-version 	20150841
+version 	20150842
 
 #
 # device classes

Index: src/usr.bin/config/defs.h
diff -u src/usr.bin/config/defs.h:1.85 src/usr.bin/config/defs.h:1.86
--- src/usr.bin/config/defs.h:1.85	Wed Sep  2 13:42:14 2015
+++ src/usr.bin/config/defs.h	Wed Sep  2 14:17:03 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.85 2015/09/02 13:42:14 uebayasi Exp $	*/
+/*	$NetBSD: defs.h,v 1.86 2015/09/02 14:17:03 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -107,7 +107,7 @@ extern const char *progname;
  * The next two lines define the current version of the config(1) binary,
  * and the minimum version of the configuration files it supports.
  */
-#define CONFIG_VERSION		20150841
+#define CONFIG_VERSION		20150842
 #define CONFIG_MINVERSION	0
 
 /*

Index: src/usr.bin/config/mkmakefile.c
diff -u src/usr.bin/config/mkmakefile.c:1.58 src/usr.bin/config/mkmakefile.c:1.59
--- src/usr.bin/config/mkmakefile.c:1.58	Wed Sep  2 13:42:14 2015
+++ src/usr.bin/config/mkmakefile.c	Wed Sep  2 14:17:03 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkmakefile.c,v 1.58 2015/09/02 13:42:14 uebayasi Exp $	*/
+/*	$NetBSD: mkmakefile.c,v 1.59 2015/09/02 14:17:03 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mkmakefile.c,v 1.58 2015/09/02 13:42:14 uebayasi Exp $");
+__RCSID("$NetBSD: mkmakefile.c,v 1.59 2015/09/02 14:17:03 uebayasi Exp $");
 
 #include <sys/param.h>
 #include <ctype.h>
@@ -337,12 +337,6 @@ emitobjs(FILE *fp)
 	const char *prologue, *prefix, *sep;
 	struct files *fi;
 
-	fputs("OBJS= \\\n", fp);
-	fprintf(fp, "\t${CFILES:T:R:C|$|.o|:Nswapnetbsd*} \\\n");
-	fprintf(fp, "\t${SFILES:T:R:C|$|.o|} \\\n");
-	fprintf(fp, "\t${OFILES} \\\n");
-	putc('\n', fp);
-
 	fputs("OFILES= \\\n", fp);
 	TAILQ_FOREACH(fi, &allofiles, fi_snext) {
 		if ((fi->fi_flags & FI_SEL) == 0)

Reply via email to