CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Sun Nov 22 01:20:36 UTC 2015 Modified Files: src/usr.bin/config: TODO Log Message: A few more. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.bin/config/TODO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/TODO diff -u src/usr.bin/config/TODO:1.30 src/usr.bin/config/TODO:1.31 --- src/usr.bin/config/TODO:1.30 Fri Sep 11 02:26:22 2015 +++ src/usr.bin/config/TODO Sun Nov 22 01:20:36 2015 @@ -226,7 +226,7 @@ o Pass input files to ${LD} via linker s Instead of passing input files on command-line, output "INPUT(xxx.o)" commands, and include it from generated linker scripts. -o Generate `*.d' files. +o Directly generate `*.d' files. Output source/object files in raw texts instead of `Makefile'. Generate `*.d' (make(1) depend) files. make(1) knows which object files are to be @@ -459,3 +459,9 @@ o Clean up CTF-related rules. Don't overwrite compile/link rules conditionally by existence of ${CTFCONVERT}/${CTFMERGE}. Give a separate suffix (*.ctfo) and define its rules (.c -> .ctfo). + +o Consider using cpp -MD instead of ${MKDEP}. + +o Make "make depend" mandatory. + + Automatically execute "make depend".
CVS commit: src/tests/usr.bin/config
Module Name:src Committed By: uebayasi Date: Sun Oct 4 07:59:47 UTC 2015 Modified Files: src/tests/usr.bin/config: t_config.sh Log Message: Catch up with the current, generated Makefile format. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/config/t_config.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/config/t_config.sh diff -u src/tests/usr.bin/config/t_config.sh:1.6 src/tests/usr.bin/config/t_config.sh:1.7 --- src/tests/usr.bin/config/t_config.sh:1.6 Thu Nov 20 09:02:00 2014 +++ src/tests/usr.bin/config/t_config.sh Sun Oct 4 07:59:47 2015 @@ -1,4 +1,4 @@ -# $NetBSD: t_config.sh,v 1.6 2014/11/20 09:02:00 uebayasi Exp $ +# $NetBSD: t_config.sh,v 1.7 2015/10/04 07:59:47 uebayasi Exp $ # # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -147,9 +147,9 @@ check_select() { local f=Makefile - grep -q '^a\.o:' $f && - grep -q '^b\.o:' $f && - grep -q '^c\.o:' $f && + grep -q '^ a\.c ' $f && + grep -q '^ b\.c ' $f && + grep -q '^ c\.c ' $f && : } select_body() {
CVS commit: src/sys
Module Name:src Committed By: uebayasi Date: Tue Sep 15 02:22:43 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc src/sys/dev/splash: splash.mk Removed Files: src/sys/conf: splash.mk Log Message: Clean up splash image build. Print messages when creating files. To generate a diff of this commit: cvs rdiff -u -r1.246 -r1.247 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.4 -r0 src/sys/conf/splash.mk cvs rdiff -u -r1.5 -r1.6 src/sys/dev/splash/splash.mk 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.246 src/sys/conf/Makefile.kern.inc:1.247 --- src/sys/conf/Makefile.kern.inc:1.246 Fri Sep 11 01:40:52 2015 +++ src/sys/conf/Makefile.kern.inc Tue Sep 15 02:22:43 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.246 2015/09/11 01:40:52 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.247 2015/09/15 02:22:43 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -410,7 +410,7 @@ install-kernel-${MACHINE_NAME}: .include "${S}/conf/ldscript.mk" .include "${S}/conf/assym.mk" .include "${S}/conf/newvers.mk" -.include "${S}/conf/splash.mk" +.include "${S}/dev/splash/splash.mk" .include "${S}/conf/mdroot.mk" .include "${S}/conf/lint.mk" .include "${S}/conf/cscope.mk" Index: src/sys/dev/splash/splash.mk diff -u src/sys/dev/splash/splash.mk:1.5 src/sys/dev/splash/splash.mk:1.6 --- src/sys/dev/splash/splash.mk:1.5 Tue Sep 15 00:16:42 2015 +++ src/sys/dev/splash/splash.mk Tue Sep 15 02:22:43 2015 @@ -1,4 +1,6 @@ -# $NetBSD: splash.mk,v 1.5 2015/09/15 00:16:42 uebayasi Exp $ +# $NetBSD: splash.mk,v 1.6 2015/09/15 02:22:43 uebayasi Exp $ + +.if defined(SPLASHSCREEN_IMAGE) # Makefile for embedding splash image into kernel. .include @@ -18,13 +20,17 @@ BFD_TARGET=${BFD_ELFTARGET}-${BFD_ENDIAN BFD_TARGET=${BFD_ELFTARGET}-${BFD_CPU} .endif -.if defined(SPLASHSCREEN_IMAGE) splash_image.o: ${SPLASHSCREEN_IMAGE} + ${_MKTARGET_CREATE} cp ${SPLASHSCREEN_IMAGE} splash.image ${OBJCOPY} -I binary -B ${MACHINE_CPU:C/x86_64/i386/} \ -O ${BFD_TARGET} splash.image splash_image.o rm splash.image .else + +# SPLASHSCREEN_IMAGE is not defined; build empty splash_image.o. splash_image.c: + ${_MKTARGET_CREATE} echo > $@ + .endif
CVS commit: src/sys
Module Name:src Committed By: uebayasi Date: Mon Sep 14 01:40:03 UTC 2015 Modified Files: src/sys/conf: splash.mk src/sys/dev/splash: files.splash splash.mk src/sys/kern: init_main.c Log Message: Handle splash image generation better. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/conf/splash.mk cvs rdiff -u -r1.4 -r1.5 src/sys/dev/splash/files.splash cvs rdiff -u -r1.3 -r1.4 src/sys/dev/splash/splash.mk cvs rdiff -u -r1.469 -r1.470 src/sys/kern/init_main.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/splash.mk diff -u src/sys/conf/splash.mk:1.2 src/sys/conf/splash.mk:1.3 --- src/sys/conf/splash.mk:1.2 Fri Sep 11 15:56:56 2015 +++ src/sys/conf/splash.mk Mon Sep 14 01:40:03 2015 @@ -1,7 +1,6 @@ -# $NetBSD: splash.mk,v 1.2 2015/09/11 15:56:56 nat Exp $ +# $NetBSD: splash.mk,v 1.3 2015/09/14 01:40:03 uebayasi Exp $ # Option for embedding a splashscreen image. .if defined(SPLASHSCREEN_IMAGE) .include "${S}/dev/splash/splash.mk" -OBJS+= splash_image.o .endif Index: src/sys/dev/splash/files.splash diff -u src/sys/dev/splash/files.splash:1.4 src/sys/dev/splash/files.splash:1.5 --- src/sys/dev/splash/files.splash:1.4 Fri May 1 02:00:41 2015 +++ src/sys/dev/splash/files.splash Mon Sep 14 01:40:03 2015 @@ -1,6 +1,8 @@ -# $NetBSD: files.splash,v 1.4 2015/05/01 02:00:41 nat Exp $ +# $NetBSD: files.splash,v 1.5 2015/09/14 01:40:03 uebayasi Exp $ define splash: stbi file dev/splash/splash.c splash & splashscreen +file splash_image.o splash & splashscreen defflag opt_splash.h SPLASHSCREEN + makeoptions_SPLASHSCREEN_IMAGE Index: src/sys/dev/splash/splash.mk diff -u src/sys/dev/splash/splash.mk:1.3 src/sys/dev/splash/splash.mk:1.4 --- src/sys/dev/splash/splash.mk:1.3 Fri May 1 02:35:16 2015 +++ src/sys/dev/splash/splash.mk Mon Sep 14 01:40:03 2015 @@ -1,11 +1,8 @@ -# $NetBSD: splash.mk,v 1.3 2015/05/01 02:35:16 nat Exp $ +# $NetBSD: splash.mk,v 1.4 2015/09/14 01:40:03 uebayasi Exp $ # Makefile for embedding splash image into kernel. .include -MI_OBJS+= splash_image.o -CFLAGS+= -DSPLASHSCREEN_IMAGE - .if (${OBJECT_FMTS:Melf64}) BFD_ELFTARGET=elf64 .else Index: src/sys/kern/init_main.c diff -u src/sys/kern/init_main.c:1.469 src/sys/kern/init_main.c:1.470 --- src/sys/kern/init_main.c:1.469 Mon Aug 31 16:46:14 2015 +++ src/sys/kern/init_main.c Mon Sep 14 01:40:03 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.469 2015/08/31 16:46:14 ozaki-r Exp $ */ +/* $NetBSD: init_main.c,v 1.470 2015/09/14 01:40:03 uebayasi Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.469 2015/08/31 16:46:14 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.470 2015/09/14 01:40:03 uebayasi Exp $"); #include "opt_ddb.h" #include "opt_ipsec.h" @@ -115,7 +115,7 @@ __KERNEL_RCSID(0, "$NetBSD: init_main.c, #include "opt_rnd_printf.h" #include "opt_splash.h" -#if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_IMAGE) +#if defined(SPLASHSCREEN) && defined(makeoptions_SPLASHSCREEN_IMAGE) extern void *_binary_splash_image_start; extern void *_binary_splash_image_end; #endif
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Thu Sep 10 09:30:02 UTC 2015 Modified Files: src/sys/conf: assym.mk Log Message: Simplify the dependency line further. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/conf/assym.mk 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/assym.mk diff -u src/sys/conf/assym.mk:1.3 src/sys/conf/assym.mk:1.4 --- src/sys/conf/assym.mk:1.3 Wed Sep 9 03:27:15 2015 +++ src/sys/conf/assym.mk Thu Sep 10 09:30:01 2015 @@ -1,4 +1,4 @@ -# $NetBSD: assym.mk,v 1.3 2015/09/09 03:27:15 uebayasi Exp $ +# $NetBSD: assym.mk,v 1.4 2015/09/10 09:30:01 uebayasi Exp $ assym.h: ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf ${_MKTARGET_CREATE} @@ -7,11 +7,7 @@ assym.h: ${GENASSYM_CONF} ${GENASSYM_EXT ${GENASSYM_CPPFLAGS} > assym.h.tmp && \ mv -f assym.h.tmp assym.h -.if !defined(___USE_SUFFIX_RULES___) -${_MD_SFILES:C/\.[Ss]/.o/} ${_SFILES:C/\.[Ss]/.o/}: assym.h -.else -${SRCS:M*.[sS]}: assym.h -.endif +${SRCS:M*.[sS]:C|\.[Ss]|.o|}: assym.h assym.d: assym.h ${_MKTARGET_CREATE}
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Thu Sep 10 13:11:39 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc assym.mk Log Message: Fix dependency of *.d -> assym.h in `-S' mode. To generate a diff of this commit: cvs rdiff -u -r1.244 -r1.245 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.4 -r1.5 src/sys/conf/assym.mk 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.244 src/sys/conf/Makefile.kern.inc:1.245 --- src/sys/conf/Makefile.kern.inc:1.244 Mon Sep 7 15:55:06 2015 +++ src/sys/conf/Makefile.kern.inc Thu Sep 10 13:11:39 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.244 2015/09/07 15:55:06 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.245 2015/09/10 13:11:39 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -358,7 +358,7 @@ DEPS= ${SRCS:R:S/$/.d/g} .if !defined(___USE_SUFFIX_RULES___) .for _s in ${SSRCS} .if !target(${_s:T:R}.d) -${_s:T:R}.d: ${_s} assym.h +${_s:T:R}.d: ${_s} ${_MKTARGET_CREATE} ${MKDEP} -f ${.TARGET}.tmp -- ${MKDEP_AFLAGS} \ ${CPPFLAGS} ${CPPFLAGS.${_s:T}} ${_s} Index: src/sys/conf/assym.mk diff -u src/sys/conf/assym.mk:1.4 src/sys/conf/assym.mk:1.5 --- src/sys/conf/assym.mk:1.4 Thu Sep 10 09:30:01 2015 +++ src/sys/conf/assym.mk Thu Sep 10 13:11:39 2015 @@ -1,4 +1,4 @@ -# $NetBSD: assym.mk,v 1.4 2015/09/10 09:30:01 uebayasi Exp $ +# $NetBSD: assym.mk,v 1.5 2015/09/10 13:11:39 uebayasi Exp $ assym.h: ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf ${_MKTARGET_CREATE} @@ -7,7 +7,13 @@ assym.h: ${GENASSYM_CONF} ${GENASSYM_EXT ${GENASSYM_CPPFLAGS} > assym.h.tmp && \ mv -f assym.h.tmp assym.h +.if !defined(___USE_SUFFIX_RULES___) +${SRCS:T:M*.[sS]:C|\.[Ss]|.o|}: assym.h +${SRCS:T:M*.[sS]:C|\.[Ss]|.d|}: assym.h +.else ${SRCS:M*.[sS]:C|\.[Ss]|.o|}: assym.h +${SRCS:M*.[sS]:C|\.[Ss]|.d|}: assym.h +.endif assym.d: assym.h ${_MKTARGET_CREATE}
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Fri Sep 11 01:40:52 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Indent. To generate a diff of this commit: cvs rdiff -u -r1.245 -r1.246 src/sys/conf/Makefile.kern.inc 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.245 src/sys/conf/Makefile.kern.inc:1.246 --- src/sys/conf/Makefile.kern.inc:1.245 Thu Sep 10 13:11:39 2015 +++ src/sys/conf/Makefile.kern.inc Fri Sep 11 01:40:52 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.245 2015/09/10 13:11:39 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.246 2015/09/11 01:40:52 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -250,7 +250,7 @@ TARGETSFX= .gdb LINKFLAGS+= ${LINKFLAGS_NORMAL} .endif -SYSTEM_LD_HEAD+=${SYSTEM_LD_HEAD_EXTRA} +SYSTEM_LD_HEAD+= ${SYSTEM_LD_HEAD_EXTRA} SYSTEM_LD_TAIL_STAGE1= ${SYSTEM_LD_TAIL} SYSTEM_LD_TAIL_STAGE2= ${SYSTEM_LD_TAIL} .if defined(COPY_SYMTAB)
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Fri Sep 11 02:26:22 UTC 2015 Modified Files: src/usr.bin/config: TODO Log Message: Libraries should be built in sub-make. libkern is polluting .PATH too much. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.bin/config/TODO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/TODO diff -u src/usr.bin/config/TODO:1.29 src/usr.bin/config/TODO:1.30 --- src/usr.bin/config/TODO:1.29 Tue Sep 8 05:48:07 2015 +++ src/usr.bin/config/TODO Fri Sep 11 02:26:22 2015 @@ -437,6 +437,9 @@ o Support library. Provide a consistent way to build library either as .o or .a. + Build libraries in sub-make. Don't include library makefiles. Don't + pollute search path (.PATH). libkern does too much. + o Accept `.a' suffix. Make "file" command accept `.a' suffix. Handle it the same way as `.o'.
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Wed Sep 9 03:16:14 UTC 2015 Modified Files: src/sys/conf: assym.mk Log Message: Restore *.[sS] -> assym.h dependency in `-S' mode. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/conf/assym.mk 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/assym.mk diff -u src/sys/conf/assym.mk:1.1 src/sys/conf/assym.mk:1.2 --- src/sys/conf/assym.mk:1.1 Sun Sep 6 06:13:16 2015 +++ src/sys/conf/assym.mk Wed Sep 9 03:16:14 2015 @@ -1,4 +1,4 @@ -# $NetBSD: assym.mk,v 1.1 2015/09/06 06:13:16 uebayasi Exp $ +# $NetBSD: assym.mk,v 1.2 2015/09/09 03:16:14 uebayasi Exp $ assym.h: ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf ${_MKTARGET_CREATE} @@ -6,7 +6,12 @@ assym.h: ${GENASSYM_CONF} ${GENASSYM_EXT ${GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \ ${GENASSYM_CPPFLAGS} > assym.h.tmp && \ mv -f assym.h.tmp assym.h + +.if !defined(___USE_SUFFIX_RULES___) ${_MD_SFILES:C/\.[Ss]/.o/} ${_SFILES:C/\.[Ss]/.o/}: assym.h +.else +${ALLFILES:M*.[sS]}: assym.h +.endif assym.d: assym.h ${_MKTARGET_CREATE}
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Wed Sep 9 03:27:15 UTC 2015 Modified Files: src/sys/conf: assym.mk Log Message: Improve previous. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/conf/assym.mk 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/assym.mk diff -u src/sys/conf/assym.mk:1.2 src/sys/conf/assym.mk:1.3 --- src/sys/conf/assym.mk:1.2 Wed Sep 9 03:16:14 2015 +++ src/sys/conf/assym.mk Wed Sep 9 03:27:15 2015 @@ -1,4 +1,4 @@ -# $NetBSD: assym.mk,v 1.2 2015/09/09 03:16:14 uebayasi Exp $ +# $NetBSD: assym.mk,v 1.3 2015/09/09 03:27:15 uebayasi Exp $ assym.h: ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf ${_MKTARGET_CREATE} @@ -10,7 +10,7 @@ assym.h: ${GENASSYM_CONF} ${GENASSYM_EXT .if !defined(___USE_SUFFIX_RULES___) ${_MD_SFILES:C/\.[Ss]/.o/} ${_SFILES:C/\.[Ss]/.o/}: assym.h .else -${ALLFILES:M*.[sS]}: assym.h +${SRCS:M*.[sS]}: assym.h .endif assym.d: assym.h
CVS commit: src/share/mk
Module Name:src Committed By: uebayasi Date: Tue Sep 8 16:06:42 UTC 2015 Modified Files: src/share/mk: bsd.lib.mk Log Message: Revert previous. It was not wrong, but not necessary for everyone. (If really wanted, *.a generation rule can be easily overriden locally.) To generate a diff of this commit: cvs rdiff -u -r1.361 -r1.362 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.361 src/share/mk/bsd.lib.mk:1.362 --- src/share/mk/bsd.lib.mk:1.361 Mon Sep 7 06:42:07 2015 +++ src/share/mk/bsd.lib.mk Tue Sep 8 16:06:42 2015 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.361 2015/09/07 06:42:07 uebayasi Exp $ +# $NetBSD: bsd.lib.mk,v 1.362 2015/09/08 16:06:42 uebayasi Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -559,15 +559,15 @@ __archivesymlinkpic: .USE DPSRCS+= ${_YLSRCS} CLEANFILES+= ${_YLSRCS} -${STOBJS} ${POBJS} ${GOBJS} ${SOBJS} ${LOBJS}: ${DPSRCS:O} +${STOBJS} ${POBJS} ${GOBJS} ${SOBJS} ${LOBJS}: ${DPSRCS} -${_LIB.a}:: ${STOBJS:O} __archivebuild +${_LIB.a}:: ${STOBJS} __archivebuild -${_LIB_p.a}:: ${POBJS:O} __archivebuild +${_LIB_p.a}:: ${POBJS} __archivebuild -${_LIB_pic.a}:: ${SOBJS:O} __archivebuild +${_LIB_pic.a}:: ${SOBJS} __archivebuild -${_LIB_g.a}:: ${GOBJS:O} __archivebuild +${_LIB_g.a}:: ${GOBJS} __archivebuild _LIBLDOPTS=
CVS commit: src/share/mk
Module Name:src Committed By: uebayasi Date: Mon Sep 7 06:42:07 UTC 2015 Modified Files: src/share/mk: bsd.lib.mk Log Message: Order object build alphabetically. To generate a diff of this commit: cvs rdiff -u -r1.360 -r1.361 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.360 src/share/mk/bsd.lib.mk:1.361 --- src/share/mk/bsd.lib.mk:1.360 Wed Jul 29 14:35:04 2015 +++ src/share/mk/bsd.lib.mk Mon Sep 7 06:42:07 2015 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.360 2015/07/29 14:35:04 tsutsui Exp $ +# $NetBSD: bsd.lib.mk,v 1.361 2015/09/07 06:42:07 uebayasi Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -559,15 +559,15 @@ __archivesymlinkpic: .USE DPSRCS+= ${_YLSRCS} CLEANFILES+= ${_YLSRCS} -${STOBJS} ${POBJS} ${GOBJS} ${SOBJS} ${LOBJS}: ${DPSRCS} +${STOBJS} ${POBJS} ${GOBJS} ${SOBJS} ${LOBJS}: ${DPSRCS:O} -${_LIB.a}:: ${STOBJS} __archivebuild +${_LIB.a}:: ${STOBJS:O} __archivebuild -${_LIB_p.a}:: ${POBJS} __archivebuild +${_LIB_p.a}:: ${POBJS:O} __archivebuild -${_LIB_pic.a}:: ${SOBJS} __archivebuild +${_LIB_pic.a}:: ${SOBJS:O} __archivebuild -${_LIB_g.a}:: ${GOBJS} __archivebuild +${_LIB_g.a}:: ${GOBJS:O} __archivebuild _LIBLDOPTS=
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Mon Sep 7 15:55:06 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Preserve the order of files in ${ALLFILES} -> ${OBJS} conversion. To generate a diff of this commit: cvs rdiff -u -r1.243 -r1.244 src/sys/conf/Makefile.kern.inc 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.243 src/sys/conf/Makefile.kern.inc:1.244 --- src/sys/conf/Makefile.kern.inc:1.243 Sun Sep 6 15:20:59 2015 +++ src/sys/conf/Makefile.kern.inc Mon Sep 7 15:55:06 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.243 2015/09/06 15:20:59 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.244 2015/09/07 15:55:06 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -265,34 +265,30 @@ SYSTEM_LD_TAIL_STAGE2+= ${SYSTEM_LD_TAIL ## (6) port independent targets and dependencies: assym.h, vers.o ## +.if !defined(___USE_SUFFIX_RULES___) + +# Generate list of *.o files to pass to ${LD}, preserving order. +# x/y/z/a.[csS] -> a.[csS] +# a.[csS] -> a.o +OBJS= ${ALLFILES:C|^.*/([^/]*\.[csS])$$|\1|:C|^(.*)\.[csS]$$|\1.o|} + CFILES= ${ALLFILES:M*.c} SFILES= ${ALLFILES:M*.[sS]} OFILES= ${ALLFILES:M*.o} - -.if !defined(___USE_SUFFIX_RULES___) -COBJS= ${CFILES:T:R:C|$|.o|} -SOBJS= ${SFILES:T:R:C|$|.o|} -OOBJS= ${OFILES} # absolute, generated (build directory), relative (under $S) _CFILES=${CFILES:M/*} ${CFILES:N/*:N*/*} ${CFILES:N/*:M*/*:C|^|$S/|} _SFILES=${SFILES:M/*} ${SFILES:N/*:N*/*} ${SFILES:N/*:M*/*:C|^|$S/|} _MD_CFILES=${MD_CFILES} _MD_SFILES=${MD_SFILES} -.else -COBJS= ${CFILES:R:C|$|.o|} -SOBJS= ${SFILES:R:C|$|.o|} -OOBJS= ${OFILES} -_CFILES=${CFILES} -_SFILES=${SFILES} -_MD_CFILES=${MD_CFILES:C|^$S/||} -_MD_SFILES=${MD_SFILES:C|^$S/||} -.endif # ___USE_SUFFIX_RULES___ - -OBJS= ${COBJS} ${SOBJS} ${OOBJS} CSRCS= ${_MD_CFILES} ${_CFILES} SSRCS= ${_MD_SFILES} ${_SFILES} SRCS= ${CSRCS} ${SSRCS} +.else # ___USE_SUFFIX_RULES___ +OBJS= ${ALLFILES:C|\.[csS]$$|.o|} +SRCS= ${ALLFILES:M*.[csS]} +.endif # ___USE_SUFFIX_RULES___ + .if !defined(___USE_SUFFIX_RULES___) .for _s in ${_CFILES} .if !commands(${_s:T:R}.o) @@ -354,9 +350,9 @@ dependall: depend .WAIT all MKDEP_AFLAGS?= ${AFLAGS} MKDEP_CFLAGS?= ${CFLAGS} .if !defined(___USE_SUFFIX_RULES___) -DEPS= ${SRCS:T:u:R:S/$/.d/g} +DEPS= ${SRCS:T:R:S/$/.d/g} .else -DEPS= ${SRCS:u:R:S/$/.d/g} +DEPS= ${SRCS:R:S/$/.d/g} .endif .if !defined(___USE_SUFFIX_RULES___)
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 8 00:53:39 UTC 2015 Modified Files: src/usr.bin/config: TODO Log Message: ${LD} input files and library (*.a) support. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.bin/config/TODO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/TODO diff -u src/usr.bin/config/TODO:1.26 src/usr.bin/config/TODO:1.27 --- src/usr.bin/config/TODO:1.26 Thu Sep 3 05:45:16 2015 +++ src/usr.bin/config/TODO Tue Sep 8 00:53:39 2015 @@ -221,6 +221,18 @@ o Always use explicit kernel linker scri because these have no constraints about page boundary; they map and access kernel .text/.data in the same way. +o Pass input files to ${LD} via linker script. + + Instead of passing input files on command-line, output "INPUT(xxx.o)" + commands, and include it from generated linker scripts. + +o Generate `*.d' files. + + Output source/object files in raw texts instead of `Makefile'. Generate + `*.d' (make(1) depend) files. make(1) knows which object files are to be + compiled. With "INPUT(xxx.o)" linker scripts, either generated `Makefile' + or `Makefile.kern.inc' don't need to keep source/object files in variables. + o Control ELF sections using linker script. Now kernel is linked and built directly from object files (*.o). Each port @@ -420,3 +432,11 @@ o Define genassym(1) symbols per file. When one header is updated, only related *.assym.h files are regenerated, instead of rebuilding all MD/*.S files that depend on the global, single assym.h. + +o Support library. + + Provide a consistent way to build library either as .o or .a. + +o Accept `.a' suffix. + + Make "file" command accept `.a' suffix. Handle it the same way as `.o'.
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 8 02:23:34 UTC 2015 Modified Files: src/usr.bin/config: TODO Log Message: ${MD_OBJS} and friends. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.bin/config/TODO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/TODO diff -u src/usr.bin/config/TODO:1.27 src/usr.bin/config/TODO:1.28 --- src/usr.bin/config/TODO:1.27 Tue Sep 8 00:53:39 2015 +++ src/usr.bin/config/TODO Tue Sep 8 02:23:34 2015 @@ -440,3 +440,13 @@ o Support library. o Accept `.a' suffix. Make "file" command accept `.a' suffix. Handle it the same way as `.o'. + +o Clean up ${MD_OBJS} and friends in Makefile.${MACHINE}. + + Don't use ${MD_OBJS}, ${MD_LIBS}, ${MD_SFILES}, and ${MD_CFILES}. + + List files in config(5)'s "file". Override build rules only when neccesary. + + Rely on the fact that config(1) parses files.${MACHINE} first, outputs + files in the order it parses files.* (actually include depth), and + `Makefile.kern.inc' preserve file order to pass to ${LD}.
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 8 05:48:07 UTC 2015 Modified Files: src/usr.bin/config: TODO Log Message: About ${CTFCONVERT}. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.bin/config/TODO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/TODO diff -u src/usr.bin/config/TODO:1.28 src/usr.bin/config/TODO:1.29 --- src/usr.bin/config/TODO:1.28 Tue Sep 8 02:23:34 2015 +++ src/usr.bin/config/TODO Tue Sep 8 05:48:07 2015 @@ -450,3 +450,9 @@ o Clean up ${MD_OBJS} and friends in Mak Rely on the fact that config(1) parses files.${MACHINE} first, outputs files in the order it parses files.* (actually include depth), and `Makefile.kern.inc' preserve file order to pass to ${LD}. + +o Clean up CTF-related rules. + + Don't overwrite compile/link rules conditionally by existence of + ${CTFCONVERT}/${CTFMERGE}. Give a separate suffix (*.ctfo) and define its + rules (.c -> .ctfo).
CVS commit: src/sys
Module Name:src Committed By: uebayasi Date: Mon Sep 7 03:20:19 UTC 2015 Modified Files: src/sys/arch/acorn26/stand/lib: Makefile src/sys/arch/acorn32/stand/lib: Makefile src/sys/arch/hppa/spmath: Makefile src/sys/arch/i386/stand/lib: Makefile src/sys/arch/ia64/stand/efi/libefi: Makefile src/sys/compat/common: Makefile src/sys/lib/libgnuefi: Makefile src/sys/lib/libkern: Makefile src/sys/lib/libsa: Makefile src/sys/lib/libz: Makefile Log Message: Sprinkle more done messages. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/acorn26/stand/lib/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/acorn32/stand/lib/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/spmath/Makefile cvs rdiff -u -r1.41 -r1.42 src/sys/arch/i386/stand/lib/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/stand/efi/libefi/Makefile cvs rdiff -u -r1.52 -r1.53 src/sys/compat/common/Makefile cvs rdiff -u -r1.1 -r1.2 src/sys/lib/libgnuefi/Makefile cvs rdiff -u -r1.97 -r1.98 src/sys/lib/libkern/Makefile cvs rdiff -u -r1.84 -r1.85 src/sys/lib/libsa/Makefile cvs rdiff -u -r1.19 -r1.20 src/sys/lib/libz/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/acorn26/stand/lib/Makefile diff -u src/sys/arch/acorn26/stand/lib/Makefile:1.1 src/sys/arch/acorn26/stand/lib/Makefile:1.2 --- src/sys/arch/acorn26/stand/lib/Makefile:1.1 Sun Mar 24 15:47:26 2002 +++ src/sys/arch/acorn26/stand/lib/Makefile Mon Sep 7 03:20:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2002/03/24 15:47:26 bjh21 Exp $ +# $NetBSD: Makefile,v 1.2 2015/09/07 03:20:18 uebayasi Exp $ S?= ${.CURDIR}/../../../../ @@ -22,3 +22,4 @@ lib${LIB}.o:: ${OBJS} @echo building standard ${LIB} library @rm -f lib${LIB}.o @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort` + @echo done Index: src/sys/arch/acorn32/stand/lib/Makefile diff -u src/sys/arch/acorn32/stand/lib/Makefile:1.3 src/sys/arch/acorn32/stand/lib/Makefile:1.4 --- src/sys/arch/acorn32/stand/lib/Makefile:1.3 Sat Apr 1 19:08:08 2006 +++ src/sys/arch/acorn32/stand/lib/Makefile Mon Sep 7 03:20:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2006/04/01 19:08:08 bjh21 Exp $ +# $NetBSD: Makefile,v 1.4 2015/09/07 03:20:18 uebayasi Exp $ S?= ${.CURDIR}/../../../../ @@ -24,3 +24,4 @@ lib${LIB}.o:: ${OBJS} @echo building standard ${LIB} library @rm -f lib${LIB}.o @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort` + @echo done Index: src/sys/arch/hppa/spmath/Makefile diff -u src/sys/arch/hppa/spmath/Makefile:1.3 src/sys/arch/hppa/spmath/Makefile:1.4 --- src/sys/arch/hppa/spmath/Makefile:1.3 Sun Dec 11 12:17:40 2005 +++ src/sys/arch/hppa/spmath/Makefile Mon Sep 7 03:20:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2005/12/11 12:17:40 christos Exp $ +# $NetBSD: Makefile,v 1.4 2015/09/07 03:20:18 uebayasi Exp $ # $OpenBSD: Makefile,v 1.4 2000/01/11 21:32:57 mickey Exp $ @@ -27,9 +27,10 @@ ${LIB}.o:: ${OBJS} @echo building standard ${LIB} library @rm -f ${LIB}.o @${LD} -r -o ${LIB}.o `${LORDER} ${OBJS} | tsort` + @echo done ${LIB}.po:: ${POBJS} @echo building profiled ${LIB} library @rm -f ${LIB}.po @${LD} -r -o ${LIB}.po `${LORDER} ${POBJS} | tsort` - + @echo done Index: src/sys/arch/i386/stand/lib/Makefile diff -u src/sys/arch/i386/stand/lib/Makefile:1.41 src/sys/arch/i386/stand/lib/Makefile:1.42 --- src/sys/arch/i386/stand/lib/Makefile:1.41 Thu Apr 16 08:38:36 2015 +++ src/sys/arch/i386/stand/lib/Makefile Mon Sep 7 03:20:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.41 2015/04/16 08:38:36 mrg Exp $ +# $NetBSD: Makefile,v 1.42 2015/09/07 03:20:18 uebayasi Exp $ S?= ${.CURDIR}/../../../.. @@ -52,6 +52,7 @@ lib${LIB}.o:: ${OBJS} @echo building standard ${LIB} library @rm -f lib${LIB}.o @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort` + @echo done # XXX .if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U} == 48 Index: src/sys/arch/ia64/stand/efi/libefi/Makefile diff -u src/sys/arch/ia64/stand/efi/libefi/Makefile:1.2 src/sys/arch/ia64/stand/efi/libefi/Makefile:1.3 --- src/sys/arch/ia64/stand/efi/libefi/Makefile:1.2 Mon Jul 20 04:59:03 2009 +++ src/sys/arch/ia64/stand/efi/libefi/Makefile Mon Sep 7 03:20:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2009/07/20 04:59:03 kiyohara Exp $ +# $NetBSD: Makefile,v 1.3 2015/09/07 03:20:18 uebayasi Exp $ S?= ${.CURDIR}/../../../../../ @@ -36,3 +36,4 @@ lib${LIB}.o:: ${OBJS} @echo building standard ${LIB} $OBJS} library @rm -f lib${LIB}.o @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort` + @echo done Index: src/sys/compat/common/Makefile diff -u src/sys/compat/common/Makefile:1.52 src/sys/compat/common/Makefile:1.53 --- src/sys/compat/common/Makefile:1.52 Fri Apr 4 18:17:36 2014 +++ src/sys/compat/common/Makefile Mon Sep 7 03:20:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.52 2014/04/04 18:17:36
CVS commit: src/sys
Module Name:src Committed By: uebayasi Date: Mon Sep 7 03:44:19 UTC 2015 Modified Files: src/sys/arch/acorn26/stand/lib: Makefile src/sys/arch/acorn32/stand/lib: Makefile src/sys/arch/hppa/spmath: Makefile src/sys/arch/i386/stand/lib: Makefile src/sys/arch/ia64/stand/efi/libefi: Makefile src/sys/compat/common: Makefile src/sys/lib/libgnuefi: Makefile src/sys/lib/libkern: Makefile src/sys/lib/libsa: Makefile src/sys/lib/libz: Makefile Log Message: Order library object build. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/acorn26/stand/lib/Makefile cvs rdiff -u -r1.4 -r1.5 src/sys/arch/acorn32/stand/lib/Makefile cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/spmath/Makefile cvs rdiff -u -r1.42 -r1.43 src/sys/arch/i386/stand/lib/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/efi/libefi/Makefile cvs rdiff -u -r1.53 -r1.54 src/sys/compat/common/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/lib/libgnuefi/Makefile cvs rdiff -u -r1.98 -r1.99 src/sys/lib/libkern/Makefile cvs rdiff -u -r1.85 -r1.86 src/sys/lib/libsa/Makefile cvs rdiff -u -r1.20 -r1.21 src/sys/lib/libz/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/acorn26/stand/lib/Makefile diff -u src/sys/arch/acorn26/stand/lib/Makefile:1.2 src/sys/arch/acorn26/stand/lib/Makefile:1.3 --- src/sys/arch/acorn26/stand/lib/Makefile:1.2 Mon Sep 7 03:20:18 2015 +++ src/sys/arch/acorn26/stand/lib/Makefile Mon Sep 7 03:44:19 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2015/09/07 03:20:18 uebayasi Exp $ +# $NetBSD: Makefile,v 1.3 2015/09/07 03:44:19 uebayasi Exp $ S?= ${.CURDIR}/../../../../ @@ -18,7 +18,7 @@ SRCS+= riscoscalls.S riscoscons.c riscos .undef DESTDIR .include -lib${LIB}.o:: ${OBJS} +lib${LIB}.o:: ${OBJS:O} @echo building standard ${LIB} library @rm -f lib${LIB}.o @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort` Index: src/sys/arch/acorn32/stand/lib/Makefile diff -u src/sys/arch/acorn32/stand/lib/Makefile:1.4 src/sys/arch/acorn32/stand/lib/Makefile:1.5 --- src/sys/arch/acorn32/stand/lib/Makefile:1.4 Mon Sep 7 03:20:18 2015 +++ src/sys/arch/acorn32/stand/lib/Makefile Mon Sep 7 03:44:19 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2015/09/07 03:20:18 uebayasi Exp $ +# $NetBSD: Makefile,v 1.5 2015/09/07 03:44:19 uebayasi Exp $ S?= ${.CURDIR}/../../../../ @@ -20,7 +20,7 @@ SRCS+= riscospart.c .undef DESTDIR .include -lib${LIB}.o:: ${OBJS} +lib${LIB}.o:: ${OBJS:O} @echo building standard ${LIB} library @rm -f lib${LIB}.o @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort` Index: src/sys/arch/hppa/spmath/Makefile diff -u src/sys/arch/hppa/spmath/Makefile:1.4 src/sys/arch/hppa/spmath/Makefile:1.5 --- src/sys/arch/hppa/spmath/Makefile:1.4 Mon Sep 7 03:20:18 2015 +++ src/sys/arch/hppa/spmath/Makefile Mon Sep 7 03:44:19 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2015/09/07 03:20:18 uebayasi Exp $ +# $NetBSD: Makefile,v 1.5 2015/09/07 03:44:19 uebayasi Exp $ # $OpenBSD: Makefile,v 1.4 2000/01/11 21:32:57 mickey Exp $ @@ -23,13 +23,13 @@ install: .include -${LIB}.o:: ${OBJS} +${LIB}.o:: ${OBJS:O} @echo building standard ${LIB} library @rm -f ${LIB}.o @${LD} -r -o ${LIB}.o `${LORDER} ${OBJS} | tsort` @echo done -${LIB}.po:: ${POBJS} +${LIB}.po:: ${POBJS:O} @echo building profiled ${LIB} library @rm -f ${LIB}.po @${LD} -r -o ${LIB}.po `${LORDER} ${POBJS} | tsort` Index: src/sys/arch/i386/stand/lib/Makefile diff -u src/sys/arch/i386/stand/lib/Makefile:1.42 src/sys/arch/i386/stand/lib/Makefile:1.43 --- src/sys/arch/i386/stand/lib/Makefile:1.42 Mon Sep 7 03:20:18 2015 +++ src/sys/arch/i386/stand/lib/Makefile Mon Sep 7 03:44:19 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.42 2015/09/07 03:20:18 uebayasi Exp $ +# $NetBSD: Makefile,v 1.43 2015/09/07 03:44:19 uebayasi Exp $ S?= ${.CURDIR}/../../../.. @@ -48,7 +48,7 @@ SRCS+= biosmca.S biosmemps2.S .undef DESTDIR .include -lib${LIB}.o:: ${OBJS} +lib${LIB}.o:: ${OBJS:O} @echo building standard ${LIB} library @rm -f lib${LIB}.o @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort` Index: src/sys/arch/ia64/stand/efi/libefi/Makefile diff -u src/sys/arch/ia64/stand/efi/libefi/Makefile:1.3 src/sys/arch/ia64/stand/efi/libefi/Makefile:1.4 --- src/sys/arch/ia64/stand/efi/libefi/Makefile:1.3 Mon Sep 7 03:20:18 2015 +++ src/sys/arch/ia64/stand/efi/libefi/Makefile Mon Sep 7 03:44:19 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2015/09/07 03:20:18 uebayasi Exp $ +# $NetBSD: Makefile,v 1.4 2015/09/07 03:44:19 uebayasi Exp $ S?= ${.CURDIR}/../../../../../ @@ -32,7 +32,7 @@ SRCS+= efinet.c #etc. .undef DESTDIR .include -lib${LIB}.o:: ${OBJS} +lib${LIB}.o:: ${OBJS:O} @echo building standard ${LIB} $OBJS} library @rm -f lib${LIB}.o @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort` Index:
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sun Sep 6 06:13:16 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Added Files: src/sys/conf: assym.mk newvers.mk Log Message: Clean up. Move assym.h/vers.c related code out of Makefile.kern.inc. To generate a diff of this commit: cvs rdiff -u -r1.239 -r1.240 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r0 -r1.1 src/sys/conf/assym.mk src/sys/conf/newvers.mk 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.239 src/sys/conf/Makefile.kern.inc:1.240 --- src/sys/conf/Makefile.kern.inc:1.239 Sun Sep 6 04:42:06 2015 +++ src/sys/conf/Makefile.kern.inc Sun Sep 6 06:13:16 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.239 2015/09/06 04:42:06 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.240 2015/09/06 06:13:16 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -307,6 +307,9 @@ _MD_SFILES=${MD_SFILES:C|^$S/||} .endif # ___USE_SUFFIX_RULES___ OBJS= ${COBJS} ${SOBJS} ${OOBJS} +CSRCS= ${_MD_CFILES} ${_CFILES} +SSRCS= ${_MD_SFILES} ${_SFILES} +SRCS= ${CSRCS} ${SSRCS} .if !defined(___USE_SUFFIX_RULES___) .for _s in ${_CFILES} @@ -324,33 +327,6 @@ ${_s:T:R}.o: ${_s} .endfor .endif # !___USE_SUFFIX_RULES___ -assym.h: ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf - ${_MKTARGET_CREATE} - cat ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf | \ - ${GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \ - ${GENASSYM_CPPFLAGS} > assym.h.tmp && \ - mv -f assym.h.tmp assym.h -${_MD_SFILES:C/\.[Ss]/.o/} ${_SFILES:C/\.[Ss]/.o/}: assym.h - -MKREPRO?=no - -.if ${MKREPRO} == "yes" -_NVFLAGS=${NVFLAGS} -r -.else -_NVFLAGS=${NVFLAGS} -.endif - -.if !target(vers.o) -newvers: vers.o -vers.o: ${SYSTEM_OBJ:O} Makefile $S/conf/newvers.sh \ - $S/conf/osrelease.sh ${_NETBSD_VERSION_DEPENDS} - ${_MKMSG_CREATE} vers.c - ${HOST_SH} $S/conf/newvers.sh ${_NVFLAGS} - ${_MKTARGET_COMPILE} - ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c - ${COMPILE_CTFCONVERT} -.endif - ## ## (7) misc targets: install, clean(dir), depend(all), lint, links, tags, ## cscope, mkid @@ -395,9 +371,6 @@ dependall: depend .WAIT all .if !target(.depend) MKDEP_AFLAGS?= ${AFLAGS} MKDEP_CFLAGS?= ${CFLAGS} -SSRCS=${_MD_SFILES} ${_SFILES} -CSRCS=${_MD_CFILES} ${_CFILES} -SRCS=${SSRCS} ${CSRCS} .if !defined(___USE_SUFFIX_RULES___) DEPS= ${SRCS:T:u:R:S/$/.d/g} .else @@ -426,16 +399,6 @@ ${_s:T:R}.d: ${_s} .endfor .endif # !___USE_SUFFIX_RULES___ -assym.d: assym.h - ${_MKTARGET_CREATE} - cat ${GENASSYM_CONF} ${GENASSYM_EXTRAS} | \ - ${GENASSYM} -- ${MKDEP} -f assym.dep -- \ - ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${GENASSYM_CPPFLAGS} - ${TOOL_SED} -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >${.TARGET} - rm -f assym.dep - -DEPS+= assym.d - .depend: ${DEPS} ${_MKTARGET_CREATE} echo "${.ALLSRC}" | ${MKDEP} -D @@ -466,6 +429,8 @@ install-kernel-${MACHINE_NAME}: .endif .endif +.include "${S}/conf/assym.mk" +.include "${S}/conf/newvers.mk" .include "${S}/conf/splash.mk" .include "${S}/conf/mdroot.mk" .include "${S}/conf/lint.mk" @@ -520,13 +485,6 @@ build_kernel: .USE ## .if defined(___USE_SUFFIX_RULES___) -.SUFFIXES: .genassym .assym.h -.genassym.assym.h: - ${_MKTARGET_CREATE} - ${GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \ - ${GENASSYM_CPPFLAGS} < $< > $@ - mv -f $@.tmp $@ - .SUFFIXES: .s .d .s.d: ${_MKTARGET_CREATE} Added files: Index: src/sys/conf/assym.mk diff -u /dev/null src/sys/conf/assym.mk:1.1 --- /dev/null Sun Sep 6 06:13:16 2015 +++ src/sys/conf/assym.mk Sun Sep 6 06:13:16 2015 @@ -0,0 +1,28 @@ +# $NetBSD: assym.mk,v 1.1 2015/09/06 06:13:16 uebayasi Exp $ + +assym.h: ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf + ${_MKTARGET_CREATE} + cat ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf | \ + ${GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \ + ${GENASSYM_CPPFLAGS} > assym.h.tmp && \ + mv -f assym.h.tmp assym.h +${_MD_SFILES:C/\.[Ss]/.o/} ${_SFILES:C/\.[Ss]/.o/}: assym.h + +assym.d: assym.h + ${_MKTARGET_CREATE} + cat ${GENASSYM_CONF} ${GENASSYM_EXTRAS} | \ + ${GENASSYM} -- ${MKDEP} -f assym.dep -- \ + ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${GENASSYM_CPPFLAGS} + ${TOOL_SED} -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >${.TARGET} + rm -f assym.dep + +DEPS+= assym.d + +.if defined(___USE_SUFFIX_RULES___) +.SUFFIXES: .genassym .assym.h +.genassym.assym.h: + ${_MKTARGET_CREATE} + ${GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \ + ${GENASSYM_CPPFLAGS} < $< > $@ + mv -f $@.tmp $@ +.endif # ___USE_SUFFIX_RULES___ Index: src/sys/conf/newvers.mk diff -u /dev/null src/sys/conf/newvers.mk:1.1 --- /dev/null Sun Sep 6 06:13:16 2015 +++ src/sys/conf/newvers.mk Sun
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sun Sep 6 06:41:14 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Added Files: src/sys/conf: ldscript.mk Log Message: Move ldscript related code out of Makefile.kern.inc. To generate a diff of this commit: cvs rdiff -u -r1.240 -r1.241 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r0 -r1.1 src/sys/conf/ldscript.mk 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.240 src/sys/conf/Makefile.kern.inc:1.241 --- src/sys/conf/Makefile.kern.inc:1.240 Sun Sep 6 06:13:16 2015 +++ src/sys/conf/Makefile.kern.inc Sun Sep 6 06:41:14 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.240 2015/09/06 06:13:16 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.241 2015/09/06 06:41:14 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -219,24 +219,6 @@ SYSTEM_LD?= ${_MKSHMSG} " link ${.CUR ${SYSTEM_OBJ:N*swap*netbsd*} ${EXTRA_OBJ} vers.o \ ${OBJS:M*swap${.TARGET}.o} -# Give MD generated ldscript dependency on ${SYSTEM_OBJ} -.if defined(KERNLDSCRIPT) -.if target(${KERNLDSCRIPT}) -${KERNLDSCRIPT}: ${SYSTEM_OBJ} -.endif -.endif - -.if defined(KERNLDSCRIPT) -.for k in ${KERNELS} -EXTRA_CLEAN+= ${k}.ldscript -${k}: ${k}.ldscript -${k}.ldscript: ${KERNLDSCRIPT} assym.h - ${_MKTARGET_CREATE} - ${CPP} -I. ${KERNLDSCRIPT} | grep -v '^#' | grep -v '^$$' >$@ -.endfor -LINKSCRIPT= -T ${.TARGET}.ldscript -.endif - TEXTADDR?= ${LOADADDRESS} # backwards compatibility LINKTEXT?= ${TEXTADDR:C/.+/-Ttext &/} LINKDATA?= ${DATAADDR:C/.+/-Tdata &/} @@ -429,6 +411,7 @@ install-kernel-${MACHINE_NAME}: .endif .endif +.include "${S}/conf/ldscript.mk" .include "${S}/conf/assym.mk" .include "${S}/conf/newvers.mk" .include "${S}/conf/splash.mk" Added files: Index: src/sys/conf/ldscript.mk diff -u /dev/null src/sys/conf/ldscript.mk:1.1 --- /dev/null Sun Sep 6 06:41:14 2015 +++ src/sys/conf/ldscript.mk Sun Sep 6 06:41:14 2015 @@ -0,0 +1,19 @@ +# $NetBSD: ldscript.mk,v 1.1 2015/09/06 06:41:14 uebayasi Exp $ + +# Give MD generated ldscript dependency on ${SYSTEM_OBJ} +.if defined(KERNLDSCRIPT) +.if target(${KERNLDSCRIPT}) +${KERNLDSCRIPT}: ${SYSTEM_OBJ} +.endif +.endif + +.if defined(KERNLDSCRIPT) +.for k in ${KERNELS} +EXTRA_CLEAN+= ${k}.ldscript +${k}: ${k}.ldscript +${k}.ldscript: ${KERNLDSCRIPT} assym.h + ${_MKTARGET_CREATE} + ${CPP} -I. ${KERNLDSCRIPT} | grep -v '^#' | grep -v '^$$' >$@ +.endfor +LINKSCRIPT= -T ${.TARGET}.ldscript +.endif
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: uebayasi Date: Sun Sep 6 07:17:14 UTC 2015 Modified Files: src/sys/arch/amd64/conf: Makefile.amd64 files.amd64 Log Message: Define MD start code at the top of files.${MACHINE} relying on config(1)'s deterministic file output order. No need to define ${MD_OBJS} and its useless, explicit compile rules. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/amd64/conf/Makefile.amd64 cvs rdiff -u -r1.86 -r1.87 src/sys/arch/amd64/conf/files.amd64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/Makefile.amd64 diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.52 src/sys/arch/amd64/conf/Makefile.amd64:1.53 --- src/sys/arch/amd64/conf/Makefile.amd64:1.52 Thu Sep 3 12:33:11 2015 +++ src/sys/arch/amd64/conf/Makefile.amd64 Sun Sep 6 07:17:14 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.amd64,v 1.52 2015/09/03 12:33:11 uebayasi Exp $ +# $NetBSD: Makefile.amd64,v 1.53 2015/09/06 07:17:14 uebayasi Exp $ # Makefile for NetBSD # @@ -56,25 +56,6 @@ KERN_AS= library ## ## (4) local objects, compile rules, and dependencies ## -MD_OBJS= arch/amd64/amd64/locore.o arch/amd64/amd64/vector.o \ - arch/amd64/amd64/copy.o arch/amd64/amd64/spl.o -MD_CFILES= -MD_SFILES= ${AMD64}/amd64/locore.S ${AMD64}/amd64/vector.S \ - ${AMD64}/amd64/copy.S ${AMD64}/amd64/spl.S - -.if !defined(___USE_SUFFIX_RULES___) -locore.o: ${AMD64}/amd64/locore.S assym.h - ${NORMAL_S} - -vector.o: ${AMD64}/amd64/vector.S assym.h - ${NORMAL_S} - -copy.o: ${AMD64}/amd64/copy.S assym.h - ${NORMAL_S} - -spl.o: ${AMD64}/amd64/spl.S assym.h - ${NORMAL_S} -.endif # ___USE_SUFFIX_RULES___ ## ## (5) link settings Index: src/sys/arch/amd64/conf/files.amd64 diff -u src/sys/arch/amd64/conf/files.amd64:1.86 src/sys/arch/amd64/conf/files.amd64:1.87 --- src/sys/arch/amd64/conf/files.amd64:1.86 Mon Dec 15 02:01:41 2014 +++ src/sys/arch/amd64/conf/files.amd64 Sun Sep 6 07:17:14 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.amd64,v 1.86 2014/12/15 02:01:41 christos Exp $ +# $NetBSD: files.amd64,v 1.87 2015/09/06 07:17:14 uebayasi Exp $ # # new style config file for amd64 architecture # @@ -27,6 +27,12 @@ defparam opt_physmem.h PHYSMEM_MAX_ADDR defflag USER_LDT defflag eisa.h EISA +# Start code +file arch/amd64/amd64/locore.S machdep +file arch/amd64/amd64/vector.S machdep +file arch/amd64/amd64/copy.S machdep +file arch/amd64/amd64/spl.S machdep + file arch/amd64/amd64/amd64func.S machdep file arch/amd64/amd64/autoconf.c machdep file arch/amd64/amd64/busfunc.S machdep
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sun Sep 6 14:35:01 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Don't pass ``-DCOPY_SYMTAB'' to ${CC}; it's replaced with opt_copy_symtab.h. To generate a diff of this commit: cvs rdiff -u -r1.241 -r1.242 src/sys/conf/Makefile.kern.inc 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.241 src/sys/conf/Makefile.kern.inc:1.242 --- src/sys/conf/Makefile.kern.inc:1.241 Sun Sep 6 06:41:14 2015 +++ src/sys/conf/Makefile.kern.inc Sun Sep 6 14:35:01 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.241 2015/09/06 06:41:14 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.242 2015/09/06 14:35:01 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -447,12 +447,12 @@ build_kernel: .USE ${k}: $S/kern/kern_ksyms_buf.c .endfor build_kernel: .USE - ${CC} ${CFLAGS} ${CPPFLAGS} -DCOPY_SYMTAB \ + ${CC} ${CFLAGS} ${CPPFLAGS} \ -c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf.o ${SYSTEM_LD_HEAD} ${SYSTEM_LD} kern_ksyms_buf.o ${SYSTEM_LD_TAIL_STAGE1} - ${CC} ${CFLAGS} ${CPPFLAGS} -DCOPY_SYMTAB \ + ${CC} ${CFLAGS} ${CPPFLAGS} \ -DSYMTAB_SPACE=$$(${DBSYM} -P ${.TARGET}${TARGETSFX}) \ -c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf_real.o ${SYSTEM_LD_HEAD}
CVS commit: src/sys
Module Name:src Committed By: uebayasi Date: Sun Sep 6 15:34:56 UTC 2015 Modified Files: src/sys/arch/acorn26/stand/lib: Makefile.inc src/sys/arch/acorn32/stand/lib: Makefile.inc src/sys/arch/hppa/spmath: Makefile.inc src/sys/arch/i386/stand/lib: Makefile.inc src/sys/arch/ia64/stand/efi/libefi: Makefile.inc src/sys/arch/m68k/fpsp: Makefile.inc src/sys/compat/common: Makefile.inc src/sys/lib/libgnuefi: Makefile.inc src/sys/lib/libkern: Makefile.inc src/sys/lib/libsa: Makefile.inc src/sys/lib/libz: Makefile.inc Log Message: In kernel lib build, print message when things not only start bug also end. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/acorn26/stand/lib/Makefile.inc cvs rdiff -u -r1.1 -r1.2 src/sys/arch/acorn32/stand/lib/Makefile.inc cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/spmath/Makefile.inc cvs rdiff -u -r1.14 -r1.15 src/sys/arch/i386/stand/lib/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/stand/efi/libefi/Makefile.inc cvs rdiff -u -r1.18 -r1.19 src/sys/arch/m68k/fpsp/Makefile.inc cvs rdiff -u -r1.20 -r1.21 src/sys/compat/common/Makefile.inc cvs rdiff -u -r1.1 -r1.2 src/sys/lib/libgnuefi/Makefile.inc cvs rdiff -u -r1.42 -r1.43 src/sys/lib/libkern/Makefile.inc cvs rdiff -u -r1.21 -r1.22 src/sys/lib/libsa/Makefile.inc cvs rdiff -u -r1.14 -r1.15 src/sys/lib/libz/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/acorn26/stand/lib/Makefile.inc diff -u src/sys/arch/acorn26/stand/lib/Makefile.inc:1.2 src/sys/arch/acorn26/stand/lib/Makefile.inc:1.3 --- src/sys/arch/acorn26/stand/lib/Makefile.inc:1.2 Sun May 5 10:02:17 2002 +++ src/sys/arch/acorn26/stand/lib/Makefile.inc Sun Sep 6 15:34:55 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.2 2002/05/05 10:02:17 bjh21 Exp $ +# $NetBSD: Makefile.inc,v 1.3 2015/09/06 15:34:55 uebayasi Exp $ # # Configuration variables (default values are below): # @@ -33,21 +33,25 @@ RISCOSMAKE= \ ${RISCOSLIB}: .NOTMAIN .MAKE __always_make_riscoslib @echo making sure the riscos library is up to date... @${RISCOSMAKE} libriscos.a + @echo done clean: .NOTMAIN cleanriscoslib cleanriscoslib: .NOTMAIN @echo cleaning the riscos library objects @if [ -d "${RISCOSDST}" ]; then ${RISCOSMAKE} clean; fi + @echo done cleandir distclean: .NOTMAIN cleandirriscoslib cleandirriscoslib: .NOTMAIN @echo cleandiring the riscos library objects @if [ -d "${RISCOSDST}" ]; then ${RISCOSMAKE} cleandir; fi + @echo done depend: .NOTMAIN dependriscoslib dependriscoslib: .NOTMAIN .MAKE __always_make_riscoslib @echo depending the riscos library objects @${RISCOSMAKE} depend + @echo done __always_make_riscoslib: .NOTMAIN @mkdir -p ${RISCOSDST} Index: src/sys/arch/acorn32/stand/lib/Makefile.inc diff -u src/sys/arch/acorn32/stand/lib/Makefile.inc:1.1 src/sys/arch/acorn32/stand/lib/Makefile.inc:1.2 --- src/sys/arch/acorn32/stand/lib/Makefile.inc:1.1 Sat Dec 28 23:57:38 2002 +++ src/sys/arch/acorn32/stand/lib/Makefile.inc Sun Sep 6 15:34:55 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.1 2002/12/28 23:57:38 reinoud Exp $ +# $NetBSD: Makefile.inc,v 1.2 2015/09/06 15:34:55 uebayasi Exp $ # # Configuration variables (default values are below): # @@ -33,21 +33,25 @@ RISCOSMAKE= \ ${RISCOSLIB}: .NOTMAIN .MAKE __always_make_riscoslib @echo making sure the riscos library is up to date... @${RISCOSMAKE} libriscos.a + @echo done clean: .NOTMAIN cleanriscoslib cleanriscoslib: .NOTMAIN @echo cleaning the riscos library objects @if [ -d "${RISCOSDST}" ]; then ${RISCOSMAKE} clean; fi + @echo done cleandir distclean: .NOTMAIN cleandirriscoslib cleandirriscoslib: .NOTMAIN @echo cleandiring the riscos library objects @if [ -d "${RISCOSDST}" ]; then ${RISCOSMAKE} cleandir; fi + @echo done depend: .NOTMAIN dependriscoslib dependriscoslib: .NOTMAIN .MAKE __always_make_riscoslib @echo depending the riscos library objects @${RISCOSMAKE} depend + @echo done __always_make_riscoslib: .NOTMAIN @mkdir -p ${RISCOSDST} Index: src/sys/arch/hppa/spmath/Makefile.inc diff -u src/sys/arch/hppa/spmath/Makefile.inc:1.6 src/sys/arch/hppa/spmath/Makefile.inc:1.7 --- src/sys/arch/hppa/spmath/Makefile.inc:1.6 Sun Sep 6 02:22:50 2015 +++ src/sys/arch/hppa/spmath/Makefile.inc Sun Sep 6 15:34:55 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.6 2015/09/06 02:22:50 uebayasi Exp $ +# $NetBSD: Makefile.inc,v 1.7 2015/09/06 15:34:55 uebayasi Exp $ # $OpenBSD: Makefile.inc,v 1.4 2001/03/29 03:58:17 mickey Exp $ # @@ -26,20 +26,24 @@ SPMATHMAKE= \ ${SPMATH}: .NOTMAIN .MAKE __always_make_spmath @echo making sure the spmath library is up to date... @${SPMATHMAKE} spmath.o + @echo done ${SPMATH_PROF}: .NOTMAIN .MAKE __always_make_spmath @echo making sure the profiled spmath library is up to
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sun Sep 6 15:20:59 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc ldscript.mk Log Message: More build ordering. To generate a diff of this commit: cvs rdiff -u -r1.242 -r1.243 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.1 -r1.2 src/sys/conf/ldscript.mk 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.242 src/sys/conf/Makefile.kern.inc:1.243 --- src/sys/conf/Makefile.kern.inc:1.242 Sun Sep 6 14:35:01 2015 +++ src/sys/conf/Makefile.kern.inc Sun Sep 6 15:20:59 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.242 2015/09/06 14:35:01 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.243 2015/09/06 15:20:59 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -203,7 +203,7 @@ _MD_OBJS= ${MD_OBJS} SYSTEM_LIB= ${MD_LIBS} ${SYSLIBCOMPAT} ${LIBKERN} SYSTEM_OBJ?= ${_MD_OBJS} ${OBJS} ${SYSTEM_LIB} -SYSTEM_DEP+= Makefile ${SYSTEM_OBJ} +SYSTEM_DEP+= Makefile ${SYSTEM_OBJ:O} .if defined(CTFMERGE) SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o .else @@ -381,7 +381,7 @@ ${_s:T:R}.d: ${_s} .endfor .endif # !___USE_SUFFIX_RULES___ -.depend: ${DEPS} +.depend: ${DEPS:O} ${_MKTARGET_CREATE} echo "${.ALLSRC}" | ${MKDEP} -D .endif Index: src/sys/conf/ldscript.mk diff -u src/sys/conf/ldscript.mk:1.1 src/sys/conf/ldscript.mk:1.2 --- src/sys/conf/ldscript.mk:1.1 Sun Sep 6 06:41:14 2015 +++ src/sys/conf/ldscript.mk Sun Sep 6 15:20:59 2015 @@ -1,9 +1,9 @@ -# $NetBSD: ldscript.mk,v 1.1 2015/09/06 06:41:14 uebayasi Exp $ +# $NetBSD: ldscript.mk,v 1.2 2015/09/06 15:20:59 uebayasi Exp $ # Give MD generated ldscript dependency on ${SYSTEM_OBJ} .if defined(KERNLDSCRIPT) .if target(${KERNLDSCRIPT}) -${KERNLDSCRIPT}: ${SYSTEM_OBJ} +${KERNLDSCRIPT}: ${SYSTEM_OBJ:O} .endif .endif
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sun Sep 6 02:05:11 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Allow MD to link libraries. Build rules are written in MD makefiles until config(1) will support library properly. To generate a diff of this commit: cvs rdiff -u -r1.237 -r1.238 src/sys/conf/Makefile.kern.inc 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.237 src/sys/conf/Makefile.kern.inc:1.238 --- src/sys/conf/Makefile.kern.inc:1.237 Fri Sep 4 06:10:47 2015 +++ src/sys/conf/Makefile.kern.inc Sun Sep 6 02:05:11 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.237 2015/09/04 06:10:47 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.238 2015/09/06 02:05:11 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -211,7 +211,8 @@ _MD_OBJS= ${MD_OBJS} # load lines for config "xxx" will be emitted as: # xxx: ${SYSTEM_DEP} swap.o vers.o build_kernel -SYSTEM_OBJ?= ${_MD_OBJS} ${OBJS} ${SYSLIBCOMPAT} ${LIBKERN} +SYSTEM_LIB= ${MD_LIBS} ${SYSLIBCOMPAT} ${LIBKERN} +SYSTEM_OBJ?= ${_MD_OBJS} ${OBJS} ${SYSTEM_LIB} SYSTEM_DEP+= Makefile ${SYSTEM_OBJ} .if defined(CTFMERGE) SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
CVS commit: src/sys/arch
Module Name:src Committed By: uebayasi Date: Sun Sep 6 02:17:31 UTC 2015 Modified Files: src/sys/arch/amiga/conf: Makefile.amiga src/sys/arch/atari/conf: Makefile.atari src/sys/arch/cesfic/conf: Makefile.cesfic src/sys/arch/hp300/conf: Makefile.hp300 src/sys/arch/luna68k/conf: Makefile.luna68k src/sys/arch/m68k/fpsp: Makefile.inc src/sys/arch/mac68k/conf: Makefile.mac68k src/sys/arch/mvme68k/conf: Makefile.mvme68k src/sys/arch/news68k/conf: Makefile.news68k src/sys/arch/next68k/conf: Makefile.next68k src/sys/arch/x68k/conf: Makefile.x68k Log Message: Declare dependency on fpsp.o via newly introduced ${MD_LIBS} instead of ${MD_OBJS}. ${MD_OBJS} should be used only for objects that must be linked first (i.e., start code). Objects have to be compiled following common compile rules, and have to be generated into common places (i.e., top of kernel build directory). ${MD_LIBS} defines libraries that are built by separate makefiles, under separate directories. `Makefile.kern.inc' doesn't know intermediate library objects. To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/arch/amiga/conf/Makefile.amiga cvs rdiff -u -r1.75 -r1.76 src/sys/arch/atari/conf/Makefile.atari cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cesfic/conf/Makefile.cesfic cvs rdiff -u -r1.91 -r1.92 src/sys/arch/hp300/conf/Makefile.hp300 cvs rdiff -u -r1.26 -r1.27 src/sys/arch/luna68k/conf/Makefile.luna68k cvs rdiff -u -r1.17 -r1.18 src/sys/arch/m68k/fpsp/Makefile.inc cvs rdiff -u -r1.90 -r1.91 src/sys/arch/mac68k/conf/Makefile.mac68k cvs rdiff -u -r1.65 -r1.66 src/sys/arch/mvme68k/conf/Makefile.mvme68k cvs rdiff -u -r1.20 -r1.21 src/sys/arch/news68k/conf/Makefile.news68k cvs rdiff -u -r1.30 -r1.31 src/sys/arch/next68k/conf/Makefile.next68k cvs rdiff -u -r1.63 -r1.64 src/sys/arch/x68k/conf/Makefile.x68k Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amiga/conf/Makefile.amiga diff -u src/sys/arch/amiga/conf/Makefile.amiga:1.108 src/sys/arch/amiga/conf/Makefile.amiga:1.109 --- src/sys/arch/amiga/conf/Makefile.amiga:1.108 Mon May 25 05:48:18 2015 +++ src/sys/arch/amiga/conf/Makefile.amiga Sun Sep 6 02:17:30 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.amiga,v 1.108 2015/05/25 05:48:18 mlelstv Exp $ +# $NetBSD: Makefile.amiga,v 1.109 2015/09/06 02:17:30 uebayasi Exp $ # Makefile for NetBSD # @@ -53,7 +53,8 @@ KERN_AS= obj # for the Motorola 68060 Software Support Package .include "$S/arch/m68k/060sp/Makefile.inc" -MD_OBJS= locore.o ${FPSP} +MD_OBJS= locore.o +MD_LIBS= ${FPSP} MD_CFILES= MD_SFILES= ${AMIGA}/amiga/locore.s Index: src/sys/arch/atari/conf/Makefile.atari diff -u src/sys/arch/atari/conf/Makefile.atari:1.75 src/sys/arch/atari/conf/Makefile.atari:1.76 --- src/sys/arch/atari/conf/Makefile.atari:1.75 Fri Jan 21 15:59:05 2011 +++ src/sys/arch/atari/conf/Makefile.atari Sun Sep 6 02:17:30 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.atari,v 1.75 2011/01/21 15:59:05 joerg Exp $ +# $NetBSD: Makefile.atari,v 1.76 2015/09/06 02:17:30 uebayasi Exp $ # Makefile for NetBSD # @@ -48,7 +48,8 @@ KERN_AS= obj # for the Motorola 68060 Software Support Package .include "$S/arch/m68k/060sp/Makefile.inc" -MD_OBJS= locore.o ${FPSP} +MD_OBJS= locore.o +MD_LIBS= ${FPSP} MD_CFILES= MD_SFILES= ${ATARI}/atari/locore.s Index: src/sys/arch/cesfic/conf/Makefile.cesfic diff -u src/sys/arch/cesfic/conf/Makefile.cesfic:1.18 src/sys/arch/cesfic/conf/Makefile.cesfic:1.19 --- src/sys/arch/cesfic/conf/Makefile.cesfic:1.18 Mon Aug 31 05:46:41 2015 +++ src/sys/arch/cesfic/conf/Makefile.cesfic Sun Sep 6 02:17:30 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.cesfic,v 1.18 2015/08/31 05:46:41 uebayasi Exp $ +# $NetBSD: Makefile.cesfic,v 1.19 2015/09/06 02:17:30 uebayasi Exp $ # Makefile for NetBSD # @@ -48,7 +48,8 @@ KERN_AS= obj # for the Motorola 68040 Floating Point Software Product .include "$S/arch/m68k/fpsp/Makefile.inc" -MD_OBJS= locore.o ${FPSP} +MD_OBJS= locore.o +MD_LIBS= ${FPSP} MD_CFILES= MD_SFILES= ${CESFIC}/cesfic/locore.s Index: src/sys/arch/hp300/conf/Makefile.hp300 diff -u src/sys/arch/hp300/conf/Makefile.hp300:1.91 src/sys/arch/hp300/conf/Makefile.hp300:1.92 --- src/sys/arch/hp300/conf/Makefile.hp300:1.91 Mon Aug 31 05:46:41 2015 +++ src/sys/arch/hp300/conf/Makefile.hp300 Sun Sep 6 02:17:30 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.hp300,v 1.91 2015/08/31 05:46:41 uebayasi Exp $ +# $NetBSD: Makefile.hp300,v 1.92 2015/09/06 02:17:30 uebayasi Exp $ # Makefile for NetBSD # @@ -46,7 +46,8 @@ KERN_AS= obj # for the Motorola 68040 Floating Point Software Product .include "$S/arch/m68k/fpsp/Makefile.inc" -MD_OBJS= locore.o ${FPSP} +MD_OBJS= locore.o +MD_LIBS= ${FPSP} MD_CFILES= MD_SFILES= ${HP300}/hp300/locore.s Index: src/sys/arch/luna68k/conf/Makefile.luna68k diff -u
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: uebayasi Date: Sun Sep 6 02:22:50 UTC 2015 Modified Files: src/sys/arch/hppa/conf: Makefile.hppa src/sys/arch/hppa/spmath: Makefile.inc Log Message: spmath.o is an MD library, not an MD object. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/conf/Makefile.hppa cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/spmath/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/Makefile.hppa diff -u src/sys/arch/hppa/conf/Makefile.hppa:1.4 src/sys/arch/hppa/conf/Makefile.hppa:1.5 --- src/sys/arch/hppa/conf/Makefile.hppa:1.4 Mon Aug 24 14:04:24 2015 +++ src/sys/arch/hppa/conf/Makefile.hppa Sun Sep 6 02:22:50 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.hppa,v 1.4 2015/08/24 14:04:24 uebayasi Exp $ +# $NetBSD: Makefile.hppa,v 1.5 2015/09/06 02:22:50 uebayasi Exp $ # Makefile for NetBSD # @@ -57,7 +57,8 @@ KERN_AS= obj ## ## (4) local objects, compile rules, and dependencies ## -MD_OBJS= locore.o ${LIBSPMATH} +MD_OBJS= locore.o +MD_LIBS= ${LIBSPMATH} MD_CFILES= MD_SFILES= ${HPPA}/hppa/locore.S Index: src/sys/arch/hppa/spmath/Makefile.inc diff -u src/sys/arch/hppa/spmath/Makefile.inc:1.5 src/sys/arch/hppa/spmath/Makefile.inc:1.6 --- src/sys/arch/hppa/spmath/Makefile.inc:1.5 Sat Sep 5 04:44:29 2015 +++ src/sys/arch/hppa/spmath/Makefile.inc Sun Sep 6 02:22:50 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.5 2015/09/05 04:44:29 uebayasi Exp $ +# $NetBSD: Makefile.inc,v 1.6 2015/09/06 02:22:50 uebayasi Exp $ # $OpenBSD: Makefile.inc,v 1.4 2001/03/29 03:58:17 mickey Exp $ # @@ -23,9 +23,6 @@ SPMATHMAKE= \ NM='${NM}' LORDER='${LORDER}' \ XMACHINE='${MACHINE}' XMACHINE_ARCH='${MACHINE_ARCH}' -spmath.o: ${SPMATH} - ln -sf ${SPMATH} $@ - ${SPMATH}: .NOTMAIN .MAKE __always_make_spmath @echo making sure the spmath library is up to date... @${SPMATHMAKE} spmath.o
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sun Sep 6 04:42:06 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Added Files: src/sys/conf: ssp.mk Log Message: Clean up. Move SSP-specific adjustment out of Makefile.kern.inc. To generate a diff of this commit: cvs rdiff -u -r1.238 -r1.239 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r0 -r1.1 src/sys/conf/ssp.mk 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.238 src/sys/conf/Makefile.kern.inc:1.239 --- src/sys/conf/Makefile.kern.inc:1.238 Sun Sep 6 02:05:11 2015 +++ src/sys/conf/Makefile.kern.inc Sun Sep 6 04:42:06 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.238 2015/09/06 02:05:11 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.239 2015/09/06 04:42:06 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -104,16 +104,6 @@ CFLAGS+= -fno-strict-aliasing CFLAGS+= -fno-common .endif -.if ${USE_SSP:Uno} == "yes" -COPTS.kern_ssp.c+= -fno-stack-protector -D__SSP__ -.endif - -# for multi-cpu machines, cpu_hatch() straddles the init of -# __stack_chk_guard, so ensure stack protection is disabled -.if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64" -COPTS.cpu.c+= -fno-stack-protector -.endif - # Use the per-source COPTS variables to add -g to just those # files that match the shell patterns given in ${DEBUGLIST} # @@ -296,25 +286,27 @@ SYSTEM_LD_TAIL_STAGE2+= ${SYSTEM_LD_TAIL CFILES= ${ALLFILES:M*.c} SFILES= ${ALLFILES:M*.[sS]} OFILES= ${ALLFILES:M*.o} + .if !defined(___USE_SUFFIX_RULES___) -OBJS.c= ${CFILES:T:R:C|$|.o|} -OBJS.s= ${SFILES:T:R:C|$|.o|} -OBJS.o= ${OFILES} +COBJS= ${CFILES:T:R:C|$|.o|} +SOBJS= ${SFILES:T:R:C|$|.o|} +OOBJS= ${OFILES} # absolute, generated (build directory), relative (under $S) _CFILES=${CFILES:M/*} ${CFILES:N/*:N*/*} ${CFILES:N/*:M*/*:C|^|$S/|} _SFILES=${SFILES:M/*} ${SFILES:N/*:N*/*} ${SFILES:N/*:M*/*:C|^|$S/|} _MD_CFILES=${MD_CFILES} _MD_SFILES=${MD_SFILES} .else -OBJS.c= ${CFILES:R:C|$|.o|} -OBJS.s= ${SFILES:R:C|$|.o|} -OBJS.o= ${OFILES} +COBJS= ${CFILES:R:C|$|.o|} +SOBJS= ${SFILES:R:C|$|.o|} +OOBJS= ${OFILES} _CFILES=${CFILES} _SFILES=${SFILES} _MD_CFILES=${MD_CFILES:C|^$S/||} _MD_SFILES=${MD_SFILES:C|^$S/||} .endif # ___USE_SUFFIX_RULES___ -OBJS= ${OBJS.c} ${OBJS.s} ${OBJS.o} + +OBJS= ${COBJS} ${SOBJS} ${OOBJS} .if !defined(___USE_SUFFIX_RULES___) .for _s in ${_CFILES} @@ -479,22 +471,12 @@ install-kernel-${MACHINE_NAME}: .include "${S}/conf/lint.mk" .include "${S}/conf/cscope.mk" .include "${S}/conf/gdbinit.mk" +.include "${S}/conf/ssp.mk" ## ## the kernel ## -# The following files use alloca(3) or variable array allocations. -# Their full name is noted as documentation. -VARSTACK=kern/uipc_socket.c miscfs/genfs/genfs_vnops.c \ -nfs/nfs_bio.c uvm/uvm_bio.c \ -uvm/uvm_pager.c dev/ic/aic7xxx.c dev/ic/aic79xx.c arch/xen/i386/gdt.c \ -dev/ofw/ofw_subr.c - -.for __varstack in ${VARSTACK} -COPTS.${__varstack:T} += -Wno-stack-protector -.endfor - AFLAGS+= ${AOPTS.${.IMPSRC:T}} CFLAGS+= ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} Added files: Index: src/sys/conf/ssp.mk diff -u /dev/null src/sys/conf/ssp.mk:1.1 --- /dev/null Sun Sep 6 04:42:06 2015 +++ src/sys/conf/ssp.mk Sun Sep 6 04:42:06 2015 @@ -0,0 +1,28 @@ +# $NetBSD: ssp.mk,v 1.1 2015/09/06 04:42:06 uebayasi Exp $ + +.if ${USE_SSP:Uno} == "yes" +COPTS.kern_ssp.c+= -fno-stack-protector -D__SSP__ +.endif + +# for multi-cpu machines, cpu_hatch() straddles the init of +# __stack_chk_guard, so ensure stack protection is disabled +.if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64" +COPTS.cpu.c+= -fno-stack-protector +.endif + +# The following files use alloca(3) or variable array allocations. +# Their full name is noted as documentation. +VARSTACK= \ + arch/xen/i386/gdt.c \ + dev/ic/aic79xx.c \ + dev/ic/aic7xxx.c \ + dev/ofw/ofw_subr.c \ + kern/uipc_socket.c \ + miscfs/genfs/genfs_vnops.c \ + nfs/nfs_bio.c \ + uvm/uvm_bio.c \ + uvm/uvm_pager.c \ + +.for __varstack in ${VARSTACK} +COPTS.${__varstack:T} += -Wno-stack-protector +.endfor
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Fri Sep 4 10:16:35 UTC 2015 Modified Files: src/usr.bin/config: defs.h files.c mkmakefile.c scan.l Log Message: Sort files in ${ALLFILES} in the order of parsing of `files.*'. config(1) reads the first `files.${MACHINE}' when it encounters `machine'. Then it includes common `files.${MACHINE_SUBARCH}', `files.${MACHINE_ARCH}', and MI `sys/conf/files' at last. This change makes the first "file" in `files.${MACHINE}' appear first in ${ALLFILES}. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/usr.bin/config/defs.h cvs rdiff -u -r1.32 -r1.33 src/usr.bin/config/files.c cvs rdiff -u -r1.67 -r1.68 src/usr.bin/config/mkmakefile.c cvs rdiff -u -r1.24 -r1.25 src/usr.bin/config/scan.l Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.92 src/usr.bin/config/defs.h:1.93 --- src/usr.bin/config/defs.h:1.92 Fri Sep 4 06:10:47 2015 +++ src/usr.bin/config/defs.h Fri Sep 4 10:16:35 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.92 2015/09/04 06:10:47 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.93 2015/09/04 10:16:35 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -353,6 +353,7 @@ struct files { struct nvlist *fi_optf; /* flattened version of above, if needed */ const char *fi_mkrule; /* special make rule, if any */ struct attr *fi_attr; /* owner attr */ + int fi_order; /* score of order in ${ALLFILES} */ TAILQ_ENTRY(files) fi_anext; /* next file in attr */ }; @@ -362,6 +363,9 @@ struct files { #define FI_NEEDSFLAG 0x04 /* needs-flag */ #define FI_HIDDEN 0x08 /* obscured by other(s), base names overlap */ +extern size_t nselfiles; +extern struct files **selfiles; + /* * Condition expressions. */ @@ -613,6 +617,7 @@ u_short currentline(void); int firstfile(const char *); void package(const char *); int include(const char *, int, int, int); +extern int includedepth; /* sem.c, other than for yacc actions */ void initsem(void); Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.32 src/usr.bin/config/files.c:1.33 --- src/usr.bin/config/files.c:1.32 Fri Sep 4 06:01:40 2015 +++ src/usr.bin/config/files.c Fri Sep 4 10:16:35 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.32 2015/09/04 06:01:40 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.33 2015/09/04 10:16:35 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.32 2015/09/04 06:01:40 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.33 2015/09/04 10:16:35 uebayasi Exp $"); #include #include @@ -57,6 +57,10 @@ __RCSID("$NetBSD: files.c,v 1.32 2015/09 extern const char *yyfile; +int nallfiles; +size_t nselfiles; +struct files **selfiles; + /* * We check that each full path name is unique. File base names * should generally also be unique, e.g., having both a net/xx.c and @@ -181,6 +185,7 @@ addfile(const char *path, struct condexp fi->fi_optf = NULL; fi->fi_mkrule = rule; fi->fi_attr = NULL; + fi->fi_order = (int)nallfiles + (includedepth << 16); switch (fi->fi_suffix) { case 'c': TAILQ_INSERT_TAIL(, fi, fi_snext); @@ -202,6 +207,8 @@ addfile(const char *path, struct condexp "unknown suffix"); break; } + CFGDBG(3, "file added `%s' at order score %d", fi->fi_path, fi->fi_order); + nallfiles++; return; bad: if (optx != NULL) { @@ -263,6 +270,21 @@ checkaux(const char *name, void *context return (0); } +static int +cmpfiles(const void *a, const void *b) +{ + const struct files * const *fia = a, * const *fib = b; + int sa = (*fia)->fi_order; + int sb = (*fib)->fi_order; + + if (sa < sb) + return -1; + else if (sa > sb) + return 1; + else + return 0; +} + /* * We have finished reading everything. Tack the files down: calculate * selection and counts as needed. Check that the object files built @@ -277,6 +299,9 @@ fixfiles(void) struct config *cf; char swapname[100]; + /* Place these files at last. */ + int onallfiles = nallfiles; + nallfiles = 1 << 30; addfile("devsw.c", NULL, 0, NULL); addfile("ioconf.c", NULL, 0, NULL); @@ -285,6 +310,7 @@ fixfiles(void) cf->cf_name); addfile(intern(swapname), NULL, 0, NULL); } + nallfiles = onallfiles; err = 0; TAILQ_FOREACH(fi, , fi_next) { @@ -334,6 +360,7 @@ fixfiles(void) } } fi->fi_flags |= FI_SEL; + nselfiles++; CFGDBG(3, "file selected `%s'", fi->fi_path); /* Add other files to the default "netbsd" attribute. */ @@ -343,6 +370,16 @@ fixfiles(void) CFGDBG(3, "file `%s' belongs to attr `%s'", fi->fi_path, fi->fi_attr->a_name); } + + /* Order files. */ + selfiles = malloc(nselfiles * sizeof(fi)); + int i = 0; + TAILQ_FOREACH(fi, , fi_next) { + if ((fi->fi_flags & FI_SEL) == 0) + continue; + selfiles[i++] = fi; + } + qsort(selfiles, nselfiles,
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Fri Sep 4 15:50:48 UTC 2015 Modified Files: src/usr.bin/config: files.c Log Message: Fix segmentation fault. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.bin/config/files.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.33 src/usr.bin/config/files.c:1.34 --- src/usr.bin/config/files.c:1.33 Fri Sep 4 10:16:35 2015 +++ src/usr.bin/config/files.c Fri Sep 4 15:50:48 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.33 2015/09/04 10:16:35 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.34 2015/09/04 15:50:48 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,9 +45,10 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.33 2015/09/04 10:16:35 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.34 2015/09/04 15:50:48 uebayasi Exp $"); #include +#include #include #include #include @@ -379,6 +380,8 @@ fixfiles(void) continue; selfiles[i++] = fi; } + assert(i <= nselfiles); + nselfiles = i; qsort(selfiles, nselfiles, (unsigned)sizeof(fi), cmpfiles); return (err); }
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Fri Sep 4 21:32:54 UTC 2015 Modified Files: src/usr.bin/config: files.c Log Message: Fix previous. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/usr.bin/config/files.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.34 src/usr.bin/config/files.c:1.35 --- src/usr.bin/config/files.c:1.34 Fri Sep 4 15:50:48 2015 +++ src/usr.bin/config/files.c Fri Sep 4 21:32:54 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.34 2015/09/04 15:50:48 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.35 2015/09/04 21:32:54 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.34 2015/09/04 15:50:48 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.35 2015/09/04 21:32:54 uebayasi Exp $"); #include #include @@ -374,7 +374,7 @@ fixfiles(void) /* Order files. */ selfiles = malloc(nselfiles * sizeof(fi)); - int i = 0; + unsigned i = 0; TAILQ_FOREACH(fi, , fi_next) { if ((fi->fi_flags & FI_SEL) == 0) continue;
CVS commit: src/sys/arch/hppa/spmath
Module Name:src Committed By: uebayasi Date: Sat Sep 5 04:44:29 UTC 2015 Modified Files: src/sys/arch/hppa/spmath: Makefile.inc Log Message: Fix build of hppa's spmath.o, as m68k's fpsp.o was done. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/spmath/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/spmath/Makefile.inc diff -u src/sys/arch/hppa/spmath/Makefile.inc:1.4 src/sys/arch/hppa/spmath/Makefile.inc:1.5 --- src/sys/arch/hppa/spmath/Makefile.inc:1.4 Sat Feb 4 11:23:45 2006 +++ src/sys/arch/hppa/spmath/Makefile.inc Sat Sep 5 04:44:29 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.4 2006/02/04 11:23:45 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.5 2015/09/05 04:44:29 uebayasi Exp $ # $OpenBSD: Makefile.inc,v 1.4 2001/03/29 03:58:17 mickey Exp $ # @@ -23,6 +23,9 @@ SPMATHMAKE= \ NM='${NM}' LORDER='${LORDER}' \ XMACHINE='${MACHINE}' XMACHINE_ARCH='${MACHINE_ARCH}' +spmath.o: ${SPMATH} + ln -sf ${SPMATH} $@ + ${SPMATH}: .NOTMAIN .MAKE __always_make_spmath @echo making sure the spmath library is up to date... @${SPMATHMAKE} spmath.o
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Fri Sep 4 06:01:40 UTC 2015 Modified Files: src/usr.bin/config: defs.h files.c main.c Log Message: *.o files don't need special handling at all now. Makefile.kern.inc knows *.o input files don't need to get compiled, but need to get linked. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/usr.bin/config/defs.h cvs rdiff -u -r1.31 -r1.32 src/usr.bin/config/files.c cvs rdiff -u -r1.88 -r1.89 src/usr.bin/config/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.90 src/usr.bin/config/defs.h:1.91 --- src/usr.bin/config/defs.h:1.90 Thu Sep 3 14:23:52 2015 +++ src/usr.bin/config/defs.h Fri Sep 4 06:01:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.90 2015/09/03 14:23:52 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.91 2015/09/04 06:01:40 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -511,7 +511,6 @@ struct numconst { void initfiles(void); void checkfiles(void); int fixfiles(void); /* finalize */ -int fixobjects(void); int fixdevsw(void); void addfile(const char *, struct condexpr *, u_char, const char *); int expr_eval(struct condexpr *, int (*)(const char *, void *), void *); Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.31 src/usr.bin/config/files.c:1.32 --- src/usr.bin/config/files.c:1.31 Fri Sep 4 05:13:32 2015 +++ src/usr.bin/config/files.c Fri Sep 4 06:01:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.31 2015/09/04 05:13:32 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.32 2015/09/04 06:01:40 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.31 2015/09/04 05:13:32 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.32 2015/09/04 06:01:40 uebayasi Exp $"); #include #include @@ -346,36 +346,6 @@ fixfiles(void) return (err); } -/* - * We have finished reading everything. Tack the objects down: calculate - * selection. - */ -int -fixobjects(void) -{ - struct files *fi; - struct nvlist *flathead, **flatp; - int err, sel; - - err = 0; - TAILQ_FOREACH(fi, , fi_snext) { - /* Optional: see if it is to be included. */ - if (fi->fi_optx != NULL) { - flathead = NULL; - flatp = - sel = expr_eval(fi->fi_optx, - fi->fi_flags & FI_NEEDSFLAG ? fixfsel : - fixsel, - ); - fi->fi_optf = flathead; - if (!sel) -continue; - } - - fi->fi_flags |= FI_SEL; - } - return (err); -} /* * We have finished reading everything. Tack the devsws down: calculate Index: src/usr.bin/config/main.c diff -u src/usr.bin/config/main.c:1.88 src/usr.bin/config/main.c:1.89 --- src/usr.bin/config/main.c:1.88 Thu Sep 3 13:53:36 2015 +++ src/usr.bin/config/main.c Fri Sep 4 06:01:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.88 2015/09/03 13:53:36 uebayasi Exp $ */ +/* $NetBSD: main.c,v 1.89 2015/09/04 06:01:40 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: main.c,v 1.88 2015/09/03 13:53:36 uebayasi Exp $"); +__RCSID("$NetBSD: main.c,v 1.89 2015/09/04 06:01:40 uebayasi Exp $"); #ifndef MAKE_BOOTSTRAP #include @@ -479,13 +479,6 @@ main(int argc, char **argv) stop(); /* - * Fix objects and libraries. - */ - yyfile = "fixobjects"; - if (fixobjects()) - stop(); - - /* * Fix device-majors. */ yyfile = "fixdevsw";
CVS commit: src
Module Name:src Committed By: uebayasi Date: Fri Sep 4 06:10:47 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc files src/usr.bin/config: defs.h mkmakefile.c Log Message: Make config(1) output only ${ALLFILES}, selected input files, and pass it to Makefile.kern.inc, where files are filtered by suffix. To generate a diff of this commit: cvs rdiff -u -r1.236 -r1.237 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.1149 -r1.1150 src/sys/conf/files cvs rdiff -u -r1.91 -r1.92 src/usr.bin/config/defs.h cvs rdiff -u -r1.66 -r1.67 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.236 src/sys/conf/Makefile.kern.inc:1.237 --- src/sys/conf/Makefile.kern.inc:1.236 Thu Sep 3 14:23:52 2015 +++ src/sys/conf/Makefile.kern.inc Fri Sep 4 06:10:47 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.236 2015/09/03 14:23:52 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.237 2015/09/04 06:10:47 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -118,7 +118,7 @@ COPTS.cpu.c+= -fno-stack-protector # files that match the shell patterns given in ${DEBUGLIST} # .for i in ${DEBUGLIST} -. for j in ${CFILES:T:M$i.c} +. for j in ${ALLFILES:M*.c:T:M$i.c} COPTS.${j}+=-g . endfor .endfor @@ -292,6 +292,9 @@ SYSTEM_LD_TAIL_STAGE2+= ${SYSTEM_LD_TAIL ## (6) port independent targets and dependencies: assym.h, vers.o ## +CFILES= ${ALLFILES:M*.c} +SFILES= ${ALLFILES:M*.[sS]} +OFILES= ${ALLFILES:M*.o} .if !defined(___USE_SUFFIX_RULES___) OBJS.c= ${CFILES:T:R:C|$|.o|} OBJS.s= ${SFILES:T:R:C|$|.o|} Index: src/sys/conf/files diff -u src/sys/conf/files:1.1149 src/sys/conf/files:1.1150 --- src/sys/conf/files:1.1149 Thu Sep 3 14:23:52 2015 +++ src/sys/conf/files Fri Sep 4 06:10:47 2015 @@ -1,7 +1,7 @@ -# $NetBSD: files,v 1.1149 2015/09/03 14:23:52 uebayasi Exp $ +# $NetBSD: files,v 1.1150 2015/09/04 06:10:47 uebayasi Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 -version 20150845 +version 20150846 # # device classes Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.91 src/usr.bin/config/defs.h:1.92 --- src/usr.bin/config/defs.h:1.91 Fri Sep 4 06:01:40 2015 +++ src/usr.bin/config/defs.h Fri Sep 4 06:10:47 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.91 2015/09/04 06:01:40 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.92 2015/09/04 06:10:47 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 20150845 +#define CONFIG_VERSION 20150846 #define CONFIG_MINVERSION 0 /* Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.66 src/usr.bin/config/mkmakefile.c:1.67 --- src/usr.bin/config/mkmakefile.c:1.66 Fri Sep 4 05:52:15 2015 +++ src/usr.bin/config/mkmakefile.c Fri Sep 4 06:10:47 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.66 2015/09/04 05:52:15 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.67 2015/09/04 06:10:47 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.66 2015/09/04 05:52:15 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.67 2015/09/04 06:10:47 uebayasi Exp $"); #include #include @@ -336,7 +336,7 @@ emitofiles(FILE *fp) { emitallfiles(fp); - fprintf(fp, "OFILES=\t${ALLFILES:M*.o}\n"); + fprintf(fp, "#%%OFILES\n"); } static void @@ -454,7 +454,7 @@ emitcfiles(FILE *fp) { emitallfiles(fp); - fprintf(fp, "CFILES=\t${ALLFILES:M*.c}\n"); + fprintf(fp, "#%%CFILES\n"); } static void @@ -462,7 +462,7 @@ emitsfiles(FILE *fp) { emitallfiles(fp); - fprintf(fp, "SFILES=\t${ALLFILES:M*.[sS]}\n"); + fprintf(fp, "#%%SFILES\n"); } static void
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Thu Sep 3 13:53:36 UTC 2015 Modified Files: src/usr.bin/config: defs.h files.c main.c mkdevsw.c mkheaders.c mkioconf.c mkswap.c Log Message: After thought, revert "Generate *.c files under conf/". Generate *.c files under top build directory. *.c files are never placed just under $S/. Keep this exclusiveness. To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/usr.bin/config/defs.h cvs rdiff -u -r1.27 -r1.28 src/usr.bin/config/files.c cvs rdiff -u -r1.87 -r1.88 src/usr.bin/config/main.c cvs rdiff -u -r1.13 -r1.14 src/usr.bin/config/mkdevsw.c cvs rdiff -u -r1.28 -r1.29 src/usr.bin/config/mkheaders.c cvs rdiff -u -r1.31 -r1.32 src/usr.bin/config/mkioconf.c cvs rdiff -u -r1.9 -r1.10 src/usr.bin/config/mkswap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.88 src/usr.bin/config/defs.h:1.89 --- src/usr.bin/config/defs.h:1.88 Thu Sep 3 09:28:00 2015 +++ src/usr.bin/config/defs.h Thu Sep 3 13:53:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.88 2015/09/03 09:28:00 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.89 2015/09/03 13:53:36 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -433,8 +433,6 @@ struct nvlist *machinesubarches; const char *ioconfname; /* ioconf name, mutually exclusive to machine */ const char *srcdir; /* path to source directory (rel. to build) */ const char *builddir; /* path to build directory */ -int builddirfd; /* dir fd of builddir */ -int buildconfdirfd; /* dir fd of builddir/conf */ const char *defbuilddir; /* default build directory */ const char *ident; /* kernel "ident"ification string */ int errors; /* counts calls to error() */ Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.27 src/usr.bin/config/files.c:1.28 --- src/usr.bin/config/files.c:1.27 Wed Sep 2 05:09:25 2015 +++ src/usr.bin/config/files.c Thu Sep 3 13:53:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.27 2015/09/02 05:09:25 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.28 2015/09/03 13:53:36 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.27 2015/09/02 05:09:25 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.28 2015/09/03 13:53:36 uebayasi Exp $"); #include #include @@ -278,15 +278,13 @@ fixfiles(void) struct config *cf; char swapname[100]; - buildprefix_push("conf"); - addfile("conf/devsw.c", NULL, 0, NULL); - addfile("conf/ioconf.c", NULL, 0, NULL); + addfile("devsw.c", NULL, 0, NULL); + addfile("ioconf.c", NULL, 0, NULL); TAILQ_FOREACH(cf, , cf_next) { - (void)snprintf(swapname, sizeof(swapname), "conf/swap%s.c", + (void)snprintf(swapname, sizeof(swapname), "swap%s.c", cf->cf_name); addfile(intern(swapname), NULL, 0, NULL); } - buildprefix_pop(); } err = 0; Index: src/usr.bin/config/main.c diff -u src/usr.bin/config/main.c:1.87 src/usr.bin/config/main.c:1.88 --- src/usr.bin/config/main.c:1.87 Thu Sep 3 06:08:38 2015 +++ src/usr.bin/config/main.c Thu Sep 3 13:53:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.87 2015/09/03 06:08:38 uebayasi Exp $ */ +/* $NetBSD: main.c,v 1.88 2015/09/03 13:53:36 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: main.c,v 1.87 2015/09/03 06:08:38 uebayasi Exp $"); +__RCSID("$NetBSD: main.c,v 1.88 2015/09/03 13:53:36 uebayasi Exp $"); #ifndef MAKE_BOOTSTRAP #include @@ -100,8 +100,6 @@ extern int yydebug; #endif int dflag; -static const char *buildconfdir = "."; - static struct dlhash *obsopttab; static struct hashtab *mkopttab; static struct nvlist **nextopt; @@ -530,9 +528,6 @@ main(int argc, char **argv) (void)printf("Build directory is %s\n", builddir); (void)printf("Don't forget to run \"make depend\"\n"); - close(buildconfdirfd); - close(builddirfd); - return 0; } @@ -702,7 +697,6 @@ mkallsubdirs(void) mksubdirs(); mksubdirs(); - buildconfdir = "conf"; return 0; } @@ -720,9 +714,6 @@ mksymlinks(void) p = buf; - if ((buildconfdirfd = open(buildconfdir, O_RDONLY)) == -1) - errx(EXIT_FAILURE, "cannot opens %s", buildconfdir); - snprintf(buf, sizeof(buf), "%s/arch/%s/include", srcdir, machine); ret = recreate(p, "machine"); ret = recreate(p, machine); @@ -1498,8 +1489,6 @@ setupdirs(void) errx(EXIT_FAILURE, "cannot create %s", builddir); } else if (!S_ISDIR(st.st_mode)) errx(EXIT_FAILURE, "%s is not a directory", builddir); - if ((builddirfd = open(builddir, O_RDONLY)) == -1) - errx(EXIT_FAILURE, "cannot opens %s", builddir); if (chdir(builddir) == -1) err(EXIT_FAILURE, "cannot change to %s", builddir); if (stat(srcdir, ) == -1) Index: src/usr.bin/config/mkdevsw.c diff -u src/usr.bin/config/mkdevsw.c:1.13
CVS commit: src
Module Name:src Committed By: uebayasi Date: Thu Sep 3 14:23:52 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc files src/usr.bin/config: defs.h files.c Log Message: Add generated *.c files (devsw.c and ioconf.c) to ${CFILES} by config(1) internally. ${MI_CFILES} in Makefile.kern.inc is no longer needed. To generate a diff of this commit: cvs rdiff -u -r1.235 -r1.236 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.1148 -r1.1149 src/sys/conf/files cvs rdiff -u -r1.89 -r1.90 src/usr.bin/config/defs.h cvs rdiff -u -r1.28 -r1.29 src/usr.bin/config/files.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.235 src/sys/conf/Makefile.kern.inc:1.236 --- src/sys/conf/Makefile.kern.inc:1.235 Thu Sep 3 12:31:16 2015 +++ src/sys/conf/Makefile.kern.inc Thu Sep 3 14:23:52 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.235 2015/09/03 12:31:16 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.236 2015/09/03 14:23:52 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -195,15 +195,11 @@ SYSLIBCOMPATLN?= ${COMPATLIBLN} ## .if !defined(___USE_SUFFIX_RULES___) -MI_CFILES= devsw.c ioconf.c _MD_OBJS= ${MD_OBJS:T} .else _MD_OBJS= ${MD_OBJS} .endif -# the need for a MI_SFILES variable is dubitable at best -MI_OBJS=${MI_CFILES:S/.c/.o/} - ## ## (5) link settings ## @@ -215,7 +211,7 @@ MI_OBJS=${MI_CFILES:S/.c/.o/} # load lines for config "xxx" will be emitted as: # xxx: ${SYSTEM_DEP} swap.o vers.o build_kernel -SYSTEM_OBJ?= ${_MD_OBJS} ${MI_OBJS} ${OBJS} ${SYSLIBCOMPAT} ${LIBKERN} +SYSTEM_OBJ?= ${_MD_OBJS} ${OBJS} ${SYSLIBCOMPAT} ${LIBKERN} SYSTEM_DEP+= Makefile ${SYSTEM_OBJ} .if defined(CTFMERGE) SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o @@ -404,7 +400,7 @@ dependall: depend .WAIT all MKDEP_AFLAGS?= ${AFLAGS} MKDEP_CFLAGS?= ${CFLAGS} SSRCS=${_MD_SFILES} ${_SFILES} -CSRCS=${_MD_CFILES} ${MI_CFILES} ${_CFILES} +CSRCS=${_MD_CFILES} ${_CFILES} SRCS=${SSRCS} ${CSRCS} .if !defined(___USE_SUFFIX_RULES___) DEPS= ${SRCS:T:u:R:S/$/.d/g} Index: src/sys/conf/files diff -u src/sys/conf/files:1.1148 src/sys/conf/files:1.1149 --- src/sys/conf/files:1.1148 Thu Sep 3 09:28:00 2015 +++ src/sys/conf/files Thu Sep 3 14:23:52 2015 @@ -1,7 +1,7 @@ -# $NetBSD: files,v 1.1148 2015/09/03 09:28:00 uebayasi Exp $ +# $NetBSD: files,v 1.1149 2015/09/03 14:23:52 uebayasi Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 -version 20150844 +version 20150845 # # device classes Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.89 src/usr.bin/config/defs.h:1.90 --- src/usr.bin/config/defs.h:1.89 Thu Sep 3 13:53:36 2015 +++ src/usr.bin/config/defs.h Thu Sep 3 14:23:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.89 2015/09/03 13:53:36 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.90 2015/09/03 14:23:52 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 20150844 +#define CONFIG_VERSION 20150845 #define CONFIG_MINVERSION 0 /* Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.28 src/usr.bin/config/files.c:1.29 --- src/usr.bin/config/files.c:1.28 Thu Sep 3 13:53:36 2015 +++ src/usr.bin/config/files.c Thu Sep 3 14:23:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.28 2015/09/03 13:53:36 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.29 2015/09/03 14:23:52 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.28 2015/09/03 13:53:36 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.29 2015/09/03 14:23:52 uebayasi Exp $"); #include #include @@ -274,12 +274,13 @@ fixfiles(void) struct nvlist *flathead, **flatp; int err, sel; + addfile("devsw.c", NULL, 0, NULL); + addfile("ioconf.c", NULL, 0, NULL); + if (Sflag) { struct config *cf; char swapname[100]; - addfile("devsw.c", NULL, 0, NULL); - addfile("ioconf.c", NULL, 0, NULL); TAILQ_FOREACH(cf, , cf_next) { (void)snprintf(swapname, sizeof(swapname), "swap%s.c", cf->cf_name);
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Thu Sep 3 06:08:38 UTC 2015 Modified Files: src/usr.bin/config: main.c Log Message: Fix build. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/usr.bin/config/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/main.c diff -u src/usr.bin/config/main.c:1.86 src/usr.bin/config/main.c:1.87 --- src/usr.bin/config/main.c:1.86 Thu Sep 3 02:45:24 2015 +++ src/usr.bin/config/main.c Thu Sep 3 06:08:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.86 2015/09/03 02:45:24 uebayasi Exp $ */ +/* $NetBSD: main.c,v 1.87 2015/09/03 06:08:38 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: main.c,v 1.86 2015/09/03 02:45:24 uebayasi Exp $"); +__RCSID("$NetBSD: main.c,v 1.87 2015/09/03 06:08:38 uebayasi Exp $"); #ifndef MAKE_BOOTSTRAP #include @@ -653,7 +653,7 @@ static int mksubdirs(struct filelist *fl) { struct files *fi; - const char *prefix, *sep; + const char *prologue, *prefix, *sep; char buf[MAXPATHLEN]; TAILQ_FOREACH(fi, fl, fi_next) { @@ -674,7 +674,6 @@ mksubdirs(struct filelist *fl) continue; mksubdir(buf); if (fi->fi_prefix != NULL && fi->fi_buildprefix != NULL) { - const char *prologue, *sep; char org[MAXPATHLEN]; if (fi->fi_prefix[0] == '/') { @@ -704,6 +703,7 @@ mkallsubdirs(void) mksubdirs(); mksubdirs(); buildconfdir = "conf"; + return 0; } /*
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Thu Sep 3 06:10:53 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Sort dependendy to keep alphabetical build order. To generate a diff of this commit: cvs rdiff -u -r1.231 -r1.232 src/sys/conf/Makefile.kern.inc 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.231 src/sys/conf/Makefile.kern.inc:1.232 --- src/sys/conf/Makefile.kern.inc:1.231 Thu Sep 3 06:09:46 2015 +++ src/sys/conf/Makefile.kern.inc Thu Sep 3 06:10:53 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.231 2015/09/03 06:09:46 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.232 2015/09/03 06:10:53 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -343,7 +343,7 @@ _NVFLAGS=${NVFLAGS} .if !target(vers.o) newvers: vers.o -vers.o: ${SYSTEM_OBJ} Makefile $S/conf/newvers.sh \ +vers.o: ${SYSTEM_OBJ:O} Makefile $S/conf/newvers.sh \ $S/conf/osrelease.sh ${_NETBSD_VERSION_DEPENDS} ${_MKMSG_CREATE} vers.c ${HOST_SH} $S/conf/newvers.sh ${_NVFLAGS} @@ -494,7 +494,7 @@ CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} .for k in ${KERNELS} -${k}: ${SYSTEM_DEP} vers.o build_kernel +${k}: ${SYSTEM_DEP:O} vers.o build_kernel .endfor .if !defined(COPY_SYMTAB)
CVS commit: src
Module Name:src Committed By: uebayasi Date: Thu Sep 3 06:09:46 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc files src/usr.bin/config: defs.h mkmakefile.c Log Message: Define kernel dependency in Makefile.kern.inc. To generate a diff of this commit: cvs rdiff -u -r1.230 -r1.231 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.1146 -r1.1147 src/sys/conf/files cvs rdiff -u -r1.86 -r1.87 src/usr.bin/config/defs.h cvs rdiff -u -r1.60 -r1.61 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.230 src/sys/conf/Makefile.kern.inc:1.231 --- src/sys/conf/Makefile.kern.inc:1.230 Thu Sep 3 04:17:55 2015 +++ src/sys/conf/Makefile.kern.inc Thu Sep 3 06:09:46 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.230 2015/09/03 04:17:55 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.231 2015/09/03 06:09:46 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -493,6 +493,10 @@ CFLAGS+= ${COPTS.${.IMPSRC:T}} ${CPUFLAG CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} +.for k in ${KERNELS} +${k}: ${SYSTEM_DEP} vers.o build_kernel +.endfor + .if !defined(COPY_SYMTAB) build_kernel: .USE ${SYSTEM_LD_HEAD} Index: src/sys/conf/files diff -u src/sys/conf/files:1.1146 src/sys/conf/files:1.1147 --- src/sys/conf/files:1.1146 Wed Sep 2 14:17:03 2015 +++ src/sys/conf/files Thu Sep 3 06:09:46 2015 @@ -1,7 +1,7 @@ -# $NetBSD: files,v 1.1146 2015/09/02 14:17:03 uebayasi Exp $ +# $NetBSD: files,v 1.1147 2015/09/03 06:09:46 uebayasi Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 -version 20150842 +version 20150843 # # device classes Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.86 src/usr.bin/config/defs.h:1.87 --- src/usr.bin/config/defs.h:1.86 Wed Sep 2 14:17:03 2015 +++ src/usr.bin/config/defs.h Thu Sep 3 06:09:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.86 2015/09/02 14:17:03 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.87 2015/09/03 06:09:46 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 20150842 +#define CONFIG_VERSION 20150843 #define CONFIG_MINVERSION 0 /* Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.60 src/usr.bin/config/mkmakefile.c:1.61 --- src/usr.bin/config/mkmakefile.c:1.60 Wed Sep 2 16:29:44 2015 +++ src/usr.bin/config/mkmakefile.c Thu Sep 3 06:09:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.60 2015/09/02 16:29:44 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.61 2015/09/03 06:09:46 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.60 2015/09/02 16:29:44 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.61 2015/09/03 06:09:46 uebayasi Exp $"); #include #include @@ -572,8 +572,6 @@ emitload(FILE *fp) cf->cf_name); } fprintf(fp, "KERNELS+=%s\n", cf->cf_name); - fprintf(fp, "%s: ${SYSTEM_DEP}%s vers.o build_kernel\n", - cf->cf_name, swapobj); } fputs("\n", fp); }
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Thu Sep 3 06:24:15 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Kernel depends on swap.o too. To generate a diff of this commit: cvs rdiff -u -r1.232 -r1.233 src/sys/conf/Makefile.kern.inc 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.232 src/sys/conf/Makefile.kern.inc:1.233 --- src/sys/conf/Makefile.kern.inc:1.232 Thu Sep 3 06:10:53 2015 +++ src/sys/conf/Makefile.kern.inc Thu Sep 3 06:24:15 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.232 2015/09/03 06:10:53 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.233 2015/09/03 06:24:15 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -494,7 +494,7 @@ CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} .for k in ${KERNELS} -${k}: ${SYSTEM_DEP:O} vers.o build_kernel +${k}: ${SYSTEM_DEP:O} swap${k}.o vers.o build_kernel .endfor .if !defined(COPY_SYMTAB)
CVS commit: src
Module Name:src Committed By: uebayasi Date: Thu Sep 3 09:28:00 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc files src/usr.bin/config: defs.h mkmakefile.c Log Message: Move `all' target definition to Makefile.kern.inc. To generate a diff of this commit: cvs rdiff -u -r1.233 -r1.234 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.1147 -r1.1148 src/sys/conf/files cvs rdiff -u -r1.87 -r1.88 src/usr.bin/config/defs.h cvs rdiff -u -r1.61 -r1.62 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.233 src/sys/conf/Makefile.kern.inc:1.234 --- src/sys/conf/Makefile.kern.inc:1.233 Thu Sep 3 06:24:15 2015 +++ src/sys/conf/Makefile.kern.inc Thu Sep 3 09:28:00 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.233 2015/09/03 06:24:15 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.234 2015/09/03 09:28:00 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -213,7 +213,7 @@ MI_OBJS=${MI_CFILES:S/.c/.o/} # xxx: ${SYSTEM_DEP} swap.o vers.o build_kernel SYSTEM_OBJ?= ${MD_OBJS} ${MI_OBJS} ${OBJS} ${SYSLIBCOMPAT} ${LIBKERN} -SYSTEM_DEP+= Makefile ${SYSTEM_OBJ} .gdbinit +SYSTEM_DEP+= Makefile ${SYSTEM_OBJ} .if defined(CTFMERGE) SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o .else @@ -493,7 +493,10 @@ CFLAGS+= ${COPTS.${.IMPSRC:T}} ${CPUFLAG CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} +.MAIN: all +all: .gdbinit .for k in ${KERNELS} +all: .WAIT ${k} ${k}: ${SYSTEM_DEP:O} swap${k}.o vers.o build_kernel .endfor Index: src/sys/conf/files diff -u src/sys/conf/files:1.1147 src/sys/conf/files:1.1148 --- src/sys/conf/files:1.1147 Thu Sep 3 06:09:46 2015 +++ src/sys/conf/files Thu Sep 3 09:28:00 2015 @@ -1,7 +1,7 @@ -# $NetBSD: files,v 1.1147 2015/09/03 06:09:46 uebayasi Exp $ +# $NetBSD: files,v 1.1148 2015/09/03 09:28:00 uebayasi Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 -version 20150843 +version 20150844 # # device classes Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.87 src/usr.bin/config/defs.h:1.88 --- src/usr.bin/config/defs.h:1.87 Thu Sep 3 06:09:46 2015 +++ src/usr.bin/config/defs.h Thu Sep 3 09:28:00 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.87 2015/09/03 06:09:46 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.88 2015/09/03 09:28:00 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 20150843 +#define CONFIG_VERSION 20150844 #define CONFIG_MINVERSION 0 /* Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.61 src/usr.bin/config/mkmakefile.c:1.62 --- src/usr.bin/config/mkmakefile.c:1.61 Thu Sep 3 06:09:46 2015 +++ src/usr.bin/config/mkmakefile.c Thu Sep 3 09:28:00 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.61 2015/09/03 06:09:46 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.62 2015/09/03 09:28:00 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.61 2015/09/03 06:09:46 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.62 2015/09/03 09:28:00 uebayasi Exp $"); #include #include @@ -534,19 +534,6 @@ emitload(FILE *fp) { struct config *cf; - fputs(".MAIN: all\n", fp); - fputs("all:", fp); - TAILQ_FOREACH(cf, , cf_next) { - fprintf(fp, " %s", cf->cf_name); - /* - * If we generate multiple configs inside the same build directory - * with a parallel build, strange things may happen, so sequentialize - * them. - */ - if (cf != TAILQ_LAST(,conftq)) - fprintf(fp, " .WAIT"); - } - fputs("\n\n", fp); /* * Generate the backward-compatible "build_kernel" rule if * sys/conf/Makefile.kern.inc doesn't define any (pre-2014 Aug).
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Fri Sep 4 05:13:32 UTC 2015 Modified Files: src/usr.bin/config: files.c mkmakefile.c Log Message: Now Makefile.kern.inc handles swap.c compiling/linking nicely, config(1) can become less hackish. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.bin/config/files.c cvs rdiff -u -r1.64 -r1.65 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/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.30 src/usr.bin/config/files.c:1.31 --- src/usr.bin/config/files.c:1.30 Fri Sep 4 01:24:01 2015 +++ src/usr.bin/config/files.c Fri Sep 4 05:13:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.30 2015/09/04 01:24:01 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.31 2015/09/04 05:13:32 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.30 2015/09/04 01:24:01 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.31 2015/09/04 05:13:32 uebayasi Exp $"); #include #include @@ -274,20 +274,17 @@ fixfiles(void) struct files *fi, *ofi; struct nvlist *flathead, **flatp; int err, sel; + struct config *cf; + char swapname[100]; addfile("devsw.c", NULL, 0, NULL); addfile("ioconf.c", NULL, 0, NULL); - if (Sflag) { - struct config *cf; - char swapname[100]; - - TAILQ_FOREACH(cf, , cf_next) { - (void)snprintf(swapname, sizeof(swapname), "swap%s.c", - cf->cf_name); - addfile(intern(swapname), NULL, 0, NULL); - } - } + TAILQ_FOREACH(cf, , cf_next) { + (void)snprintf(swapname, sizeof(swapname), "swap%s.c", + cf->cf_name); + addfile(intern(swapname), NULL, 0, NULL); + } err = 0; TAILQ_FOREACH(fi, , fi_next) { Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.64 src/usr.bin/config/mkmakefile.c:1.65 --- src/usr.bin/config/mkmakefile.c:1.64 Fri Sep 4 01:24:01 2015 +++ src/usr.bin/config/mkmakefile.c Fri Sep 4 05:13:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.64 2015/09/04 01:24:01 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.65 2015/09/04 05:13:32 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.64 2015/09/04 01:24:01 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.65 2015/09/04 05:13:32 uebayasi Exp $"); #include #include @@ -466,8 +466,6 @@ static void emitfiles(FILE *fp, struct filelist *filelist, int suffix) { struct files *fi; - struct config *cf; - char swapname[100]; int found = 0; TAILQ_FOREACH(fi, filelist, fi_snext) { @@ -479,23 +477,6 @@ emitfiles(FILE *fp, struct filelist *fil emitfilerel(fp, fi); fputs(" \\\n", fp); } - - /* - * The allfiles list does not include the configuration-specific - * C source files. These files should be eliminated someday, but - * for now, we have to add them to ${CFILES} (and only ${CFILES}). - */ - if (!Sflag) { - if (suffix == 'c') { - TAILQ_FOREACH(cf, , cf_next) { - found++; - (void)snprintf(swapname, sizeof(swapname), "swap%s.c", - cf->cf_name); - fprintf(fp, "\t%s \\\n", swapname); - } - } - } - if (found == 0) fprintf(fp, "#%%%cFILES\n", toupper(suffix)); }
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Fri Sep 4 01:24:01 UTC 2015 Modified Files: src/usr.bin/config: files.c mkmakefile.c Log Message: Share more code by making *.o handling less special. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.bin/config/files.c cvs rdiff -u -r1.63 -r1.64 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/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.29 src/usr.bin/config/files.c:1.30 --- src/usr.bin/config/files.c:1.29 Thu Sep 3 14:23:52 2015 +++ src/usr.bin/config/files.c Fri Sep 4 01:24:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.29 2015/09/03 14:23:52 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.30 2015/09/04 01:24:01 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.29 2015/09/03 14:23:52 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.30 2015/09/04 01:24:01 uebayasi Exp $"); #include #include @@ -195,6 +195,7 @@ addfile(const char *path, struct condexp break; case 'o': TAILQ_INSERT_TAIL(, fi, fi_snext); + TAILQ_INSERT_TAIL(, fi, fi_next); break; default: cfgxerror(fi->fi_srcfile, fi->fi_srcline, Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.63 src/usr.bin/config/mkmakefile.c:1.64 --- src/usr.bin/config/mkmakefile.c:1.63 Thu Sep 3 13:32:07 2015 +++ src/usr.bin/config/mkmakefile.c Fri Sep 4 01:24:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.63 2015/09/03 13:32:07 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.64 2015/09/04 01:24:01 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.63 2015/09/03 13:32:07 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.64 2015/09/04 01:24:01 uebayasi Exp $"); #include #include @@ -334,20 +334,8 @@ emitfilerel(FILE *fp, struct files *fi) static void emitobjs(FILE *fp) { - struct files *fi; - int found = 0; - TAILQ_FOREACH(fi, , fi_snext) { - if ((fi->fi_flags & FI_SEL) == 0) - continue; - if (found++ == 0) - fputs("OFILES= \\\n", fp); - putc('\t', fp); - emitfile(fp, fi); - fputs(" \\\n", fp); - } - if (found == 0) - fprintf(fp, "#%%OBJS\n"); + emitfiles(fp, , 'o'); } static void
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Thu Sep 3 13:32:07 UTC 2015 Modified Files: src/usr.bin/config: mkmakefile.c Log Message: Pretty-print `Makefile' output. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 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/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.62 src/usr.bin/config/mkmakefile.c:1.63 --- src/usr.bin/config/mkmakefile.c:1.62 Thu Sep 3 09:28:00 2015 +++ src/usr.bin/config/mkmakefile.c Thu Sep 3 13:32:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.62 2015/09/03 09:28:00 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.63 2015/09/03 13:32:07 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.62 2015/09/03 09:28:00 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.63 2015/09/03 13:32:07 uebayasi Exp $"); #include #include @@ -335,16 +335,19 @@ static void emitobjs(FILE *fp) { struct files *fi; + int found = 0; - fputs("OFILES= \\\n", fp); TAILQ_FOREACH(fi, , fi_snext) { if ((fi->fi_flags & FI_SEL) == 0) continue; + if (found++ == 0) + fputs("OFILES= \\\n", fp); putc('\t', fp); emitfile(fp, fi); fputs(" \\\n", fp); } - putc('\n', fp); + if (found == 0) + fprintf(fp, "#%%OBJS\n"); } static void @@ -477,9 +480,11 @@ emitfiles(FILE *fp, struct filelist *fil struct files *fi; struct config *cf; char swapname[100]; + int found = 0; - fprintf(fp, "%cFILES= \\\n", toupper(suffix)); TAILQ_FOREACH(fi, filelist, fi_snext) { + if (found++ == 0) + fprintf(fp, "%cFILES= \\\n", toupper(suffix)); if ((fi->fi_flags & FI_SEL) == 0) continue; putc('\t', fp); @@ -495,13 +500,16 @@ emitfiles(FILE *fp, struct filelist *fil if (!Sflag) { if (suffix == 'c') { TAILQ_FOREACH(cf, , cf_next) { + found++; (void)snprintf(swapname, sizeof(swapname), "swap%s.c", cf->cf_name); fprintf(fp, "\t%s \\\n", swapname); } } } - putc('\n', fp); + + if (found == 0) + fprintf(fp, "#%%%cFILES\n", toupper(suffix)); } /* @@ -511,6 +519,7 @@ static void emitrules(FILE *fp) { struct files *fi; + int found = 0; TAILQ_FOREACH(fi, , fi_next) { if ((fi->fi_flags & FI_SEL) == 0) @@ -521,7 +530,10 @@ emitrules(FILE *fp) emitfile(fp, fi); putc('\n', fp); fprintf(fp, "\t%s\n\n", fi->fi_mkrule); + found = 1; } + if (found == 0) + fprintf(fp, "#%%RULES\n"); } /* @@ -533,6 +545,7 @@ static void emitload(FILE *fp) { struct config *cf; + int found = 0; /* * Generate the backward-compatible "build_kernel" rule if @@ -559,8 +572,10 @@ emitload(FILE *fp) cf->cf_name); } fprintf(fp, "KERNELS+=%s\n", cf->cf_name); + found = 1; } - fputs("\n", fp); + if (found == 0) + fprintf(fp, "#%%LOAD\n"); } /*
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Thu Sep 3 12:31:16 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Prepare for relative ${MD_OBJS}. To generate a diff of this commit: cvs rdiff -u -r1.234 -r1.235 src/sys/conf/Makefile.kern.inc 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.234 src/sys/conf/Makefile.kern.inc:1.235 --- src/sys/conf/Makefile.kern.inc:1.234 Thu Sep 3 09:28:00 2015 +++ src/sys/conf/Makefile.kern.inc Thu Sep 3 12:31:16 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.234 2015/09/03 09:28:00 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.235 2015/09/03 12:31:16 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -196,6 +196,9 @@ SYSLIBCOMPATLN?= ${COMPATLIBLN} .if !defined(___USE_SUFFIX_RULES___) MI_CFILES= devsw.c ioconf.c +_MD_OBJS= ${MD_OBJS:T} +.else +_MD_OBJS= ${MD_OBJS} .endif # the need for a MI_SFILES variable is dubitable at best @@ -212,7 +215,7 @@ MI_OBJS=${MI_CFILES:S/.c/.o/} # load lines for config "xxx" will be emitted as: # xxx: ${SYSTEM_DEP} swap.o vers.o build_kernel -SYSTEM_OBJ?= ${MD_OBJS} ${MI_OBJS} ${OBJS} ${SYSLIBCOMPAT} ${LIBKERN} +SYSTEM_OBJ?= ${_MD_OBJS} ${MI_OBJS} ${OBJS} ${SYSLIBCOMPAT} ${LIBKERN} SYSTEM_DEP+= Makefile ${SYSTEM_OBJ} .if defined(CTFMERGE) SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o @@ -300,12 +303,16 @@ OBJS.o= ${OFILES} # absolute, generated (build directory), relative (under $S) _CFILES=${CFILES:M/*} ${CFILES:N/*:N*/*} ${CFILES:N/*:M*/*:C|^|$S/|} _SFILES=${SFILES:M/*} ${SFILES:N/*:N*/*} ${SFILES:N/*:M*/*:C|^|$S/|} +_MD_CFILES=${MD_CFILES} +_MD_SFILES=${MD_SFILES} .else OBJS.c= ${CFILES:R:C|$|.o|} OBJS.s= ${SFILES:R:C|$|.o|} OBJS.o= ${OFILES} _CFILES=${CFILES} _SFILES=${SFILES} +_MD_CFILES=${MD_CFILES:C|^$S/||} +_MD_SFILES=${MD_SFILES:C|^$S/||} .endif # ___USE_SUFFIX_RULES___ OBJS= ${OBJS.c} ${OBJS.s} ${OBJS.o} @@ -331,7 +338,7 @@ assym.h: ${GENASSYM_CONF} ${GENASSYM_EXT ${GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \ ${GENASSYM_CPPFLAGS} > assym.h.tmp && \ mv -f assym.h.tmp assym.h -${MD_SFILES:C/\.[Ss]/.o/} ${SFILES:C/\.[Ss]/.o/}: assym.h +${_MD_SFILES:C/\.[Ss]/.o/} ${_SFILES:C/\.[Ss]/.o/}: assym.h MKREPRO?=no @@ -396,8 +403,8 @@ dependall: depend .WAIT all .if !target(.depend) MKDEP_AFLAGS?= ${AFLAGS} MKDEP_CFLAGS?= ${CFLAGS} -SSRCS=${MD_SFILES} ${_SFILES} -CSRCS=${MD_CFILES} ${MI_CFILES} ${_CFILES} +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}
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: uebayasi Date: Thu Sep 3 12:33:12 UTC 2015 Modified Files: src/sys/arch/amd64/conf: Makefile.amd64 Log Message: Define ${MD_OBJS} as relative path. This change makes amd64 kernel buildable for `-S' mode. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/amd64/conf/Makefile.amd64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/Makefile.amd64 diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.51 src/sys/arch/amd64/conf/Makefile.amd64:1.52 --- src/sys/arch/amd64/conf/Makefile.amd64:1.51 Mon Aug 24 14:04:24 2015 +++ src/sys/arch/amd64/conf/Makefile.amd64 Thu Sep 3 12:33:11 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.amd64,v 1.51 2015/08/24 14:04:24 uebayasi Exp $ +# $NetBSD: Makefile.amd64,v 1.52 2015/09/03 12:33:11 uebayasi Exp $ # Makefile for NetBSD # @@ -56,11 +56,13 @@ KERN_AS= library ## ## (4) local objects, compile rules, and dependencies ## -MD_OBJS= locore.o vector.o copy.o spl.o +MD_OBJS= arch/amd64/amd64/locore.o arch/amd64/amd64/vector.o \ + arch/amd64/amd64/copy.o arch/amd64/amd64/spl.o MD_CFILES= MD_SFILES= ${AMD64}/amd64/locore.S ${AMD64}/amd64/vector.S \ ${AMD64}/amd64/copy.S ${AMD64}/amd64/spl.S +.if !defined(___USE_SUFFIX_RULES___) locore.o: ${AMD64}/amd64/locore.S assym.h ${NORMAL_S} @@ -72,6 +74,7 @@ copy.o: ${AMD64}/amd64/copy.S assym.h spl.o: ${AMD64}/amd64/spl.S assym.h ${NORMAL_S} +.endif # ___USE_SUFFIX_RULES___ ## ## (5) link settings
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Fri Sep 4 05:52:15 UTC 2015 Modified Files: src/usr.bin/config: mkmakefile.c Log Message: Output ${ALLFILES}, the list of selected *.[csSo] files, sorted in the exact order config(1) parses "file ..." commands in config(5) files. Define ${CFILES}, ${SFILES}, and ${OFILES} as subset of ${ALLFILES} selected by suffix. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 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/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.65 src/usr.bin/config/mkmakefile.c:1.66 --- src/usr.bin/config/mkmakefile.c:1.65 Fri Sep 4 05:13:32 2015 +++ src/usr.bin/config/mkmakefile.c Fri Sep 4 05:52:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.65 2015/09/04 05:13:32 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.66 2015/09/04 05:52:15 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.65 2015/09/04 05:13:32 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.66 2015/09/04 05:52:15 uebayasi Exp $"); #include #include @@ -63,9 +63,9 @@ __RCSID("$NetBSD: mkmakefile.c,v 1.65 20 */ static void emitdefs(FILE *); -static void emitfiles(FILE *, struct filelist *, int); +static void emitallfiles(FILE *); -static void emitobjs(FILE *); +static void emitofiles(FILE *); static void emitallkobjs(FILE *); static int emitallkobjscb(const char *, void *, void *); static void emitattrkobjs(FILE *); @@ -145,7 +145,7 @@ mkmakefile(void) continue; } if (strcmp(line, "%OBJS\n") == 0) - fn = Mflag ? emitkobjs : emitobjs; + fn = Mflag ? emitkobjs : emitofiles; else if (strcmp(line, "%CFILES\n") == 0) fn = emitcfiles; else if (strcmp(line, "%SFILES\n") == 0) @@ -332,10 +332,11 @@ emitfilerel(FILE *fp, struct files *fi) } static void -emitobjs(FILE *fp) +emitofiles(FILE *fp) { - emitfiles(fp, , 'o'); + emitallfiles(fp); + fprintf(fp, "OFILES=\t${ALLFILES:M*.o}\n"); } static void @@ -452,33 +453,37 @@ static void emitcfiles(FILE *fp) { - emitfiles(fp, , 'c'); + emitallfiles(fp); + fprintf(fp, "CFILES=\t${ALLFILES:M*.c}\n"); } static void emitsfiles(FILE *fp) { - emitfiles(fp, , 's'); + emitallfiles(fp); + fprintf(fp, "SFILES=\t${ALLFILES:M*.[sS]}\n"); } static void -emitfiles(FILE *fp, struct filelist *filelist, int suffix) +emitallfiles(FILE *fp) { struct files *fi; + static int called; int found = 0; - TAILQ_FOREACH(fi, filelist, fi_snext) { - if (found++ == 0) - fprintf(fp, "%cFILES= \\\n", toupper(suffix)); + if (called++ != 0) + return; + TAILQ_FOREACH(fi, , fi_next) { if ((fi->fi_flags & FI_SEL) == 0) continue; + if (found++ == 0) + fprintf(fp, "ALLFILES= \\\n"); putc('\t', fp); emitfilerel(fp, fi); fputs(" \\\n", fp); } - if (found == 0) - fprintf(fp, "#%%%cFILES\n", toupper(suffix)); + fputc('\n', fp); } /*
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Wed Sep 2 16:29:44 UTC 2015 Modified Files: src/usr.bin/config: mkmakefile.c Log Message: Fix build. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 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/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.59 src/usr.bin/config/mkmakefile.c:1.60 --- src/usr.bin/config/mkmakefile.c:1.59 Wed Sep 2 14:17:03 2015 +++ src/usr.bin/config/mkmakefile.c Wed Sep 2 16:29:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.59 2015/09/02 14:17:03 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.60 2015/09/02 16:29:44 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.59 2015/09/02 14:17:03 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.60 2015/09/02 16:29:44 uebayasi Exp $"); #include #include @@ -334,7 +334,6 @@ emitfilerel(FILE *fp, struct files *fi) static void emitobjs(FILE *fp) { - const char *prologue, *prefix, *sep; struct files *fi; fputs("OFILES= \\\n", fp);
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Wed Sep 2 15:29:23 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Clean up `swap.o' handling. To generate a diff of this commit: cvs rdiff -u -r1.222 -r1.223 src/sys/conf/Makefile.kern.inc 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.222 src/sys/conf/Makefile.kern.inc:1.223 --- src/sys/conf/Makefile.kern.inc:1.222 Wed Sep 2 14:17:03 2015 +++ src/sys/conf/Makefile.kern.inc Wed Sep 2 15:29:23 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.222 2015/09/02 14:17:03 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.223 2015/09/02 15:29:23 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -223,6 +223,7 @@ SYSTEM_OBJ?= ${MD_OBJS} ${MI_OBJS} ${OBJ .else SYSTEM_OBJ?= ${MD_OBJS} ${MI_OBJS} ${OBJS:O} ${SYSLIBCOMPAT} ${LIBKERN} .endif +SYSTEM_OBJ_NOSWAP= ${SYSTEM_OBJ:N*swapnetbsd*} SYSTEM_DEP+= Makefile ${SYSTEM_OBJ} .gdbinit .if defined(CTFMERGE) SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o @@ -230,14 +231,10 @@ SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS SYSTEM_CTFMERGE= ${_MKSHECHO} .endif SYSTEM_LD_HEAD?=@rm -f $@ -SYSTEM_LD?= @do_system_ld() { \ - target=$$1; shift; \ - ${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}"; \ +SYSTEM_LD?= ${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}"; \ ${_MKSHECHO}\ - ${LD} -Map $${target}.map --cref ${LINKFLAGS} -o $${target} '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o swap$${target}.o $$@; \ - ${LD} -Map $${target}.map --cref ${LINKFLAGS} -o $${target} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o swap$${target}.o $$@; \ - }; \ - do_system_ld + ${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} '$${SYSTEM_OBJ_NOSWAP}' '$${EXTRA_OBJ}' vers.o '$${OBJS:M*swap${.TARGET}.o}'; \ + ${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} ${SYSTEM_OBJ_NOSWAP} ${EXTRA_OBJ} vers.o ${OBJS:M*swap${.TARGET}.o} # Give MD generated ldscript dependency on ${SYSTEM_OBJ} .if defined(KERNLDSCRIPT) @@ -304,16 +301,17 @@ SYSTEM_LD_TAIL_STAGE2+= ${SYSTEM_LD_TAIL ## .if !defined(___USE_SUFFIX_RULES___) -OBJS= ${CFILES:T:R:C|$|.o|:N*swapnetbsd*} \ +OBJS= ${CFILES:T:R:C|$|.o|} \ ${SFILES:T:R:C|$|.o|} \ ${OFILES} -_CFILES=${CFILES:M/*} ${CFILES:N*swapnetbsd*:N/*:C|^|$S/|} -_SFILES=${SFILES:M/*} ${SFILES:N/*:C|^|$S/|} +# absolute, generated (build directory), relative (under $S) +_CFILES=${CFILES:M/*} ${CFILES:N/*:N*/*} ${CFILES:N/*:M*/*:C|^|$S/|} +_SFILES=${SFILES:M/*} ${SFILES:N/*:N*/*} ${SFILES:N/*:M*/*:C|^|$S/|} .else -OBJS= ${CFILES:R:C|$|.o|:N*swapnetbsd*} \ +OBJS= ${CFILES:R:C|$|.o|} \ ${SFILES:R:C|$|.o|} \ ${OFILES} -_CFILES=${CFILES:N*swapnetbsd*} +_CFILES=${CFILES} _SFILES=${SFILES} .endif # ___USE_SUFFIX_RULES___ @@ -504,7 +502,7 @@ CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} .if !defined(COPY_SYMTAB) build_kernel: .USE ${SYSTEM_LD_HEAD} - ${SYSTEM_LD} ${.TARGET} + ${SYSTEM_LD} ${SYSTEM_LD_TAIL_STAGE2} .else .for k in ${KERNELS} @@ -514,13 +512,13 @@ build_kernel: .USE ${CC} ${CFLAGS} ${CPPFLAGS} -DCOPY_SYMTAB \ -c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf.o ${SYSTEM_LD_HEAD} - ${SYSTEM_LD} ${.TARGET} kern_ksyms_buf.o + ${SYSTEM_LD} kern_ksyms_buf.o ${SYSTEM_LD_TAIL_STAGE1} ${CC} ${CFLAGS} ${CPPFLAGS} -DCOPY_SYMTAB \ -DSYMTAB_SPACE=$$(${DBSYM} -P ${.TARGET}${TARGETSFX}) \ -c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf_real.o ${SYSTEM_LD_HEAD} - ${SYSTEM_LD} ${.TARGET} kern_ksyms_buf_real.o + ${SYSTEM_LD} kern_ksyms_buf_real.o ${SYSTEM_LD_TAIL_STAGE2} .endif
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Wed Sep 2 15:35:52 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Build param.c under conf/ using suffix rules in `-S' mode. To generate a diff of this commit: cvs rdiff -u -r1.223 -r1.224 src/sys/conf/Makefile.kern.inc 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.223 src/sys/conf/Makefile.kern.inc:1.224 --- src/sys/conf/Makefile.kern.inc:1.223 Wed Sep 2 15:29:23 2015 +++ src/sys/conf/Makefile.kern.inc Wed Sep 2 15:35:52 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.223 2015/09/02 15:29:23 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.224 2015/09/02 15:35:52 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -194,18 +194,22 @@ SYSLIBCOMPATLN?= ${COMPATLIBLN} ## MD_CFILES, MD_SFILES, and MD_OBJS, along with build rules for same. ## -MI_CFILES= param.c .if !defined(___USE_SUFFIX_RULES___) +MI_CFILES= param.c MI_CFILES+= devsw.c ioconf.c +.else +MI_CFILES= conf/param.c .endif # the need for a MI_SFILES variable is dubitable at best MI_OBJS=${MI_CFILES:S/.c/.o/} +.if !defined(___USE_SUFFIX_RULES___) param.c: $S/conf/param.c ${_MKTARGET_CREATE} rm -f param.c cp $S/conf/param.c . +.endif ## ## (5) link settings
CVS commit: src/sys
Module Name:src Committed By: uebayasi Date: Thu Sep 3 01:09:38 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc src/sys/kern: files.kern Log Message: Build conf/param.c normally. To generate a diff of this commit: cvs rdiff -u -r1.225 -r1.226 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.8 -r1.9 src/sys/kern/files.kern 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.225 src/sys/conf/Makefile.kern.inc:1.226 --- src/sys/conf/Makefile.kern.inc:1.225 Wed Sep 2 23:03:41 2015 +++ src/sys/conf/Makefile.kern.inc Thu Sep 3 01:09:38 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.225 2015/09/02 23:03:41 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.226 2015/09/03 01:09:38 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -195,22 +195,12 @@ SYSLIBCOMPATLN?= ${COMPATLIBLN} ## .if !defined(___USE_SUFFIX_RULES___) -MI_CFILES= param.c -MI_CFILES+= devsw.c ioconf.c -.else -MI_CFILES= conf/param.c +MI_CFILES= devsw.c ioconf.c .endif # the need for a MI_SFILES variable is dubitable at best MI_OBJS=${MI_CFILES:S/.c/.o/} -.if !defined(___USE_SUFFIX_RULES___) -param.c: $S/conf/param.c - ${_MKTARGET_CREATE} - rm -f param.c - cp $S/conf/param.c . -.endif - ## ## (5) link settings ## Index: src/sys/kern/files.kern diff -u src/sys/kern/files.kern:1.8 src/sys/kern/files.kern:1.9 --- src/sys/kern/files.kern:1.8 Fri Aug 21 02:18:18 2015 +++ src/sys/kern/files.kern Thu Sep 3 01:09:38 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.kern,v 1.8 2015/08/21 02:18:18 uebayasi Exp $ +# $NetBSD: files.kern,v 1.9 2015/09/03 01:09:38 uebayasi Exp $ # # kernel sources @@ -9,6 +9,7 @@ file compat/common/compat_mod.c compat_n file compat/common/compat_sysv_mod.c (compat_netbsd | compat_netbsd32) & (sysvshm | sysvsem | sysvmsg) file conf/debugsyms.c kern +file conf/param.c kern file kern/bufq_disksort.c bufq_disksort file kern/bufq_fcfs.c bufq_fcfs file kern/bufq_priocscan.c bufq_priocscan
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Thu Sep 3 01:30:18 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Stop ordering objects alphabetically now that I am sure I can fix fallouts. To generate a diff of this commit: cvs rdiff -u -r1.226 -r1.227 src/sys/conf/Makefile.kern.inc 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.226 src/sys/conf/Makefile.kern.inc:1.227 --- src/sys/conf/Makefile.kern.inc:1.226 Thu Sep 3 01:09:38 2015 +++ src/sys/conf/Makefile.kern.inc Thu Sep 3 01:30:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.226 2015/09/03 01:09:38 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.227 2015/09/03 01:30:18 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -212,11 +212,7 @@ MI_OBJS=${MI_CFILES:S/.c/.o/} # load lines for config "xxx" will be emitted as: # xxx: ${SYSTEM_DEP} swap.o vers.o build_kernel -.if !empty(OBJS:Mnetbsd.ko) SYSTEM_OBJ?= ${MD_OBJS} ${MI_OBJS} ${OBJS} ${SYSLIBCOMPAT} ${LIBKERN} -.else -SYSTEM_OBJ?= ${MD_OBJS} ${MI_OBJS} ${OBJS:O} ${SYSLIBCOMPAT} ${LIBKERN} -.endif SYSTEM_OBJ_NOSWAP= ${SYSTEM_OBJ:N*swap*netbsd*} SYSTEM_DEP+= Makefile ${SYSTEM_OBJ} .gdbinit .if defined(CTFMERGE)
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Thu Sep 3 01:40:07 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Simplify. Wrap long lines. To generate a diff of this commit: cvs rdiff -u -r1.227 -r1.228 src/sys/conf/Makefile.kern.inc 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.227 src/sys/conf/Makefile.kern.inc:1.228 --- src/sys/conf/Makefile.kern.inc:1.227 Thu Sep 3 01:30:18 2015 +++ src/sys/conf/Makefile.kern.inc Thu Sep 3 01:40:06 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.227 2015/09/03 01:30:18 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.228 2015/09/03 01:40:06 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -213,7 +213,6 @@ MI_OBJS=${MI_CFILES:S/.c/.o/} # xxx: ${SYSTEM_DEP} swap.o vers.o build_kernel SYSTEM_OBJ?= ${MD_OBJS} ${MI_OBJS} ${OBJS} ${SYSLIBCOMPAT} ${LIBKERN} -SYSTEM_OBJ_NOSWAP= ${SYSTEM_OBJ:N*swap*netbsd*} SYSTEM_DEP+= Makefile ${SYSTEM_OBJ} .gdbinit .if defined(CTFMERGE) SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o @@ -223,8 +222,12 @@ SYSTEM_CTFMERGE= ${_MKSHECHO} SYSTEM_LD_HEAD?=@rm -f $@ SYSTEM_LD?= ${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}"; \ ${_MKSHECHO}\ - ${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} '$${SYSTEM_OBJ_NOSWAP}' '$${EXTRA_OBJ}' vers.o '$${OBJS:M*swap${.TARGET}.o}'; \ - ${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} ${SYSTEM_OBJ_NOSWAP} ${EXTRA_OBJ} vers.o ${OBJS:M*swap${.TARGET}.o} + ${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} \ + '$${SYSTEM_OBJ:N*swap*netbsd*}' '$${EXTRA_OBJ}' vers.o \ + ${OBJS:M*swap${.TARGET}.o}; \ + ${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} \ + ${SYSTEM_OBJ:N*swap*netbsd*} ${EXTRA_OBJ} vers.o \ + ${OBJS:M*swap${.TARGET}.o} # Give MD generated ldscript dependency on ${SYSTEM_OBJ} .if defined(KERNLDSCRIPT)
CVS commit: src/sys/lib/libx86emu
Module Name:src Committed By: uebayasi Date: Thu Sep 3 02:46:04 UTC 2015 Modified Files: src/sys/lib/libx86emu: files.x86emu Log Message: Set buildprefix. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libx86emu/files.x86emu Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libx86emu/files.x86emu diff -u src/sys/lib/libx86emu/files.x86emu:1.4 src/sys/lib/libx86emu/files.x86emu:1.5 --- src/sys/lib/libx86emu/files.x86emu:1.4 Tue Sep 1 13:46:29 2015 +++ src/sys/lib/libx86emu/files.x86emu Thu Sep 3 02:46:04 2015 @@ -1,11 +1,13 @@ defflag X86EMU prefix ../common/lib/libx86emu +buildprefix lib/libx86emu file x86emu.c x86emu file x86emu_i8254.c x86emu file x86emu_util.c x86emu +buildprefix prefix makeoptions x86emu CPPFLAGS+="-I$S/../common/include"
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Thu Sep 3 02:45:24 UTC 2015 Modified Files: src/usr.bin/config: main.c Log Message: In `-S' mode, create symlinks from outside of $S to build directory, for files that are placed outside of $S, so that `Makefile.kern.inc' can see all files under either $S or build directory. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/usr.bin/config/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/main.c diff -u src/usr.bin/config/main.c:1.85 src/usr.bin/config/main.c:1.86 --- src/usr.bin/config/main.c:1.85 Wed Sep 2 05:09:25 2015 +++ src/usr.bin/config/main.c Thu Sep 3 02:45:24 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.85 2015/09/02 05:09:25 uebayasi Exp $ */ +/* $NetBSD: main.c,v 1.86 2015/09/03 02:45:24 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: main.c,v 1.85 2015/09/02 05:09:25 uebayasi Exp $"); +__RCSID("$NetBSD: main.c,v 1.86 2015/09/03 02:45:24 uebayasi Exp $"); #ifndef MAKE_BOOTSTRAP #include @@ -125,7 +125,7 @@ static int undo_option(struct hashtab *, static int crosscheck(void); static int badstar(void); int main(int, char **); -static int mksubdirs(void); +static int mkallsubdirs(void); static int mksymlinks(void); static int mkident(void); static int devbase_has_dead_instances(const char *, void *, void *); @@ -524,7 +524,7 @@ main(int argc, char **argv) /* * Ready to go. Build all the various files. */ - if ((Sflag && mksubdirs()) || mksymlinks() || mkmakefile() || mkheaders() || mkswap() || + if ((Sflag && mkallsubdirs()) || mksymlinks() || mkmakefile() || mkheaders() || mkswap() || mkioconf() || (do_devsw ? mkdevsw() : 0) || mkident() || errors) stop(); (void)printf("Build directory is %s\n", builddir); @@ -650,13 +650,13 @@ mksubdir(char *buf) } static int -mksubdirs(void) +mksubdirs(struct filelist *fl) { struct files *fi; const char *prefix, *sep; char buf[MAXPATHLEN]; - TAILQ_FOREACH(fi, , fi_next) { + TAILQ_FOREACH(fi, fl, fi_next) { if ((fi->fi_flags & FI_SEL) == 0) continue; prefix = sep = ""; @@ -673,13 +673,39 @@ mksubdirs(void) if (buf[0] == '\0') continue; mksubdir(buf); + if (fi->fi_prefix != NULL && fi->fi_buildprefix != NULL) { + const char *prologue, *sep; + char org[MAXPATHLEN]; + + if (fi->fi_prefix[0] == '/') { +prologue = ""; +sep = ""; + } else { +prologue = srcdir; +sep = "/"; + } + snprintf(buf, sizeof(buf), "%s%s%s", + fi->fi_buildprefix, "/", fi->fi_path); + snprintf(org, sizeof(org), "%s%s%s%s%s", + prologue, sep, fi->fi_prefix, "/", fi->fi_path); + recreate(org, buf); + fi->fi_prefix = fi->fi_buildprefix; + fi->fi_buildprefix = NULL; + } } - buildconfdir = "conf"; - return 0; } +static int +mkallsubdirs(void) +{ + + mksubdirs(); + mksubdirs(); + buildconfdir = "conf"; +} + /* * Make a symlink for "machine" so that "#include " works, * and for the machine's CPU architecture, so that works as well.
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Thu Sep 3 04:17:55 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Rename ${COMPILE.c} to ${KCOMPILE.c} to avoid potential conflicts with those in sys.mk. Define .go/.po suffix rules. To generate a diff of this commit: cvs rdiff -u -r1.229 -r1.230 src/sys/conf/Makefile.kern.inc 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.229 src/sys/conf/Makefile.kern.inc:1.230 --- src/sys/conf/Makefile.kern.inc:1.229 Thu Sep 3 03:47:25 2015 +++ src/sys/conf/Makefile.kern.inc Thu Sep 3 04:17:55 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.229 2015/09/03 03:47:25 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.230 2015/09/03 04:17:55 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -137,28 +137,28 @@ COMPILE_CTFCONVERT= ${_MKSHECHO}\ COMPILE_CTFCONVERT= ${_MKSHNOECHO} .endif -COMPILE.c= ${CC} ${COPTS.${<:T}} ${CFLAGS} ${CPPFLAGS} -c $< -o $@ -COMPILE.s= ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} -c $< -o $@ -LINK.o= ${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC} +KCOMPILE.c= ${CC} ${COPTS.${<:T}} ${CFLAGS} ${CPPFLAGS} -c $< -o $@ +KCOMPILE.s= ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} -c $< -o $@ +KLINK.o= ${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC} # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or # NOPROF and SUFFIX is the file suffix, capitalized (e.g. C for a .c file). NORMAL_C?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" && \ - ${_MKSHECHO} ${COMPILE.c} ${PROF} && \ - ${COMPILE.c} ${PROF} && \ + ${_MKSHECHO} ${KCOMPILE.c} ${PROF} && \ + ${KCOMPILE.c} ${PROF} && \ ${COMPILE_CTFCONVERT} NOPROF_C?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" && \ - ${_MKSHECHO} ${COMPILE.c} && \ - ${COMPILE.c} && \ + ${_MKSHECHO} ${KCOMPILE.c} && \ + ${KCOMPILE.c} && \ ${COMPILE_CTFCONVERT} NORMAL_S?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" && \ - ${_MKSHECHO} ${COMPILE.s} && \ - ${COMPILE.s} + ${_MKSHECHO} ${KCOMPILE.s} && \ + ${KCOMPILE.s} # link rules: LINK_O?= @${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}" && \ - ${_MKSHECHO} ${LINK.o} && \ - ${LINK.o} + ${_MKSHECHO} ${KLINK.o} && \ + ${KLINK.o} ## ## (3) libkern and compat @@ -294,19 +294,20 @@ SYSTEM_LD_TAIL_STAGE2+= ${SYSTEM_LD_TAIL ## .if !defined(___USE_SUFFIX_RULES___) -OBJS= ${CFILES:T:R:C|$|.o|} \ - ${SFILES:T:R:C|$|.o|} \ - ${OFILES} +OBJS.c= ${CFILES:T:R:C|$|.o|} +OBJS.s= ${SFILES:T:R:C|$|.o|} +OBJS.o= ${OFILES} # absolute, generated (build directory), relative (under $S) _CFILES=${CFILES:M/*} ${CFILES:N/*:N*/*} ${CFILES:N/*:M*/*:C|^|$S/|} _SFILES=${SFILES:M/*} ${SFILES:N/*:N*/*} ${SFILES:N/*:M*/*:C|^|$S/|} .else -OBJS= ${CFILES:R:C|$|.o|} \ - ${SFILES:R:C|$|.o|} \ - ${OFILES} +OBJS.c= ${CFILES:R:C|$|.o|} +OBJS.s= ${SFILES:R:C|$|.o|} +OBJS.o= ${OFILES} _CFILES=${CFILES} _SFILES=${SFILES} .endif # ___USE_SUFFIX_RULES___ +OBJS= ${OBJS.c} ${OBJS.s} ${OBJS.o} .if !defined(___USE_SUFFIX_RULES___) .for _s in ${_CFILES} @@ -548,17 +549,49 @@ build_kernel: .USE ${MKDEP} -f $@.tmp -- ${MKDEP_CFLAGS} ${CPPFLAGS} ${CPPFLAGS.${<:T}} $< mv -f $@.tmp $@ -.SUFFIXES: .c .o +.SUFFIXES: .c .o .go .po .c.o: - ${NORMAL_C} + @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" + @${_MKSHECHO} ${KCOMPILE.c} + @${KCOMPILE.c} + @${COMPILE_CTFCONVERT} +.c.go: + @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" + @${_MKSHECHO} ${KCOMPILE.c} -g + @${KCOMPILE.c} -g + @${COMPILE_CTFCONVERT} +.c.po: + @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" + @${_MKSHECHO} ${KCOMPILE.c} -pg + @${KCOMPILE.c} -pg + @${COMPILE_CTFCONVERT} -.SUFFIXES: .s .o +.SUFFIXES: .s .o .go .po .s.o: - ${NORMAL_S} + @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" + @${_MKSHECHO} ${KCOMPILE.s} + @${KCOMPILE.s} +.s.go: + @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" + @${_MKSHECHO} ${KCOMPILE.s} -g + @${KCOMPILE.s} -g +.s.po: + @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" + @${_MKSHECHO} ${KCOMPILE.s} -pg + @${KCOMPILE.s} -pg -.SUFFIXES: .S .o .S.o: - ${NORMAL_S} + @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" + @${_MKSHECHO} ${KCOMPILE.s} + @${KCOMPILE.s} +.S.go: + @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" + @${_MKSHECHO} ${KCOMPILE.s} -g + @${KCOMPILE.s} -g +.S.po: + @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" + @${_MKSHECHO} ${KCOMPILE.s} -pg + @${KCOMPILE.s} -pg .endif # ___USE_SUFFIX_RULES___ ##
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Thu Sep 3 03:47:25 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Refactor. To generate a diff of this commit: cvs rdiff -u -r1.228 -r1.229 src/sys/conf/Makefile.kern.inc 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.228 src/sys/conf/Makefile.kern.inc:1.229 --- src/sys/conf/Makefile.kern.inc:1.228 Thu Sep 3 01:40:06 2015 +++ src/sys/conf/Makefile.kern.inc Thu Sep 3 03:47:25 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.228 2015/09/03 01:40:06 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.229 2015/09/03 03:47:25 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -137,28 +137,28 @@ COMPILE_CTFCONVERT= ${_MKSHECHO}\ COMPILE_CTFCONVERT= ${_MKSHNOECHO} .endif +COMPILE.c= ${CC} ${COPTS.${<:T}} ${CFLAGS} ${CPPFLAGS} -c $< -o $@ +COMPILE.s= ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} -c $< -o $@ +LINK.o= ${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC} + # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or # NOPROF and SUFFIX is the file suffix, capitalized (e.g. C for a .c file). NORMAL_C?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" && \ - ${_MKSHECHO}\ - ${CC} ${COPTS.${<:T}} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< -o $@ && \ - ${CC} ${COPTS.${<:T}} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< -o $@ && \ + ${_MKSHECHO} ${COMPILE.c} ${PROF} && \ + ${COMPILE.c} ${PROF} && \ ${COMPILE_CTFCONVERT} NOPROF_C?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" && \ - ${_MKSHECHO}\ - ${CC} ${COPTS.${<:T}} ${CFLAGS} ${CPPFLAGS} -c $< -o $@ && \ - ${CC} ${COPTS.${<:T}} ${CFLAGS} ${CPPFLAGS} -c $< -o $@ && \ + ${_MKSHECHO} ${COMPILE.c} && \ + ${COMPILE.c} && \ ${COMPILE_CTFCONVERT} NORMAL_S?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}" && \ - ${_MKSHECHO}\ - ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} -c $< -o $@ && \ - ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} -c $< -o $@ + ${_MKSHECHO} ${COMPILE.s} && \ + ${COMPILE.s} # link rules: LINK_O?= @${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}" && \ - ${_MKSHECHO}\ - ${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC} && \ - ${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC} + ${_MKSHECHO} ${LINK.o} && \ + ${LINK.o} ## ## (3) libkern and compat
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Wed Sep 2 23:03:41 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Fix link of kernels whose name don't start with "netbsd*". To generate a diff of this commit: cvs rdiff -u -r1.224 -r1.225 src/sys/conf/Makefile.kern.inc 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.224 src/sys/conf/Makefile.kern.inc:1.225 --- src/sys/conf/Makefile.kern.inc:1.224 Wed Sep 2 15:35:52 2015 +++ src/sys/conf/Makefile.kern.inc Wed Sep 2 23:03:41 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.224 2015/09/02 15:35:52 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.225 2015/09/02 23:03:41 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -227,7 +227,7 @@ SYSTEM_OBJ?= ${MD_OBJS} ${MI_OBJS} ${OBJ .else SYSTEM_OBJ?= ${MD_OBJS} ${MI_OBJS} ${OBJS:O} ${SYSLIBCOMPAT} ${LIBKERN} .endif -SYSTEM_OBJ_NOSWAP= ${SYSTEM_OBJ:N*swapnetbsd*} +SYSTEM_OBJ_NOSWAP= ${SYSTEM_OBJ:N*swap*netbsd*} SYSTEM_DEP+= Makefile ${SYSTEM_OBJ} .gdbinit .if defined(CTFMERGE) SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
CVS commit: src
Module Name:src Committed By: uebayasi Date: Wed Sep 2 13:42:14 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc files src/usr.bin/config: defs.h mkmakefile.c Log Message: Output relative path for ${CFILES} and ${SFILES} in generated `Makefile'. `Makefile.kern.inc' knows how to deal with $S prefix, so don't bother it in config(1). To generate a diff of this commit: cvs rdiff -u -r1.220 -r1.221 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.1144 -r1.1145 src/sys/conf/files cvs rdiff -u -r1.84 -r1.85 src/usr.bin/config/defs.h cvs rdiff -u -r1.57 -r1.58 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.220 src/sys/conf/Makefile.kern.inc:1.221 --- src/sys/conf/Makefile.kern.inc:1.220 Wed Sep 2 12:38:48 2015 +++ src/sys/conf/Makefile.kern.inc Wed Sep 2 13:42:14 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.220 2015/09/02 12:38:48 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.221 2015/09/02 13:42:14 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -160,20 +160,6 @@ LINK_O?= @${_MKSHMSG} " link ${.CURDI ${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC} && \ ${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC} -.for _s in ${CFILES} -.if !commands(${_s:T:R}.o) -${_s:T:R}.o: ${_s} - ${NORMAL_C} -.endif -.endfor - -.for _s in ${SFILES} -.if !commands(${_s:T:R}.o) -${_s:T:R}.o: ${_s} - ${NORMAL_S} -.endif -.endfor - ## ## (3) libkern and compat ## @@ -317,6 +303,23 @@ 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/|} +_SFILES=${SFILES:M/*} ${SFILES:N/*:C|^|$S/|} + +.for _s in ${_CFILES} +.if !commands(${_s:T:R}.o) +${_s:T:R}.o: ${_s} + ${NORMAL_C} +.endif +.endfor + +.for _s in ${_SFILES} +.if !commands(${_s:T:R}.o) +${_s:T:R}.o: ${_s} + ${NORMAL_S} +.endif +.endfor + assym.h: ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf ${_MKTARGET_CREATE} cat ${GENASSYM_CONF} ${GENASSYM_EXTRAS} $S/conf/genassym.cf | \ @@ -388,8 +391,8 @@ dependall: depend .WAIT all .if !target(.depend) MKDEP_AFLAGS?= ${AFLAGS} MKDEP_CFLAGS?= ${CFLAGS} -SSRCS=${MD_SFILES} ${SFILES} -CSRCS=${MD_CFILES} ${MI_CFILES} ${CFILES} +SSRCS=${MD_SFILES} ${_SFILES} +CSRCS=${MD_CFILES} ${MI_CFILES} ${_CFILES} SRCS=${SSRCS} ${CSRCS} DEPS= ${SRCS:T:u:R:S/$/.d/g} Index: src/sys/conf/files diff -u src/sys/conf/files:1.1144 src/sys/conf/files:1.1145 --- src/sys/conf/files:1.1144 Sun Aug 30 07:52:30 2015 +++ src/sys/conf/files Wed Sep 2 13:42:14 2015 @@ -1,7 +1,7 @@ -# $NetBSD: files,v 1.1144 2015/08/30 07:52:30 uebayasi Exp $ +# $NetBSD: files,v 1.1145 2015/09/02 13:42:14 uebayasi Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 -version 20150832 +version 20150841 # # device classes Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.84 src/usr.bin/config/defs.h:1.85 --- src/usr.bin/config/defs.h:1.84 Wed Sep 2 05:09:25 2015 +++ src/usr.bin/config/defs.h Wed Sep 2 13:42:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.84 2015/09/02 05:09:25 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.85 2015/09/02 13:42:14 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 20150840 +#define CONFIG_VERSION 20150841 #define CONFIG_MINVERSION 0 /* Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.57 src/usr.bin/config/mkmakefile.c:1.58 --- src/usr.bin/config/mkmakefile.c:1.57 Wed Sep 2 13:06:06 2015 +++ src/usr.bin/config/mkmakefile.c Wed Sep 2 13:42:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.57 2015/09/02 13:06:06 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.58 2015/09/02 13:42:14 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.57 2015/09/02 13:06:06 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.58 2015/09/02 13:42:14 uebayasi Exp $"); #include #include @@ -317,6 +317,21 @@ emitfile(FILE *fp, struct files *fi) } static void +emitfilerel(FILE *fp, struct files *fi) +{ + const char *prefix, *sep; + + prefix = sep = ""; + if (*fi->fi_path != '/') { + if (fi->fi_prefix != NULL) { + prefix = fi->fi_prefix; + sep = "/"; + } + } + fprintf(fp, "%s%s%s", prefix, sep, fi->fi_path); +} + +static void emitobjs(FILE *fp) { const char *prologue, *prefix, *sep; @@ -475,7 +490,7 @@ emitfiles(FILE *fp, struct filelist *fil if ((fi->fi_flags &
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Wed Sep 2 12:38:48 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Add swap.o to common ${SYSTEM_LD} as it is always linked. To generate a diff of this commit: cvs rdiff -u -r1.219 -r1.220 src/sys/conf/Makefile.kern.inc 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.219 src/sys/conf/Makefile.kern.inc:1.220 --- src/sys/conf/Makefile.kern.inc:1.219 Wed Sep 2 03:22:41 2015 +++ src/sys/conf/Makefile.kern.inc Wed Sep 2 12:38:48 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.219 2015/09/02 03:22:41 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.220 2015/09/02 12:38:48 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -248,8 +248,8 @@ SYSTEM_LD?= @do_system_ld() { \ target=$$1; shift; \ ${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}"; \ ${_MKSHECHO}\ - ${LD} -Map $${target}.map --cref ${LINKFLAGS} -o $${target} '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o $$@; \ - ${LD} -Map $${target}.map --cref ${LINKFLAGS} -o $${target} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o $$@; \ + ${LD} -Map $${target}.map --cref ${LINKFLAGS} -o $${target} '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o swap$${target}.o $$@; \ + ${LD} -Map $${target}.map --cref ${LINKFLAGS} -o $${target} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o swap$${target}.o $$@; \ }; \ do_system_ld @@ -482,11 +482,7 @@ CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} .if !defined(COPY_SYMTAB) build_kernel: .USE ${SYSTEM_LD_HEAD} -.if !defined(___USE_SUFFIX_RULES___) - ${SYSTEM_LD} ${.TARGET} swap${.TARGET}.o -.else ${SYSTEM_LD} ${.TARGET} -.endif ${SYSTEM_LD_TAIL_STAGE2} .else .for k in ${KERNELS} @@ -496,21 +492,13 @@ build_kernel: .USE ${CC} ${CFLAGS} ${CPPFLAGS} -DCOPY_SYMTAB \ -c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf.o ${SYSTEM_LD_HEAD} -.if !defined(___USE_SUFFIX_RULES___) - ${SYSTEM_LD} ${.TARGET} swap${.TARGET}.o kern_ksyms_buf.o -.else ${SYSTEM_LD} ${.TARGET} kern_ksyms_buf.o -.endif ${SYSTEM_LD_TAIL_STAGE1} ${CC} ${CFLAGS} ${CPPFLAGS} -DCOPY_SYMTAB \ -DSYMTAB_SPACE=$$(${DBSYM} -P ${.TARGET}${TARGETSFX}) \ -c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf_real.o ${SYSTEM_LD_HEAD} -.if !defined(___USE_SUFFIX_RULES___) - ${SYSTEM_LD} ${.TARGET} swap${.TARGET}.o kern_ksyms_buf_real.o -.else ${SYSTEM_LD} ${.TARGET} kern_ksyms_buf_real.o -.endif ${SYSTEM_LD_TAIL_STAGE2} .endif
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Wed Sep 2 13:06:06 UTC 2015 Modified Files: src/usr.bin/config: mkmakefile.c Log Message: Simplify generated `Makefile' by calculating ${OBJS} from merging ${CFILES}, ${SFILES}, and ${OFILES} except swap.o excluded. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 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/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.56 src/usr.bin/config/mkmakefile.c:1.57 --- src/usr.bin/config/mkmakefile.c:1.56 Tue Sep 1 20:18:41 2015 +++ src/usr.bin/config/mkmakefile.c Wed Sep 2 13:06:06 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.56 2015/09/01 20:18:41 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.57 2015/09/02 13:06:06 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.56 2015/09/01 20:18:41 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.57 2015/09/02 13:06:06 uebayasi Exp $"); #include #include @@ -323,17 +323,12 @@ emitobjs(FILE *fp) struct files *fi; fputs("OBJS= \\\n", fp); - TAILQ_FOREACH(fi, , fi_next) { - prologue = prefix = sep = ""; - if ((fi->fi_flags & FI_SEL) == 0) - continue; - if (fi->fi_buildprefix != NULL) { - prefix = fi->fi_buildprefix; - sep = "/"; - } - fprintf(fp, "\t%s%s%s%s.o \\\n", prologue, prefix, sep, - fi->fi_base); - } + 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, , fi_snext) { if ((fi->fi_flags & FI_SEL) == 0) continue;
CVS commit: src
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 -__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 #include @@ -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, , fi_snext) { if ((fi->fi_flags & FI_SEL) == 0)
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Wed Sep 2 03:22:41 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Clean up some rules and make them less error prone. To generate a diff of this commit: cvs rdiff -u -r1.218 -r1.219 src/sys/conf/Makefile.kern.inc 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.218 src/sys/conf/Makefile.kern.inc:1.219 --- src/sys/conf/Makefile.kern.inc:1.218 Tue Sep 1 23:04:35 2015 +++ src/sys/conf/Makefile.kern.inc Wed Sep 2 03:22:41 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.218 2015/09/01 23:04:35 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.219 2015/09/02 03:22:41 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -397,8 +397,9 @@ DEPS= ${SRCS:T:u:R:S/$/.d/g} .if !target(${_s:T:R}.d) ${_s:T:R}.d: ${_s} assym.h ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEP_AFLAGS} \ + ${MKDEP} -f ${.TARGET}.tmp -- ${MKDEP_AFLAGS} \ ${CPPFLAGS} ${CPPFLAGS.${_s:T}} ${_s} + mv -f ${.TARGET}.tmp ${.TARGET} .endif .endfor @@ -406,8 +407,9 @@ ${_s:T:R}.d: ${_s} assym.h .if !target(${_s:T:R}.d) ${_s:T:R}.d: ${_s} ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEP_CFLAGS} \ + ${MKDEP} -f ${.TARGET}.tmp -- ${MKDEP_CFLAGS} \ ${CPPFLAGS} ${CPPFLAGS.${_s:T}} ${_s} + mv -f ${.TARGET}.tmp ${.TARGET} .endif .endfor @@ -523,28 +525,27 @@ build_kernel: .USE .SUFFIXES: .genassym .assym.h .genassym.assym.h: ${_MKTARGET_CREATE} - cat $< | \ - ${GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \ - ${GENASSYM_CPPFLAGS} > $@.tmp && \ + ${GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \ + ${GENASSYM_CPPFLAGS} < $< > $@ mv -f $@.tmp $@ .SUFFIXES: .s .d .s.d: ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEP_AFLAGS} \ - ${CPPFLAGS} ${CPPFLAGS.${<:T}} $< + ${MKDEP} -f $@.tmp -- ${MKDEP_AFLAGS} ${CPPFLAGS} ${CPPFLAGS.${<:T}} $< + mv -f $@.tmp $@ .SUFFIXES: .S .d .S.d: ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEP_AFLAGS} \ - ${CPPFLAGS} ${CPPFLAGS.${<:T}} $< + ${MKDEP} -f $@.tmp -- ${MKDEP_AFLAGS} ${CPPFLAGS} ${CPPFLAGS.${<:T}} $< + mv -f $@.tmp $@ .SUFFIXES: .c .d .c.d: ${_MKTARGET_CREATE} - ${MKDEP} -f ${.TARGET} -- ${MKDEP_CFLAGS} \ - ${CPPFLAGS} ${CPPFLAGS.${<:T}} $< + ${MKDEP} -f $@.tmp -- ${MKDEP_CFLAGS} ${CPPFLAGS} ${CPPFLAGS.${<:T}} $< + mv -f $@.tmp $@ .SUFFIXES: .c .o .c.o:
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 20:18:41 UTC 2015 Modified Files: src/usr.bin/config: mkmakefile.c Log Message: Fix build. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 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/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.55 src/usr.bin/config/mkmakefile.c:1.56 --- src/usr.bin/config/mkmakefile.c:1.55 Tue Sep 1 16:01:23 2015 +++ src/usr.bin/config/mkmakefile.c Tue Sep 1 20:18:41 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.55 2015/09/01 16:01:23 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.56 2015/09/01 20:18:41 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.55 2015/09/01 16:01:23 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.56 2015/09/01 20:18:41 uebayasi Exp $"); #include #include @@ -298,14 +298,14 @@ emitdefs(FILE *fp) static void emitfile(FILE *fp, struct files *fi) { - const char *srcdir = "$S/"; + const char *defprologue = "$S/"; const char *prologue, *prefix, *sep; if (Sflag) - srcdir = ""; + defprologue = ""; prologue = prefix = sep = ""; if (*fi->fi_path != '/') { - prologue = srcdir; + prologue = defprologue; if (fi->fi_prefix != NULL) { if (*fi->fi_prefix == '/') prologue = ""; @@ -319,13 +319,20 @@ emitfile(FILE *fp, struct files *fi) static void emitobjs(FILE *fp) { + const char *prologue, *prefix, *sep; struct files *fi; fputs("OBJS= \\\n", fp); TAILQ_FOREACH(fi, , fi_next) { + prologue = prefix = sep = ""; if ((fi->fi_flags & FI_SEL) == 0) continue; - fprintf(fp, "\t%s.o \\\n", fi->fi_base); + if (fi->fi_buildprefix != NULL) { + prefix = fi->fi_buildprefix; + sep = "/"; + } + fprintf(fp, "\t%s%s%s%s.o \\\n", prologue, prefix, sep, + fi->fi_base); } TAILQ_FOREACH(fi, , fi_snext) { if ((fi->fi_flags & FI_SEL) == 0)
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Tue Sep 1 23:04:35 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Define suffix rules at the end to override system definitions. Provide them only if ___USE_SUFFIX_RULES___ is defined (config -S). To generate a diff of this commit: cvs rdiff -u -r1.217 -r1.218 src/sys/conf/Makefile.kern.inc 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.217 src/sys/conf/Makefile.kern.inc:1.218 --- src/sys/conf/Makefile.kern.inc:1.217 Tue Sep 1 16:04:04 2015 +++ src/sys/conf/Makefile.kern.inc Tue Sep 1 23:04:35 2015 @@ -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 @@ ${_s:T:R}.o: ${_s} .endif .endfor -.SUFFIXES: .c .o -.c.o: - ${NORMAL_C} - -.SUFFIXES: .S .o -.S.o: - ${NORMAL_S} - ## ## (3) libkern and compat ## @@ -325,14 +317,6 @@ SYSTEM_LD_TAIL_STAGE2+= ${SYSTEM_LD_TAIL ## (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 @@ CSRCS=${MD_CFILES} ${MI_CFILES} ${CFILES 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 @@ ${_s:T:R}.d: ${_s} assym.h .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 @@ build_kernel: .USE .include ## +## 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 ##
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 10:37:48 UTC 2015 Modified Files: src/usr.bin/config: defs.h Log Message: Start merging struct files and struct objects. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/usr.bin/config/defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.74 src/usr.bin/config/defs.h:1.75 --- src/usr.bin/config/defs.h:1.74 Mon Aug 31 02:58:25 2015 +++ src/usr.bin/config/defs.h Tue Sep 1 10:37:48 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.74 2015/08/31 02:58:25 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.75 2015/09/01 10:37:48 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -332,16 +332,21 @@ struct devi { * Files or objects. This structure defines the common fields * between the two. */ -struct filetype -{ +struct filetype { + TAILQ_ENTRY(files) fit_next; const char *fit_srcfile; /* the name of the "files" file that got us */ u_short fit_srcline; /* and the line number */ u_char fit_flags; /* as below */ char fit_lastc; /* last char from path */ + const char *fit_tail; /* name, i.e., strrchr(fi_path, '/') + 1 */ + const char *fit_base; /* tail minus ".c" (or whatever) */ const char *fit_path; /* full file path */ const char *fit_prefix; /* any file prefix */ - size_t fit_len; /* path string length */ int fit_suffix; /* single char suffix */ + size_t fit_len; /* path string length */ + struct condexpr *fit_optx; /* options expression */ + struct nvlist *fit_optf; /* flattened version of above, if needed */ + const char *fit_mkrule; /* special make rule, if any */ struct attr *fit_attr; /* owner attr */ TAILQ_ENTRY(files) fit_anext; /* next file in attr */ }; @@ -360,21 +365,21 @@ struct filetype */ struct files { struct filetype fi_fit; - TAILQ_ENTRY(files) fi_next; - const char *fi_tail; /* name, i.e., strrchr(fi_path, '/') + 1 */ - const char *fi_base; /* tail minus ".c" (or whatever) */ - struct condexpr *fi_optx; /* options expression */ - struct nvlist *fi_optf; /* flattened version of above, if needed */ - const char *fi_mkrule; /* special make rule, if any */ }; +#define fi_nextfi_fit.fit_next #define fi_srcfile fi_fit.fit_srcfile #define fi_srcline fi_fit.fit_srcline #define fi_flags fi_fit.fit_flags #define fi_lastc fi_fit.fit_lastc +#define fi_tailfi_fit.fit_tail +#define fi_basefi_fit.fit_base #define fi_pathfi_fit.fit_path #define fi_prefix fi_fit.fit_prefix #define fi_suffix fi_fit.fit_suffix #define fi_len fi_fit.fit_len +#define fi_optxfi_fit.fit_optx +#define fi_optffi_fit.fit_optf +#define fi_mkrule fi_fit.fit_mkrule #define fi_attrfi_fit.fit_attr #define fi_anext fi_fit.fit_anext @@ -390,17 +395,24 @@ struct files { */ struct objects { struct filetype oi_fit; - TAILQ_ENTRY(objects) oi_next; - struct condexpr *oi_optx; /* condition expression */ - struct nvlist *oi_optf;/* flattened version of above, if needed */ }; +#define oi_nextoi_fit.fit_next #define oi_srcfile oi_fit.fit_srcfile #define oi_srcline oi_fit.fit_srcline #define oi_flags oi_fit.fit_flags #define oi_lastc oi_fit.fit_lastc +#define oi_tailoi_fit.fit_tail +#define oi_baseoi_fit.fit_base #define oi_pathoi_fit.fit_path #define oi_prefix oi_fit.fit_prefix +#define oi_suffix oi_fit.fit_suffix +#define oi_len oi_fit.fit_len +#define oi_optxoi_fit.fit_optx +#define oi_optfoi_fit.fit_optf +#define oi_mkrule oi_fit.fit_mkrule +#define oi_attroi_fit.fit_attr +#define oi_anext oi_fit.fit_anext /* flags */ #define OI_SEL 0x01 /* selected */
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 12:10:56 UTC 2015 Modified Files: src/usr.bin/config: defs.h files.c mkmakefile.c Log Message: Use per-suffix lists where appropriate. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/usr.bin/config/defs.h cvs rdiff -u -r1.22 -r1.23 src/usr.bin/config/files.c cvs rdiff -u -r1.53 -r1.54 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/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.77 src/usr.bin/config/defs.h:1.78 --- src/usr.bin/config/defs.h:1.77 Tue Sep 1 11:35:46 2015 +++ src/usr.bin/config/defs.h Tue Sep 1 12:10:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.77 2015/09/01 11:35:46 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.78 2015/09/01 12:10:56 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -481,8 +481,6 @@ struct filelist allfiles; /* list of al struct filelist allcfiles; /* list of all .c files */ struct filelist allsfiles; /* list of all .S files */ struct filelist allofiles; /* list of all .o files */ -TAILQ_HEAD(, files) allobjects; /* list of all kernel object and - library files */ SLIST_HEAD(, prefix) prefixes, /* prefix stack */ allprefixes; /* all prefixes used (after popped) */ Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.22 src/usr.bin/config/files.c:1.23 --- src/usr.bin/config/files.c:1.22 Tue Sep 1 11:22:59 2015 +++ src/usr.bin/config/files.c Tue Sep 1 12:10:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.22 2015/09/01 11:22:59 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.23 2015/09/01 12:10:56 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.22 2015/09/01 11:22:59 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.23 2015/09/01 12:10:56 uebayasi Exp $"); #include #include @@ -85,7 +85,6 @@ initfiles(void) TAILQ_INIT(); TAILQ_INIT(); unchecked = _FIRST(); - TAILQ_INIT(); } void @@ -177,13 +176,18 @@ addfile(const char *path, struct condexp TAILQ_INSERT_TAIL(, fi, fi_next); break; case 'S': + fi->fi_suffix = 's'; + /* FALLTHRU */ case 's': TAILQ_INSERT_TAIL(, fi, fi_snext); TAILQ_INSERT_TAIL(, fi, fi_next); break; case 'o': TAILQ_INSERT_TAIL(, fi, fi_snext); - TAILQ_INSERT_TAIL(, fi, fi_next); + break; + default: + cfgxerror(fi->fi_srcfile, fi->fi_srcline, + "unknown suffix"); break; } return; @@ -331,7 +335,7 @@ fixobjects(void) int err, sel; err = 0; - TAILQ_FOREACH(fi, , fi_next) { + TAILQ_FOREACH(fi, , fi_snext) { /* Optional: see if it is to be included. */ if (fi->fi_optx != NULL) { flathead = NULL; Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.53 src/usr.bin/config/mkmakefile.c:1.54 --- src/usr.bin/config/mkmakefile.c:1.53 Tue Sep 1 11:35:46 2015 +++ src/usr.bin/config/mkmakefile.c Tue Sep 1 12:10:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.53 2015/09/01 11:35:46 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.54 2015/09/01 12:10:56 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.53 2015/09/01 11:35:46 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.54 2015/09/01 12:10:56 uebayasi Exp $"); #include #include @@ -63,7 +63,7 @@ __RCSID("$NetBSD: mkmakefile.c,v 1.53 20 */ static void emitdefs(FILE *); -static void emitfiles(FILE *, int, int); +static void emitfiles(FILE *, struct filelist *, int); static void emitobjs(FILE *); static void emitallkobjs(FILE *); @@ -320,7 +320,7 @@ emitobjs(FILE *fp) continue; fprintf(fp, "\t%s.o \\\n", fi->fi_base); } - TAILQ_FOREACH(fi, , fi_next) { + TAILQ_FOREACH(fi, , fi_snext) { if ((fi->fi_flags & FI_SEL) == 0) continue; putc('\t', fp); @@ -444,29 +444,27 @@ static void emitcfiles(FILE *fp) { - emitfiles(fp, 'c', 0); + emitfiles(fp, , 'c'); } static void emitsfiles(FILE *fp) { - emitfiles(fp, 's', 'S'); + emitfiles(fp, , 's'); } static void -emitfiles(FILE *fp, int suffix, int upper_suffix) +emitfiles(FILE *fp, struct filelist *filelist, int suffix) { struct files *fi; struct config *cf; char swapname[100]; fprintf(fp, "%cFILES= \\\n", toupper(suffix)); - TAILQ_FOREACH(fi, , fi_next) { + TAILQ_FOREACH(fi, filelist, fi_snext) { if ((fi->fi_flags & FI_SEL) == 0) continue; - if (fi->fi_suffix != suffix && fi->fi_suffix != upper_suffix) - continue; putc('\t', fp); emitfile(fp, fi); fputs(" \\\n", fp);
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 11:22:59 UTC 2015 Modified Files: src/usr.bin/config: defs.h files.c gram.y mkmakefile.c Log Message: Merge struct objects into struct files. Keep per-suffix file lists. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/usr.bin/config/defs.h cvs rdiff -u -r1.21 -r1.22 src/usr.bin/config/files.c cvs rdiff -u -r1.50 -r1.51 src/usr.bin/config/gram.y cvs rdiff -u -r1.51 -r1.52 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/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.75 src/usr.bin/config/defs.h:1.76 --- src/usr.bin/config/defs.h:1.75 Tue Sep 1 10:37:48 2015 +++ src/usr.bin/config/defs.h Tue Sep 1 11:22:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.75 2015/09/01 10:37:48 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.76 2015/09/01 11:22:59 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -149,6 +149,9 @@ struct defoptlist { struct nvlist *dl_depends; }; +struct files; +TAILQ_HEAD(filelist, files); + struct module { const char *m_name; #if 1 @@ -158,7 +161,7 @@ struct module { struct modulelist *m_deps; #endif int m_expanding; - TAILQ_HEAD(, files) m_files; + struct filelist m_files; int m_weight; }; @@ -334,6 +337,7 @@ struct devi { */ struct filetype { TAILQ_ENTRY(files) fit_next; + TAILQ_ENTRY(files) fit_snext; const char *fit_srcfile; /* the name of the "files" file that got us */ u_short fit_srcline; /* and the line number */ u_char fit_flags; /* as below */ @@ -367,6 +371,7 @@ struct files { struct filetype fi_fit; }; #define fi_nextfi_fit.fit_next +#define fi_snextfi_fit.fit_snext #define fi_srcfile fi_fit.fit_srcfile #define fi_srcline fi_fit.fit_srcline #define fi_flags fi_fit.fit_flags @@ -390,35 +395,6 @@ struct files { #define FI_HIDDEN 0x08 /* obscured by other(s), base names overlap */ /* - * Objects and libraries. This allows precompiled object and library - * files (e.g. binary-only device drivers) to be linked in. - */ -struct objects { - struct filetype oi_fit; -}; - -#define oi_nextoi_fit.fit_next -#define oi_srcfile oi_fit.fit_srcfile -#define oi_srcline oi_fit.fit_srcline -#define oi_flags oi_fit.fit_flags -#define oi_lastc oi_fit.fit_lastc -#define oi_tailoi_fit.fit_tail -#define oi_baseoi_fit.fit_base -#define oi_pathoi_fit.fit_path -#define oi_prefix oi_fit.fit_prefix -#define oi_suffix oi_fit.fit_suffix -#define oi_len oi_fit.fit_len -#define oi_optxoi_fit.fit_optx -#define oi_optfoi_fit.fit_optf -#define oi_mkrule oi_fit.fit_mkrule -#define oi_attroi_fit.fit_attr -#define oi_anext oi_fit.fit_anext - -/* flags */ -#define OI_SEL 0x01 /* selected */ -#define OI_NEEDSFLAG 0x02 /* needs-flag */ - -/* * Condition expressions. */ @@ -534,8 +510,11 @@ int do_devsw; /* 0 if pre-devsw config int oktopackage; /* 0 before setmachine() */ int devilevel; /* used for devi->i_level */ -TAILQ_HEAD(, files) allfiles; /* list of all kernel source files */ -TAILQ_HEAD(, objects) allobjects; /* list of all kernel object and +struct filelist allfiles; /* list of all kernel source files */ +struct filelist allcfiles; /* list of all .c files */ +struct filelist allsfiles; /* list of all .S files */ +struct filelist allofiles; /* list of all .o files */ +TAILQ_HEAD(, files) allobjects; /* list of all kernel object and library files */ SLIST_HEAD(, prefix) prefixes, /* prefix stack */ @@ -563,7 +542,6 @@ int fixfiles(void); /* finalize */ int fixobjects(void); int fixdevsw(void); void addfile(const char *, struct condexpr *, u_char, const char *); -void addobject(const char *, struct condexpr *, u_char); int expr_eval(struct condexpr *, int (*)(const char *, void *), void *); /* hash.c */ Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.21 src/usr.bin/config/files.c:1.22 --- src/usr.bin/config/files.c:1.21 Sat Aug 29 02:54:07 2015 +++ src/usr.bin/config/files.c Tue Sep 1 11:22:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.21 2015/08/29 02:54:07 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.22 2015/09/01 11:22:59 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.21 2015/08/29 02:54:07 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.22 2015/09/01 11:22:59 uebayasi Exp $"); #include #include @@ -81,6 +81,9 @@ initfiles(void) basetab = ht_new(); pathtab = ht_new(); TAILQ_INIT(); + TAILQ_INIT(); + TAILQ_INIT(); + TAILQ_INIT(); unchecked = _FIRST(); TAILQ_INIT(); } @@ -168,7 +171,21 @@ addfile(const char *path, struct condexp fi->fi_optf = NULL; fi->fi_mkrule = rule; fi->fi_attr = NULL; - TAILQ_INSERT_TAIL(, fi, fi_next); + switch (fi->fi_suffix) { + case 'c': + TAILQ_INSERT_TAIL(, fi, fi_snext); +
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 11:35:47 UTC 2015 Modified Files: src/usr.bin/config: defs.h mkmakefile.c Log Message: Abstract struct filetype is no longer needed. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/usr.bin/config/defs.h cvs rdiff -u -r1.52 -r1.53 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/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.76 src/usr.bin/config/defs.h:1.77 --- src/usr.bin/config/defs.h:1.76 Tue Sep 1 11:22:59 2015 +++ src/usr.bin/config/defs.h Tue Sep 1 11:35:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.76 2015/09/01 11:22:59 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.77 2015/09/01 11:35:46 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -332,61 +332,28 @@ struct devi { #define WILD (-2) /* unit number for, e.g., "sd?" */ /* - * Files or objects. This structure defines the common fields + * Files (*.c, *.S, or *.o). This structure defines the common fields * between the two. */ -struct filetype { - TAILQ_ENTRY(files) fit_next; - TAILQ_ENTRY(files) fit_snext; - const char *fit_srcfile; /* the name of the "files" file that got us */ - u_short fit_srcline; /* and the line number */ - u_char fit_flags; /* as below */ - char fit_lastc; /* last char from path */ - const char *fit_tail; /* name, i.e., strrchr(fi_path, '/') + 1 */ - const char *fit_base; /* tail minus ".c" (or whatever) */ - const char *fit_path; /* full file path */ - const char *fit_prefix; /* any file prefix */ - int fit_suffix; /* single char suffix */ - size_t fit_len; /* path string length */ - struct condexpr *fit_optx; /* options expression */ - struct nvlist *fit_optf; /* flattened version of above, if needed */ - const char *fit_mkrule; /* special make rule, if any */ - struct attr *fit_attr; /* owner attr */ - TAILQ_ENTRY(files) fit_anext; /* next file in attr */ -}; -/* Anything less than 0x10 is sub-type specific */ - -/* - * Files. Each file is either standard (always included) or optional, - * depending on whether it has names on which to *be* optional. The - * options field (fi_optx) is an expression tree of type struct - * condexpr, with nodes for OR, AND, and NOT, as well as atoms (words) - * representing some particular option. - * - * For any file marked as needs-count or needs-flag, fixfiles() will - * build fi_optf, a `flat list' of the options with nv_num fields that - * contain counts or `need' flags; this is used in mkheaders(). - */ struct files { - struct filetype fi_fit; + TAILQ_ENTRY(files) fi_next; + TAILQ_ENTRY(files) fi_snext; + const char *fi_srcfile; /* the name of the "files" file that got us */ + u_short fi_srcline; /* and the line number */ + u_char fi_flags; /* as below */ + char fi_lastc; /* last char from path */ + const char *fi_tail; /* name, i.e., strrchr(fi_path, '/') + 1 */ + const char *fi_base; /* tail minus ".c" (or whatever) */ + const char *fi_path; /* full file path */ + const char *fi_prefix; /* any file prefix */ + int fi_suffix; /* single char suffix */ + size_t fi_len; /* path string length */ + struct condexpr *fi_optx; /* options expression */ + struct nvlist *fi_optf; /* flattened version of above, if needed */ + const char *fi_mkrule; /* special make rule, if any */ + struct attr *fi_attr; /* owner attr */ + TAILQ_ENTRY(files) fi_anext; /* next file in attr */ }; -#define fi_nextfi_fit.fit_next -#define fi_snextfi_fit.fit_snext -#define fi_srcfile fi_fit.fit_srcfile -#define fi_srcline fi_fit.fit_srcline -#define fi_flags fi_fit.fit_flags -#define fi_lastc fi_fit.fit_lastc -#define fi_tailfi_fit.fit_tail -#define fi_basefi_fit.fit_base -#define fi_pathfi_fit.fit_path -#define fi_prefix fi_fit.fit_prefix -#define fi_suffix fi_fit.fit_suffix -#define fi_len fi_fit.fit_len -#define fi_optxfi_fit.fit_optx -#define fi_optffi_fit.fit_optf -#define fi_mkrule fi_fit.fit_mkrule -#define fi_attrfi_fit.fit_attr -#define fi_anext fi_fit.fit_anext /* flags */ #define FI_SEL 0x01 /* selected */ Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.52 src/usr.bin/config/mkmakefile.c:1.53 --- src/usr.bin/config/mkmakefile.c:1.52 Tue Sep 1 11:22:59 2015 +++ src/usr.bin/config/mkmakefile.c Tue Sep 1 11:35:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.52 2015/09/01 11:22:59 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.53 2015/09/01 11:35:46 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.52 2015/09/01 11:22:59 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.53 2015/09/01 11:35:46 uebayasi Exp $"); #include #include @@ -292,21 +292,21 @@ emitdefs(FILE *fp) } static void -emitfiletype(FILE *fp, struct filetype *fit) +emitfile(FILE *fp, struct files *fi) {
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 12:32:26 UTC 2015 Modified Files: src/usr.bin/config: defs.h Log Message: Clean up struct files. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/usr.bin/config/defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.78 src/usr.bin/config/defs.h:1.79 --- src/usr.bin/config/defs.h:1.78 Tue Sep 1 12:10:56 2015 +++ src/usr.bin/config/defs.h Tue Sep 1 12:32:26 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.78 2015/09/01 12:10:56 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.79 2015/09/01 12:32:26 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -337,11 +337,10 @@ struct devi { */ struct files { TAILQ_ENTRY(files) fi_next; - TAILQ_ENTRY(files) fi_snext; + TAILQ_ENTRY(files) fi_snext; /* per-suffix list */ const char *fi_srcfile; /* the name of the "files" file that got us */ u_short fi_srcline; /* and the line number */ - u_char fi_flags; /* as below */ - char fi_lastc; /* last char from path */ + u_char fi_flags; /* as below */ const char *fi_tail; /* name, i.e., strrchr(fi_path, '/') + 1 */ const char *fi_base; /* tail minus ".c" (or whatever) */ const char *fi_path; /* full file path */ @@ -350,7 +349,7 @@ struct files { size_t fi_len; /* path string length */ struct condexpr *fi_optx; /* options expression */ struct nvlist *fi_optf; /* flattened version of above, if needed */ - const char *fi_mkrule; /* special make rule, if any */ + const char *fi_mkrule; /* special make rule, if any */ struct attr *fi_attr; /* owner attr */ TAILQ_ENTRY(files) fi_anext; /* next file in attr */ };
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 12:46:20 UTC 2015 Modified Files: src/usr.bin/config: defs.h files.c Log Message: Keep track of directory of files internally. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/usr.bin/config/defs.h cvs rdiff -u -r1.23 -r1.24 src/usr.bin/config/files.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.79 src/usr.bin/config/defs.h:1.80 --- src/usr.bin/config/defs.h:1.79 Tue Sep 1 12:32:26 2015 +++ src/usr.bin/config/defs.h Tue Sep 1 12:46:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.79 2015/09/01 12:32:26 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.80 2015/09/01 12:46:20 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -343,6 +343,7 @@ struct files { u_char fi_flags; /* as below */ const char *fi_tail; /* name, i.e., strrchr(fi_path, '/') + 1 */ const char *fi_base; /* tail minus ".c" (or whatever) */ + const char *fi_dir; /* path to file */ const char *fi_path; /* full file path */ const char *fi_prefix; /* any file prefix */ int fi_suffix; /* single char suffix */ Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.23 src/usr.bin/config/files.c:1.24 --- src/usr.bin/config/files.c:1.23 Tue Sep 1 12:10:56 2015 +++ src/usr.bin/config/files.c Tue Sep 1 12:46:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.23 2015/09/01 12:10:56 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.24 2015/09/01 12:46:20 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.23 2015/09/01 12:10:56 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.24 2015/09/01 12:46:20 uebayasi Exp $"); #include #include @@ -93,8 +93,10 @@ addfile(const char *path, struct condexp struct files *fi; const char *dotp, *tail; size_t baselen; + size_t dirlen; int needc, needf; char base[200]; + char dir[MAXPATHLEN]; /* check various errors */ needc = flags & FI_NEEDSCOUNT; @@ -115,10 +117,16 @@ addfile(const char *path, struct condexp /* find last part of pathname, and same without trailing suffix */ tail = strrchr(path, '/'); - if (tail == NULL) + if (tail == NULL) { + dirlen = 0; tail = path; - else + } else { + dirlen = (size_t)(tail - path); tail++; + } + memcpy(dir, path, dirlen); + dir[dirlen] = '\0'; + dotp = strrchr(tail, '.'); if (dotp == NULL || dotp[1] == 0 || (baselen = (size_t)(dotp - tail)) >= sizeof(base)) { @@ -155,13 +163,14 @@ addfile(const char *path, struct condexp goto bad; } memcpy(base, tail, baselen); - base[baselen] = 0; + base[baselen] = '\0'; fi->fi_srcfile = yyfile; fi->fi_srcline = currentline(); fi->fi_flags = flags; fi->fi_path = path; fi->fi_tail = tail; fi->fi_base = intern(base); + fi->fi_dir = intern(dir); fi->fi_prefix = SLIST_EMPTY() ? NULL : SLIST_FIRST()->pf_prefix; fi->fi_len = strlen(path);
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Wed Sep 2 05:09:25 UTC 2015 Modified Files: src/usr.bin/config: defs.h files.c main.c mkdevsw.c mkheaders.c mkioconf.c mkswap.c Log Message: In `-S' mode, generate *.c files under conf/ subdirectory. Register generated .c files to the `files' list internally. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/usr.bin/config/defs.h cvs rdiff -u -r1.26 -r1.27 src/usr.bin/config/files.c cvs rdiff -u -r1.84 -r1.85 src/usr.bin/config/main.c cvs rdiff -u -r1.12 -r1.13 src/usr.bin/config/mkdevsw.c cvs rdiff -u -r1.27 -r1.28 src/usr.bin/config/mkheaders.c cvs rdiff -u -r1.30 -r1.31 src/usr.bin/config/mkioconf.c cvs rdiff -u -r1.8 -r1.9 src/usr.bin/config/mkswap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.83 src/usr.bin/config/defs.h:1.84 --- src/usr.bin/config/defs.h:1.83 Tue Sep 1 16:01:23 2015 +++ src/usr.bin/config/defs.h Wed Sep 2 05:09:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.83 2015/09/01 16:01:23 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.84 2015/09/02 05:09:25 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -433,6 +433,8 @@ struct nvlist *machinesubarches; const char *ioconfname; /* ioconf name, mutually exclusive to machine */ const char *srcdir; /* path to source directory (rel. to build) */ const char *builddir; /* path to build directory */ +int builddirfd; /* dir fd of builddir */ +int buildconfdirfd; /* dir fd of builddir/conf */ const char *defbuilddir; /* default build directory */ const char *ident; /* kernel "ident"ification string */ int errors; /* counts calls to error() */ Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.26 src/usr.bin/config/files.c:1.27 --- src/usr.bin/config/files.c:1.26 Tue Sep 1 16:01:23 2015 +++ src/usr.bin/config/files.c Wed Sep 2 05:09:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.26 2015/09/01 16:01:23 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.27 2015/09/02 05:09:25 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.26 2015/09/01 16:01:23 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.27 2015/09/02 05:09:25 uebayasi Exp $"); #include #include @@ -278,13 +278,15 @@ fixfiles(void) struct config *cf; char swapname[100]; - addfile("devsw.c", NULL, 0, NULL); - addfile("ioconf.c", NULL, 0, NULL); + buildprefix_push("conf"); + addfile("conf/devsw.c", NULL, 0, NULL); + addfile("conf/ioconf.c", NULL, 0, NULL); TAILQ_FOREACH(cf, , cf_next) { - (void)snprintf(swapname, sizeof(swapname), "swap%s.c", + (void)snprintf(swapname, sizeof(swapname), "conf/swap%s.c", cf->cf_name); addfile(intern(swapname), NULL, 0, NULL); } + buildprefix_pop(); } err = 0; Index: src/usr.bin/config/main.c diff -u src/usr.bin/config/main.c:1.84 src/usr.bin/config/main.c:1.85 --- src/usr.bin/config/main.c:1.84 Tue Sep 1 16:01:23 2015 +++ src/usr.bin/config/main.c Wed Sep 2 05:09:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.84 2015/09/01 16:01:23 uebayasi Exp $ */ +/* $NetBSD: main.c,v 1.85 2015/09/02 05:09:25 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: main.c,v 1.84 2015/09/01 16:01:23 uebayasi Exp $"); +__RCSID("$NetBSD: main.c,v 1.85 2015/09/02 05:09:25 uebayasi Exp $"); #ifndef MAKE_BOOTSTRAP #include @@ -100,6 +100,8 @@ extern int yydebug; #endif int dflag; +static const char *buildconfdir = "."; + static struct dlhash *obsopttab; static struct hashtab *mkopttab; static struct nvlist **nextopt; @@ -522,11 +524,15 @@ main(int argc, char **argv) /* * Ready to go. Build all the various files. */ - if (mksubdirs() || mksymlinks() || mkmakefile() || mkheaders() || mkswap() || + if ((Sflag && mksubdirs()) || mksymlinks() || mkmakefile() || mkheaders() || mkswap() || mkioconf() || (do_devsw ? mkdevsw() : 0) || mkident() || errors) stop(); (void)printf("Build directory is %s\n", builddir); (void)printf("Don't forget to run \"make depend\"\n"); + + close(buildconfdirfd); + close(builddirfd); + return 0; } @@ -650,9 +656,6 @@ mksubdirs(void) const char *prefix, *sep; char buf[MAXPATHLEN]; - if (!Sflag) - return 0; - TAILQ_FOREACH(fi, , fi_next) { if ((fi->fi_flags & FI_SEL) == 0) continue; @@ -672,6 +675,8 @@ mksubdirs(void) mksubdir(buf); } + buildconfdir = "conf"; + return 0; } @@ -689,6 +694,9 @@ mksymlinks(void) p = buf; + if ((buildconfdirfd = open(buildconfdir, O_RDONLY)) == -1) + errx(EXIT_FAILURE, "cannot opens %s", buildconfdir); + snprintf(buf, sizeof(buf), "%s/arch/%s/include", srcdir, machine); ret = recreate(p, "machine"); ret = recreate(p, machine); @@ -1464,6 +1472,8 @@ setupdirs(void)
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 14:32:20 UTC 2015 Modified Files: src/usr.bin/config: main.c Log Message: Prepare to build subdirectories. Not enabled yet. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/usr.bin/config/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/main.c diff -u src/usr.bin/config/main.c:1.82 src/usr.bin/config/main.c:1.83 --- src/usr.bin/config/main.c:1.82 Tue Sep 1 01:50:14 2015 +++ src/usr.bin/config/main.c Tue Sep 1 14:32:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.82 2015/09/01 01:50:14 pgoyette Exp $ */ +/* $NetBSD: main.c,v 1.83 2015/09/01 14:32:20 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: main.c,v 1.82 2015/09/01 01:50:14 pgoyette Exp $"); +__RCSID("$NetBSD: main.c,v 1.83 2015/09/01 14:32:20 uebayasi Exp $"); #ifndef MAKE_BOOTSTRAP #include @@ -122,6 +122,7 @@ static int undo_option(struct hashtab *, static int crosscheck(void); static int badstar(void); int main(int, char **); +static int mksubdirs(void); static int mksymlinks(void); static int mkident(void); static int devbase_has_dead_instances(const char *, void *, void *); @@ -516,7 +517,7 @@ main(int argc, char **argv) /* * Ready to go. Build all the various files. */ - if (mksymlinks() || mkmakefile() || mkheaders() || mkswap() || + if (mksubdirs() || mksymlinks() || mkmakefile() || mkheaders() || mkswap() || mkioconf() || (do_devsw ? mkdevsw() : 0) || mkident() || errors) stop(); (void)printf("Build directory is %s\n", builddir); @@ -617,6 +618,59 @@ recreate(const char *p, const char *q) return ret; } +static void +mksubdir(char *buf) +{ + char *p; + struct stat st; + + p = strrchr(buf, '/'); + if (p != NULL && *p == '/') { + *p = '\0'; + mksubdir(buf); + *p = '/'; + } + if (stat(buf, ) == 0) { + if (!S_ISDIR(st.st_mode)) + errx(EXIT_FAILURE, "not directory %s", buf); + } else + if (mkdir(buf, 0777) == -1) + errx(EXIT_FAILURE, "cannot create %s", buf); +} + +static int +mksubdirs(void) +{ + struct files *fi; + const char *prefix, *sep; + char buf[MAXPATHLEN]; + + // XXX notyet + if (1) + return 0; + + TAILQ_FOREACH(fi, , fi_next) { + if ((fi->fi_flags & FI_SEL) == 0) + continue; + prefix = sep = ""; + if (fi->fi_buildprefix != NULL) { + prefix = fi->fi_buildprefix; + sep = "/"; + } else { + if (fi->fi_prefix != NULL) { +prefix = fi->fi_prefix; +sep = "/"; + } + } + snprintf(buf, sizeof(buf), "%s%s%s", prefix, sep, fi->fi_dir); + if (buf[0] == '\0') + continue; + mksubdir(buf); + } + + return 0; +} + /* * Make a symlink for "machine" so that "#include " works, * and for the machine's CPU architecture, so that works as well.
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 13:45:52 UTC 2015 Modified Files: src/usr.bin/config: defs.h Log Message: Bump version for "buildprefix". To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/usr.bin/config/defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.81 src/usr.bin/config/defs.h:1.82 --- src/usr.bin/config/defs.h:1.81 Tue Sep 1 13:42:48 2015 +++ src/usr.bin/config/defs.h Tue Sep 1 13:45:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.81 2015/09/01 13:42:48 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.82 2015/09/01 13:45:52 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 20150834 +#define CONFIG_VERSION 20150835 #define CONFIG_MINVERSION 0 /*
CVS commit: src/sys/lib/libx86emu
Module Name:src Committed By: uebayasi Date: Tue Sep 1 13:46:29 UTC 2015 Modified Files: src/sys/lib/libx86emu: files.x86emu Log Message: Use "prefix" to specify path out of $S. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libx86emu/files.x86emu Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libx86emu/files.x86emu diff -u src/sys/lib/libx86emu/files.x86emu:1.3 src/sys/lib/libx86emu/files.x86emu:1.4 --- src/sys/lib/libx86emu/files.x86emu:1.3 Fri Mar 13 18:25:58 2009 +++ src/sys/lib/libx86emu/files.x86emu Tue Sep 1 13:46:29 2015 @@ -1,7 +1,11 @@ defflag X86EMU -file ../common/lib/libx86emu/x86emu.c x86emu -file ../common/lib/libx86emu/x86emu_i8254.c x86emu -file ../common/lib/libx86emu/x86emu_util.c x86emu +prefix ../common/lib/libx86emu + +file x86emu.c x86emu +file x86emu_i8254.c x86emu +file x86emu_util.c x86emu + +prefix makeoptions x86emu CPPFLAGS+="-I$S/../common/include"
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 13:42:48 UTC 2015 Modified Files: src/usr.bin/config: config.5 defs.h files.c gram.y scan.l util.c Log Message: Introduce a new syntax, "buildprefix", to specify prefix of files under kernel build subdirectory. This is not used now that everything is built at the top of kernel build directory. It will become mandatory for source/object files put out of kernel source tree to specify corresponding build subdirectory. Only ``no dots'' relative path is accepted as "buildprefix". To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.bin/config/config.5 cvs rdiff -u -r1.80 -r1.81 src/usr.bin/config/defs.h cvs rdiff -u -r1.24 -r1.25 src/usr.bin/config/files.c cvs rdiff -u -r1.51 -r1.52 src/usr.bin/config/gram.y cvs rdiff -u -r1.23 -r1.24 src/usr.bin/config/scan.l cvs rdiff -u -r1.19 -r1.20 src/usr.bin/config/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/config.5 diff -u src/usr.bin/config/config.5:1.33 src/usr.bin/config/config.5:1.34 --- src/usr.bin/config/config.5:1.33 Tue Sep 1 01:50:14 2015 +++ src/usr.bin/config/config.5 Tue Sep 1 13:42:48 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: config.5,v 1.33 2015/09/01 01:50:14 pgoyette Exp $ +.\" $NetBSD: config.5,v 1.34 2015/09/01 13:42:48 uebayasi Exp $ .\" .\" Copyright (c) 2006, 2007 The NetBSD Foundation. .\" All rights reserved. @@ -24,7 +24,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 31, 2015 +.Dd September 1, 2015 .Dt CONFIG 5 .Os .Sh NAME @@ -254,6 +254,7 @@ The argument obeys the same rules as for If .Ar path is given, it pushes a new prefix for +.Ic file , .Ic include and .Ic cinclude . @@ -265,6 +266,21 @@ The .Ar path argument is either absolute or relative to the current defined prefix, which defaults to the top of the kernel source tree. +.It Ic buildprefix Op Ar path +If +.Ar path +is given, it pushes a new build prefix for +.Ic file . +.Ic buildprefix +statements act like a stack, and an empty +.Ar path +argument has the latest prefix popped out. +The +.Ar path +argument is relative to the current defined buildprefix, which +defaults to the top of the kernel build directory. +When prefix is either absolute or relative out of the kernel source tree (../), +buildprefix must be defined. .It Ic ifdef Ar attribute .It Ic ifndef Ar attribute .It Ic elifdef Ar attribute Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.80 src/usr.bin/config/defs.h:1.81 --- src/usr.bin/config/defs.h:1.80 Tue Sep 1 12:46:20 2015 +++ src/usr.bin/config/defs.h Tue Sep 1 13:42:48 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.80 2015/09/01 12:46:20 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.81 2015/09/01 13:42:48 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -346,6 +346,7 @@ struct files { const char *fi_dir; /* path to file */ const char *fi_path; /* full file path */ const char *fi_prefix; /* any file prefix */ + const char *fi_buildprefix; /* prefix in builddir */ int fi_suffix; /* single char suffix */ size_t fi_len; /* path string length */ struct condexpr *fi_optx; /* options expression */ @@ -391,6 +392,10 @@ struct condexpr { * File/object prefixes. These are arranged in a stack, and affect * the behavior of the source path. */ + +struct prefix; +SLIST_HEAD(prefixlist, prefix); + struct prefix { SLIST_ENTRY(prefix) pf_next; /* next prefix in stack */ const char *pf_prefix; /* the actual prefix */ @@ -482,8 +487,10 @@ struct filelist allcfiles; /* list of a struct filelist allsfiles; /* list of all .S files */ struct filelist allofiles; /* list of all .o files */ -SLIST_HEAD(, prefix) prefixes, /* prefix stack */ +struct prefixlist prefixes, /* prefix stack */ allprefixes; /* all prefixes used (after popped) */ +struct prefixlist buildprefixes, /* build prefix stack */ + allbuildprefixes;/* all build prefixes used (after popped) */ SLIST_HEAD(, prefix) curdirs; /* curdir stack */ extern struct attr allattr; @@ -614,6 +621,8 @@ int onlist(struct nvlist *, void *); /* util.c */ void prefix_push(const char *); void prefix_pop(void); +void buildprefix_push(const char *); +void buildprefix_pop(void); char *sourcepath(const char *); extern int dflag; #define CFGDBG(n, ...) \ Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.24 src/usr.bin/config/files.c:1.25 --- src/usr.bin/config/files.c:1.24 Tue Sep 1 12:46:20 2015 +++ src/usr.bin/config/files.c Tue Sep 1 13:42:48 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.24 2015/09/01 12:46:20 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.25 2015/09/01 13:42:48 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.24 2015/09/01 12:46:20 uebayasi Exp
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 16:01:23 UTC 2015 Modified Files: src/usr.bin/config: config.1 defs.h files.c main.c mkmakefile.c Log Message: Experimental ``suffix rules + subdirectories'' build support (-S). To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.bin/config/config.1 cvs rdiff -u -r1.82 -r1.83 src/usr.bin/config/defs.h cvs rdiff -u -r1.25 -r1.26 src/usr.bin/config/files.c cvs rdiff -u -r1.83 -r1.84 src/usr.bin/config/main.c cvs rdiff -u -r1.54 -r1.55 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/usr.bin/config/config.1 diff -u src/usr.bin/config/config.1:1.18 src/usr.bin/config/config.1:1.19 --- src/usr.bin/config/config.1:1.18 Thu Jul 16 08:42:53 2015 +++ src/usr.bin/config/config.1 Tue Sep 1 16:01:23 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: config.1,v 1.18 2015/07/16 08:42:53 dholland Exp $ +.\" $NetBSD: config.1,v 1.19 2015/09/01 16:01:23 uebayasi Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)config.8 8.2 (Berkeley) 4/19/94 .\" -.Dd July 16, 2015 +.Dd September 1, 2015 .Dt CONFIG 1 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd build kernel compilation directories .Sh SYNOPSIS .Nm -.Op Fl dMPpv +.Op Fl dMPpSv .Op Fl b Ar builddir .Op Fl D Ar var=value .Op Fl s Ar srcdir @@ -151,6 +151,8 @@ is used to prepare a kernel build direct when it is used in combination with the .Fl L flag. +.It Fl S +Use suffix rules and build objects under subdirectories (experimental). .It Fl U Ar var Undefine the makeoption .Ar var . Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.82 src/usr.bin/config/defs.h:1.83 --- src/usr.bin/config/defs.h:1.82 Tue Sep 1 13:45:52 2015 +++ src/usr.bin/config/defs.h Tue Sep 1 16:01:23 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.82 2015/09/01 13:45:52 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.83 2015/09/01 16:01:23 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 20150835 +#define CONFIG_VERSION 20150840 #define CONFIG_MINVERSION 0 /* @@ -556,6 +556,7 @@ void emit_params(void); /* main.c */ extern int Mflag; +extern int Sflag; void addoption(const char *, const char *); void addfsoption(const char *); void addmkoption(const char *, const char *); Index: src/usr.bin/config/files.c diff -u src/usr.bin/config/files.c:1.25 src/usr.bin/config/files.c:1.26 --- src/usr.bin/config/files.c:1.25 Tue Sep 1 13:42:48 2015 +++ src/usr.bin/config/files.c Tue Sep 1 16:01:23 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.25 2015/09/01 13:42:48 uebayasi Exp $ */ +/* $NetBSD: files.c,v 1.26 2015/09/01 16:01:23 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: files.c,v 1.25 2015/09/01 13:42:48 uebayasi Exp $"); +__RCSID("$NetBSD: files.c,v 1.26 2015/09/01 16:01:23 uebayasi Exp $"); #include #include @@ -274,6 +274,19 @@ fixfiles(void) struct nvlist *flathead, **flatp; int err, sel; + if (Sflag) { + struct config *cf; + char swapname[100]; + + addfile("devsw.c", NULL, 0, NULL); + addfile("ioconf.c", NULL, 0, NULL); + TAILQ_FOREACH(cf, , cf_next) { + (void)snprintf(swapname, sizeof(swapname), "swap%s.c", + cf->cf_name); + addfile(intern(swapname), NULL, 0, NULL); + } + } + err = 0; TAILQ_FOREACH(fi, , fi_next) { Index: src/usr.bin/config/main.c diff -u src/usr.bin/config/main.c:1.83 src/usr.bin/config/main.c:1.84 --- src/usr.bin/config/main.c:1.83 Tue Sep 1 14:32:20 2015 +++ src/usr.bin/config/main.c Tue Sep 1 16:01:23 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.83 2015/09/01 14:32:20 uebayasi Exp $ */ +/* $NetBSD: main.c,v 1.84 2015/09/01 16:01:23 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: main.c,v 1.83 2015/09/01 14:32:20 uebayasi Exp $"); +__RCSID("$NetBSD: main.c,v 1.84 2015/09/01 16:01:23 uebayasi Exp $"); #ifndef MAKE_BOOTSTRAP #include @@ -90,6 +90,7 @@ int vflag;/* verbose output */ int Pflag;/* pack locators */ int Lflag;/* lint config generation */ int Mflag;/* modular build */ +int Sflag;/* suffix rules & subdirectory */ int handling_cmdlineopts; /* currently processing -D/-U options */ int yyparse(void); @@ -168,7 +169,7 @@ main(int argc, char **argv) pflag = 0; xflag = 0; - while ((ch = getopt(argc, argv, "D:LMPU:dgpvb:s:x")) != -1) { + while ((ch = getopt(argc, argv, "D:LMPSU:dgpvb:s:x")) != -1) { switch (ch) { case 'd': @@ -227,6 +228,10 @@ main(int argc, char **argv) srcdir = optarg; break;
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Tue Sep 1 16:04:04 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Experimental suffix-rules build (disabled by default). To generate a diff of this commit: cvs rdiff -u -r1.216 -r1.217 src/sys/conf/Makefile.kern.inc 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.216 src/sys/conf/Makefile.kern.inc:1.217 --- src/sys/conf/Makefile.kern.inc:1.216 Sun Aug 30 21:16:10 2015 +++ src/sys/conf/Makefile.kern.inc Tue Sep 1 16:04:04 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.216 2015/08/30 21:16:10 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.217 2015/09/01 16:04:04 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -216,7 +216,11 @@ SYSLIBCOMPATLN?= ${COMPATLIBLN} ## MD_CFILES, MD_SFILES, and MD_OBJS, along with build rules for same. ## -MI_CFILES=devsw.c ioconf.c param.c +MI_CFILES= param.c +.if !defined(___USE_SUFFIX_RULES___) +MI_CFILES+= devsw.c ioconf.c +.endif + # the need for a MI_SFILES variable is dubitable at best MI_OBJS=${MI_CFILES:S/.c/.o/} @@ -504,7 +508,11 @@ CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} .if !defined(COPY_SYMTAB) build_kernel: .USE ${SYSTEM_LD_HEAD} +.if !defined(___USE_SUFFIX_RULES___) ${SYSTEM_LD} ${.TARGET} swap${.TARGET}.o +.else + ${SYSTEM_LD} ${.TARGET} +.endif ${SYSTEM_LD_TAIL_STAGE2} .else .for k in ${KERNELS} @@ -514,13 +522,21 @@ build_kernel: .USE ${CC} ${CFLAGS} ${CPPFLAGS} -DCOPY_SYMTAB \ -c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf.o ${SYSTEM_LD_HEAD} +.if !defined(___USE_SUFFIX_RULES___) ${SYSTEM_LD} ${.TARGET} swap${.TARGET}.o kern_ksyms_buf.o +.else + ${SYSTEM_LD} ${.TARGET} kern_ksyms_buf.o +.endif ${SYSTEM_LD_TAIL_STAGE1} ${CC} ${CFLAGS} ${CPPFLAGS} -DCOPY_SYMTAB \ -DSYMTAB_SPACE=$$(${DBSYM} -P ${.TARGET}${TARGETSFX}) \ -c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf_real.o ${SYSTEM_LD_HEAD} +.if !defined(___USE_SUFFIX_RULES___) ${SYSTEM_LD} ${.TARGET} swap${.TARGET}.o kern_ksyms_buf_real.o +.else + ${SYSTEM_LD} ${.TARGET} kern_ksyms_buf_real.o +.endif ${SYSTEM_LD_TAIL_STAGE2} .endif
CVS commit: src/sys/external/bsd/dwc2/dist
Module Name:src Committed By: uebayasi Date: Mon Aug 31 06:12:55 UTC 2015 Modified Files: src/sys/external/bsd/dwc2/dist: dwc2_hcdqueue.c Log Message: Fix build. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/external/bsd/dwc2/dist/dwc2_hcdqueue.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/external/bsd/dwc2/dist/dwc2_hcdqueue.c diff -u src/sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c:1.12 src/sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c:1.13 --- src/sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c:1.12 Sun Aug 30 12:59:59 2015 +++ src/sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c Mon Aug 31 06:12:55 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc2_hcdqueue.c,v 1.12 2015/08/30 12:59:59 skrll Exp $ */ +/* $NetBSD: dwc2_hcdqueue.c,v 1.13 2015/08/31 06:12:55 uebayasi Exp $ */ /* * hcd_queue.c - DesignWare HS OTG Controller host queuing routines @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dwc2_hcdqueue.c,v 1.12 2015/08/30 12:59:59 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc2_hcdqueue.c,v 1.13 2015/08/31 06:12:55 uebayasi Exp $"); #include #include @@ -797,7 +797,7 @@ int dwc2_hcd_qtd_add(struct dwc2_hsotg * struct dwc2_qh *qh) { - KASSERT(mutex_owned(hsotg->lock)); + KASSERT(mutex_owned(>lock)); int retval; if (unlikely(!qh)) {
CVS commit: src/etc
Module Name:src Committed By: uebayasi Date: Mon Aug 31 06:08:07 UTC 2015 Modified Files: src/etc: Makefile Log Message: Exclude duplicate kernel config names in set generation. Suppress warnings of defining duplicate make(1) targets. To generate a diff of this commit: cvs rdiff -u -r1.423 -r1.424 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/Makefile diff -u src/etc/Makefile:1.423 src/etc/Makefile:1.424 --- src/etc/Makefile:1.423 Thu Jul 23 08:03:25 2015 +++ src/etc/Makefile Mon Aug 31 06:08:07 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.423 2015/07/23 08:03:25 mrg Exp $ +# $NetBSD: Makefile,v 1.424 2015/08/31 06:08:07 uebayasi Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -571,7 +571,7 @@ build_kernels: .PHONY # (e.g. Linux) when building on NFS. # .if !defined(KERNELS_DONE) # { -.for configfile in ${ALL_KERNELS} # { +.for configfile in ${ALL_KERNELS:O:u} # { build_kernels: kern-${configfile} kern-${configfile}: .PHONY .MAKE cd ${KERNCONFDIR} && ${TOOL_CONFIG} ${CONFIGOPTS} -s ${KERNSRCDIR} \ @@ -588,8 +588,8 @@ build_kernelsets: .PHONY # Create kernel sets from ${KERNEL_SETS} into # ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets # -.for configfile in ${KERNEL_SETS} # { -.for configsel in ${ALL_KERNELS} +.for configfile in ${KERNEL_SETS:O:u} # { +.for configsel in ${ALL_KERNELS:O:u} .if ${configfile} == ${configsel} build_kernelsets: kernset-${configfile} kernset-${configfile}: .PHONY build_kernels snap_pre @@ -626,8 +626,8 @@ build_releasekernels: .PHONY # Build kernel.gz from ${KERNEL_SETS} ${EXTRA_KERNELS} into # ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel # -.for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS} # { -.for configsel in ${ALL_KERNELS} +.for configfile in ${KERNEL_SETS:O:u} ${EXTRA_KERNELS:O:u} # { +.for configsel in ${ALL_KERNELS:O:u} .if ${configfile} == ${configsel} build_releasekernels: releasekern-${configfile} releasekern-${configfile}: .PHONY build_kernels snap_pre
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 00:38:30 UTC 2015 Modified Files: src/usr.bin/config: mkmakefile.c Log Message: Refactor emit file functions. No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 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/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.49 src/usr.bin/config/mkmakefile.c:1.50 --- src/usr.bin/config/mkmakefile.c:1.49 Sun Aug 30 21:58:19 2015 +++ src/usr.bin/config/mkmakefile.c Tue Sep 1 00:38:30 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.49 2015/08/30 21:58:19 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.50 2015/09/01 00:38:30 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.49 2015/08/30 21:58:19 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.50 2015/09/01 00:38:30 uebayasi Exp $"); #include #include @@ -62,12 +62,6 @@ __RCSID("$NetBSD: mkmakefile.c,v 1.49 20 * Make the Makefile. */ -static const char *srcpath(struct files *); - -static const char *prefix_prologue(const char *); -static const char *filetype_prologue(struct filetype *); - - static void emitdefs(FILE *); static void emitfiles(FILE *, int, int); @@ -263,46 +257,6 @@ emitsubs(FILE *fp, const char *line, con } } -/* - * Return (possibly in a static buffer) the name of the `source' for a - * file. If we have `options source', or if the file is marked `always - * source', this is always the path from the `file' line; otherwise we - * get the .o from the obj-directory. - */ -static const char * -srcpath(struct files *fi) -{ -#if 1 - /* Always have source, don't support object dirs for kernel builds. */ - return (fi->fi_path); -#else - static char buf[MAXPATHLEN]; - - if (have_source || (fi->fi_flags & FI_ALWAYSSRC) != 0) - return (fi->fi_path); - if (objpath == NULL) { - cfgerror("obj-directory not set"); - return (NULL); - } - (void)snprintf(buf, sizeof buf, "%s/%s.o", objpath, fi->fi_base); - return (buf); -#endif -} - -static const char * -filetype_prologue(struct filetype *fit) -{ - - return (*fit->fit_path == '/') ? "" : "$S/"; -} - -static const char * -prefix_prologue(const char *path) -{ - - return (*path == '/') ? "" : "$S/"; -} - static void emitdefs(FILE *fp) { @@ -338,6 +292,22 @@ emitdefs(FILE *fp) } static void +emitfiletype(FILE *fp, struct filetype *fit) +{ + const char *prologue, *prefix, *sep; + + prologue = prefix = sep = ""; + if (*fit->fit_path != '/') { + prologue = "$S/"; + if (fit->fit_prefix != NULL) { + prefix = fit->fit_prefix; + sep = "/"; + } + } + fprintf(fp, "%s%s%s%s", prologue, prefix, sep, fit->fit_path); +} + +static void emitobjs(FILE *fp) { struct files *fi; @@ -350,22 +320,11 @@ emitobjs(FILE *fp) fprintf(fp, "\t%s.o \\\n", fi->fi_base); } TAILQ_FOREACH(oi, , oi_next) { - const char *prologue, *prefix, *sep; - if ((oi->oi_flags & OI_SEL) == 0) continue; - prologue = prefix = sep = ""; - if (*oi->oi_path != '/') { - if (oi->oi_prefix != NULL) { -prologue = prefix_prologue(oi->oi_path); -prefix = oi->oi_prefix; -sep = "/"; - } else { -prologue = filetype_prologue(>oi_fit); - } - } - fprintf(fp, "\t%s%s%s%s \\\n", prologue, prefix, sep, - oi->oi_path); + putc('\t', fp); + emitfiletype(fp, >oi_fit); + fputs(" \\\n", fp); } putc('\n', fp); } @@ -498,31 +457,18 @@ static void emitfiles(FILE *fp, int suffix, int upper_suffix) { struct files *fi; - const char *fpath; struct config *cf; char swapname[100]; fprintf(fp, "%cFILES= \\\n", toupper(suffix)); TAILQ_FOREACH(fi, , fi_next) { - const char *prologue, *prefix, *sep; - if ((fi->fi_flags & FI_SEL) == 0) continue; - fpath = srcpath(fi); if (fi->fi_suffix != suffix && fi->fi_suffix != upper_suffix) continue; - prologue = prefix = sep = ""; - if (*fi->fi_path != '/') { - if (fi->fi_prefix != NULL) { -prologue = prefix_prologue(fi->fi_prefix); -prefix = fi->fi_prefix; -sep = "/"; - } else { -prologue = filetype_prologue(>fi_fit); - } - } - fprintf(fp, "\t%s%s%s%s \\\n", - prologue, prefix, sep, fpath); + putc('\t', fp); + emitfiletype(fp, >fi_fit); + fputs(" \\\n", fp); } /* @@ -547,28 +493,15 @@ static void emitrules(FILE *fp) { struct files *fi; - const char *fpath; TAILQ_FOREACH(fi, , fi_next) { - const char *prologue, *prefix, *sep; - if ((fi->fi_flags & FI_SEL) == 0) continue; if (fi->fi_mkrule == NULL) continue; - fpath = srcpath(fi); - prologue = prefix = sep = ""; - if (*fpath != '/') { - if (fi->fi_prefix != NULL) { -prologue = prefix_prologue(fi->fi_prefix); -prefix = fi->fi_prefix; -sep = "/"; - } else { -prologue = filetype_prologue(>fi_fit); - } - } -
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Tue Sep 1 01:17:57 UTC 2015 Modified Files: src/usr.bin/config: mkmakefile.c Log Message: Properly handle absolute prefix. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 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/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.50 src/usr.bin/config/mkmakefile.c:1.51 --- src/usr.bin/config/mkmakefile.c:1.50 Tue Sep 1 00:38:30 2015 +++ src/usr.bin/config/mkmakefile.c Tue Sep 1 01:17:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.50 2015/09/01 00:38:30 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.51 2015/09/01 01:17:56 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: mkmakefile.c,v 1.50 2015/09/01 00:38:30 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.51 2015/09/01 01:17:56 uebayasi Exp $"); #include #include @@ -300,6 +300,8 @@ emitfiletype(FILE *fp, struct filetype * if (*fit->fit_path != '/') { prologue = "$S/"; if (fit->fit_prefix != NULL) { + if (*fit->fit_prefix == '/') +prologue = ""; prefix = fit->fit_prefix; sep = "/"; }
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sun Aug 30 07:35:11 UTC 2015 Modified Files: src/sys/conf: files Log Message: Typo. To generate a diff of this commit: cvs rdiff -u -r1.1142 -r1.1143 src/sys/conf/files 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/files diff -u src/sys/conf/files:1.1142 src/sys/conf/files:1.1143 --- src/sys/conf/files:1.1142 Sun Aug 30 05:24:04 2015 +++ src/sys/conf/files Sun Aug 30 07:35:11 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1142 2015/08/30 05:24:04 uebayasi Exp $ +# $NetBSD: files,v 1.1143 2015/08/30 07:35:11 uebayasi Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20150832 @@ -290,7 +290,7 @@ defflag opt_md.h MEMORY_DISK_HOOKS MEMO MEMORY_DISK_DYNAMIC defparam opt_md.h MEMORY_DISK_SERVER=1 MEMORY_DISK_ROOT_SIZE MEMORY_DISK_RBFLAGS -defparam opt_memory_disk_image makeoptions_MEMORY_DISK_IMAGE +defparam opt_memory_disk_image.h makeoptions_MEMORY_DISK_IMAGE defflag opt_tftproot.h TFTPROOT TFTPROOT_DEBUG
CVS commit: src/sys
Module Name:src Committed By: uebayasi Date: Sun Aug 30 07:55:45 UTC 2015 Modified Files: src/sys/lib/libkern: libkern.h src/sys/lib/libkern/arch/hppa: bcopy.S src/sys/sys: cdefs.h Log Message: Include opt_diagnostic.h. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/sys/lib/libkern/libkern.h cvs rdiff -u -r1.14 -r1.15 src/sys/lib/libkern/arch/hppa/bcopy.S cvs rdiff -u -r1.124 -r1.125 src/sys/sys/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libkern/libkern.h diff -u src/sys/lib/libkern/libkern.h:1.120 src/sys/lib/libkern/libkern.h:1.121 --- src/sys/lib/libkern/libkern.h:1.120 Fri May 29 19:38:59 2015 +++ src/sys/lib/libkern/libkern.h Sun Aug 30 07:55:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: libkern.h,v 1.120 2015/05/29 19:38:59 matt Exp $ */ +/* $NetBSD: libkern.h,v 1.121 2015/08/30 07:55:45 uebayasi Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -34,6 +34,10 @@ #ifndef _LIB_LIBKERN_LIBKERN_H_ #define _LIB_LIBKERN_LIBKERN_H_ +#ifdef _KERNEL_OPT +#include opt_diagnostic.h +#endif + #include sys/types.h #include sys/inttypes.h #include sys/null.h Index: src/sys/lib/libkern/arch/hppa/bcopy.S diff -u src/sys/lib/libkern/arch/hppa/bcopy.S:1.14 src/sys/lib/libkern/arch/hppa/bcopy.S:1.15 --- src/sys/lib/libkern/arch/hppa/bcopy.S:1.14 Mon Jan 31 12:10:58 2011 +++ src/sys/lib/libkern/arch/hppa/bcopy.S Sun Aug 30 07:55:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bcopy.S,v 1.14 2011/01/31 12:10:58 skrll Exp $ */ +/* $NetBSD: bcopy.S,v 1.15 2015/08/30 07:55:45 uebayasi Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -38,6 +38,7 @@ #if defined(SPCOPY) !defined(_STANDALONE) +#include opt_diagnostic.h #include opt_multiprocessor.h #include machine/cpu.h @@ -49,7 +50,7 @@ #include machine/reg.h #if defined(LIBC_SCCS) !defined(lint) -RCSID($NetBSD: bcopy.S,v 1.14 2011/01/31 12:10:58 skrll Exp $) +RCSID($NetBSD: bcopy.S,v 1.15 2015/08/30 07:55:45 uebayasi Exp $) #endif /* LIBC_SCCS and not lint */ /* Index: src/sys/sys/cdefs.h diff -u src/sys/sys/cdefs.h:1.124 src/sys/sys/cdefs.h:1.125 --- src/sys/sys/cdefs.h:1.124 Sun Jan 25 20:45:18 2015 +++ src/sys/sys/cdefs.h Sun Aug 30 07:55:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.124 2015/01/25 20:45:18 christos Exp $ */ +/* $NetBSD: cdefs.h,v 1.125 2015/08/30 07:55:45 uebayasi Exp $ */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -36,6 +36,10 @@ #ifndef _SYS_CDEFS_H_ #define _SYS_CDEFS_H_ +#ifdef _KERNEL_OPT +#included opt_diagnostic.h +#endif + /* * Macro to test if we're using a GNU C compiler of a specific vintage * or later, for e.g. features that appeared in a particular version
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sun Aug 30 07:52:30 UTC 2015 Modified Files: src/sys/conf: files Log Message: Generate opt_diagnostic.h for DIAGNOSTIC; define unused _DIAGNOSTIC until thoroughly populated. To generate a diff of this commit: cvs rdiff -u -r1.1143 -r1.1144 src/sys/conf/files 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/files diff -u src/sys/conf/files:1.1143 src/sys/conf/files:1.1144 --- src/sys/conf/files:1.1143 Sun Aug 30 07:35:11 2015 +++ src/sys/conf/files Sun Aug 30 07:52:30 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1143 2015/08/30 07:35:11 uebayasi Exp $ +# $NetBSD: files,v 1.1144 2015/08/30 07:52:30 uebayasi Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20150832 @@ -28,6 +28,7 @@ defflag opt_modular.h MODULAR defflag opt_modular.h MODULAR_DEFAULT_AUTOLOAD defflagKEYLOCK defparam opt_syslimits.h CHILD_MAX OPEN_MAX +defflag opt_diagnostic.h _DIAGNOSTIC defparam opt_copy_symtab.h makeoptions_COPY_SYMTAB
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sun Aug 30 07:33:53 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Added Files: src/sys/conf: splash.mk Log Message: Move splash logic, keep Makefile.kern.inc clean. To generate a diff of this commit: cvs rdiff -u -r1.213 -r1.214 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r0 -r1.1 src/sys/conf/splash.mk 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.213 src/sys/conf/Makefile.kern.inc:1.214 --- src/sys/conf/Makefile.kern.inc:1.213 Sun Aug 30 05:24:04 2015 +++ src/sys/conf/Makefile.kern.inc Sun Aug 30 07:33:53 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.213 2015/08/30 05:24:04 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.214 2015/08/30 07:33:53 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -359,12 +359,6 @@ vers.o: ${SYSTEM_OBJ} Makefile $S/conf/n ${COMPILE_CTFCONVERT} .endif -# Option for embedding a splashscreen image. -.if defined(SPLASHSCREEN_IMAGE) -.include ${S}/dev/splash/splash.mk -init_main.o: splash_image.o -.endif - ## ## (7) misc targets: install, clean(dir), depend(all), lint, links, tags, ## cscope, mkid @@ -484,6 +478,7 @@ install-kernel-${MACHINE_NAME}: .endif .endif +.include ${S}/conf/splash.mk .include ${S}/conf/mdroot.mk .include ${S}/conf/lint.mk .include ${S}/conf/cscope.mk Added files: Index: src/sys/conf/splash.mk diff -u /dev/null src/sys/conf/splash.mk:1.1 --- /dev/null Sun Aug 30 07:33:53 2015 +++ src/sys/conf/splash.mk Sun Aug 30 07:33:53 2015 @@ -0,0 +1,7 @@ +# $NetBSD: splash.mk,v 1.1 2015/08/30 07:33:53 uebayasi Exp $ + +# Option for embedding a splashscreen image. +.if defined(SPLASHSCREEN_IMAGE) +.include ${S}/dev/splash/splash.mk +init_main.o: splash_image.o +.endif
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sun Aug 30 21:16:10 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Fix Define compile rules in sys/conf/Makefile.kern.inc Use `.if !commands(xxx)' to check if `xxx' has a defined, overriden rule, instead of `.if !targets(xxx)'. The latter evaluates as true even when `xxx' has an empty rule to define a dependency. To generate a diff of this commit: cvs rdiff -u -r1.215 -r1.216 src/sys/conf/Makefile.kern.inc 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.215 src/sys/conf/Makefile.kern.inc:1.216 --- src/sys/conf/Makefile.kern.inc:1.215 Sun Aug 30 14:06:17 2015 +++ src/sys/conf/Makefile.kern.inc Sun Aug 30 21:16:10 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.215 2015/08/30 14:06:17 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.216 2015/08/30 21:16:10 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -161,14 +161,14 @@ LINK_O?= @${_MKSHMSG}link ${.CURDI ${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC} .for _s in ${CFILES} -.if !target(${_s:T:R}.o) +.if !commands(${_s:T:R}.o) ${_s:T:R}.o: ${_s} ${NORMAL_C} .endif .endfor .for _s in ${SFILES} -.if !target(${_s:T:R}.o) +.if !commands(${_s:T:R}.o) ${_s:T:R}.o: ${_s} ${NORMAL_S} .endif
CVS commit: src/sys
Module Name:src Committed By: uebayasi Date: Sun Aug 30 14:06:17 UTC 2015 Modified Files: src/sys/arch/hpcmips/conf: LCARD NULLCONF src/sys/conf: Makefile.kern.inc Log Message: A makeoptions `DEFWARNINGS', forcibly disabling all ${CC} warnings, is only used by hpcmips's NULLCONF, which doesn't even build for other causes. If some source doen't build and needs a workaround, that should be deal with by modifying per-file ${CC} options (e.g. COPTS.foo.c+=-fno-xxx). Let's not use DEFWARNINGS any longer. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hpcmips/conf/LCARD cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hpcmips/conf/NULLCONF cvs rdiff -u -r1.214 -r1.215 src/sys/conf/Makefile.kern.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/conf/LCARD diff -u src/sys/arch/hpcmips/conf/LCARD:1.16 src/sys/arch/hpcmips/conf/LCARD:1.17 --- src/sys/arch/hpcmips/conf/LCARD:1.16 Fri Aug 21 01:52:08 2015 +++ src/sys/arch/hpcmips/conf/LCARD Sun Aug 30 14:06:17 2015 @@ -1,5 +1,5 @@ # -# $NetBSD: LCARD,v 1.16 2015/08/21 01:52:08 uebayasi Exp $ +# $NetBSD: LCARD,v 1.17 2015/08/30 14:06:17 uebayasi Exp $ # include arch/hpcmips/conf/std.lcard @@ -30,7 +30,6 @@ pseudo-device ksyms options DUMP_GIU_LEVEL2_INTR # Debugging use #options DEBUG_FIND_PCIC # Debugging use XXX harmful don't define until read source. #options DEBUG_FIND_PCIC_I82365SL_ONLY -#makeoptions DEFWARNINGS=no # override DEFWARNINGS?=yes file-system FFS # fast filesystem with user and group quotas options FFS_NO_SNAPSHOT # No FFS snapshot support Index: src/sys/arch/hpcmips/conf/NULLCONF diff -u src/sys/arch/hpcmips/conf/NULLCONF:1.23 src/sys/arch/hpcmips/conf/NULLCONF:1.24 --- src/sys/arch/hpcmips/conf/NULLCONF:1.23 Fri Aug 21 01:52:08 2015 +++ src/sys/arch/hpcmips/conf/NULLCONF Sun Aug 30 14:06:17 2015 @@ -1,5 +1,5 @@ # -# $NetBSD: NULLCONF,v 1.23 2015/08/21 01:52:08 uebayasi Exp $ +# $NetBSD: NULLCONF,v 1.24 2015/08/30 14:06:17 uebayasi Exp $ # include arch/hpcmips/conf/std.hpcmips @@ -21,7 +21,6 @@ options WINCE_DEFAULT_SETTING # Debuggi options DUMP_GIU_LEVEL2_INTR # Debugging use options DEBUG_FIND_PCIC # Debugging use XXX harmful don't define until read source. #options DEBUG_FIND_PCIC_I82365SL_ONLY -makeoptions DEFWARNINGS=no # override DEFWARNINGS?=yes file-system FFS # fast filesystem with user and group quotas options FFS_NO_SNAPSHOT # No FFS snapshot support Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.214 src/sys/conf/Makefile.kern.inc:1.215 --- src/sys/conf/Makefile.kern.inc:1.214 Sun Aug 30 07:33:53 2015 +++ src/sys/conf/Makefile.kern.inc Sun Aug 30 14:06:17 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.214 2015/08/30 07:33:53 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.215 2015/08/30 14:06:17 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -67,8 +67,6 @@ CPPFLAGS+= -std=gnu99 DEFCOPTS?= -O2 COPTS?= ${DEFCOPTS} DBG= # might contain unwanted -Ofoo -DEFWARNINGS?= yes -.if (${DEFWARNINGS} == yes) CWARNFLAGS+= -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith CWARNFLAGS+= -Wmissing-prototypes -Wstrict-prototypes CWARNFLAGS+= -Wold-style-definition @@ -87,7 +85,6 @@ CWARNFLAGS+= -Wold-style-definition # Add -Wno-sign-compare. -Wsign-compare is included in -Wall as of GCC 3.3, # but our sources aren't up for it yet. CWARNFLAGS+= -Wno-sign-compare -.endif CWARNFLAGS.clang+= -Wno-unknown-pragmas -Wno-conversion \ -Wno-self-assign
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Mon Aug 31 02:58:25 UTC 2015 Modified Files: src/usr.bin/config: defs.h gram.y main.c Log Message: Restore the old behavior of maxusers to allow the value to be overriden. Problem reported by John D. Baker. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/usr.bin/config/defs.h cvs rdiff -u -r1.49 -r1.50 src/usr.bin/config/gram.y cvs rdiff -u -r1.80 -r1.81 src/usr.bin/config/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.73 src/usr.bin/config/defs.h:1.74 --- src/usr.bin/config/defs.h:1.73 Sun Aug 30 21:58:19 2015 +++ src/usr.bin/config/defs.h Mon Aug 31 02:58:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.73 2015/08/30 21:58:19 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.74 2015/08/31 02:58:25 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 20150833 +#define CONFIG_VERSION 20150834 #define CONFIG_MINVERSION 0 /* @@ -610,6 +610,7 @@ int devbase_has_instances(struct devbase int is_declared_option(const char *); int deva_has_instances(struct deva *, int); void setupdirs(void); +void fixmaxusers(void); void fixmkoption(void); const char *strtolower(const char *); Index: src/usr.bin/config/gram.y diff -u src/usr.bin/config/gram.y:1.49 src/usr.bin/config/gram.y:1.50 --- src/usr.bin/config/gram.y:1.49 Sat Aug 29 14:07:45 2015 +++ src/usr.bin/config/gram.y Mon Aug 31 02:58:25 2015 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: gram.y,v 1.49 2015/08/29 14:07:45 uebayasi Exp $ */ +/* $NetBSD: gram.y,v 1.50 2015/08/31 02:58:25 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -42,7 +42,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: gram.y,v 1.49 2015/08/29 14:07:45 uebayasi Exp $); +__RCSID($NetBSD: gram.y,v 1.50 2015/08/31 02:58:25 uebayasi Exp $); #include sys/types.h #include sys/param.h @@ -760,13 +760,7 @@ select_options: ; select_maxusers: - MAXUSERS int32 { - char str[32]; - - setmaxusers($2); - snprintf(str, sizeof(str), %d, $2); - addoption(intern(MAXUSERS), intern(str)); - } + MAXUSERS int32 { setmaxusers($2); } ; select_ident: Index: src/usr.bin/config/main.c diff -u src/usr.bin/config/main.c:1.80 src/usr.bin/config/main.c:1.81 --- src/usr.bin/config/main.c:1.80 Sun Aug 30 01:33:20 2015 +++ src/usr.bin/config/main.c Mon Aug 31 02:58:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.80 2015/08/30 01:33:20 uebayasi Exp $ */ +/* $NetBSD: main.c,v 1.81 2015/08/31 02:58:25 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include sys/cdefs.h -__RCSID($NetBSD: main.c,v 1.80 2015/08/30 01:33:20 uebayasi Exp $); +__RCSID($NetBSD: main.c,v 1.81 2015/08/31 02:58:25 uebayasi Exp $); #ifndef MAKE_BOOTSTRAP #include sys/cdefs.h @@ -429,6 +429,12 @@ main(int argc, char **argv) stop(); /* + * Copy maxusers to param. + */ + yyfile = fixmaxusers; + fixmaxusers(); + + /* * Copy makeoptions to params */ yyfile = fixmkoption; @@ -1104,6 +1110,18 @@ appendcondmkoption(struct condexpr *cond } /* + * Copy maxusers to param MAXUSERS. + */ +void +fixmaxusers(void) +{ + char str[32]; + + snprintf(str, sizeof(str), %d, maxusers); + addoption(intern(MAXUSERS), intern(str)); +} + +/* * Copy makeoptions to params with makeoptions_ prefix. */ void
CVS commit: src/sys/arch
Module Name:src Committed By: uebayasi Date: Mon Aug 31 05:46:41 UTC 2015 Modified Files: src/sys/arch/cesfic/conf: Makefile.cesfic src/sys/arch/hp300/conf: Makefile.hp300 Log Message: Fix build of .s files. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/cesfic/conf/Makefile.cesfic cvs rdiff -u -r1.90 -r1.91 src/sys/arch/hp300/conf/Makefile.hp300 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cesfic/conf/Makefile.cesfic diff -u src/sys/arch/cesfic/conf/Makefile.cesfic:1.17 src/sys/arch/cesfic/conf/Makefile.cesfic:1.18 --- src/sys/arch/cesfic/conf/Makefile.cesfic:1.17 Fri Jan 23 03:39:39 2015 +++ src/sys/arch/cesfic/conf/Makefile.cesfic Mon Aug 31 05:46:41 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.cesfic,v 1.17 2015/01/23 03:39:39 chs Exp $ +# $NetBSD: Makefile.cesfic,v 1.18 2015/08/31 05:46:41 uebayasi Exp $ # Makefile for NetBSD # @@ -78,7 +78,7 @@ TEXTADDR?= 2000 %CFILES -#%SFILES +%SFILES %LOAD Index: src/sys/arch/hp300/conf/Makefile.hp300 diff -u src/sys/arch/hp300/conf/Makefile.hp300:1.90 src/sys/arch/hp300/conf/Makefile.hp300:1.91 --- src/sys/arch/hp300/conf/Makefile.hp300:1.90 Wed Apr 15 19:13:47 2015 +++ src/sys/arch/hp300/conf/Makefile.hp300 Mon Aug 31 05:46:41 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.hp300,v 1.90 2015/04/15 19:13:47 mrg Exp $ +# $NetBSD: Makefile.hp300,v 1.91 2015/08/31 05:46:41 uebayasi Exp $ # Makefile for NetBSD # @@ -79,7 +79,7 @@ dma.o hpux_machdep.o locore.o machdep.o %CFILES -#%SFILES +%SFILES %LOAD
CVS commit: src
Module Name:src Committed By: uebayasi Date: Sat Aug 29 07:33:18 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc files src/sys/sys: param.h src/usr.bin/config: defs.h mkmakefile.c Log Message: Revert MAXUSERS changes. Need fresh air. To generate a diff of this commit: cvs rdiff -u -r1.201 -r1.202 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.1137 -r1.1138 src/sys/conf/files cvs rdiff -u -r1.484 -r1.485 src/sys/sys/param.h cvs rdiff -u -r1.68 -r1.69 src/usr.bin/config/defs.h cvs rdiff -u -r1.43 -r1.44 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.201 src/sys/conf/Makefile.kern.inc:1.202 --- src/sys/conf/Makefile.kern.inc:1.201 Sat Aug 29 07:08:38 2015 +++ src/sys/conf/Makefile.kern.inc Sat Aug 29 07:33:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.201 2015/08/29 07:08:38 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.202 2015/08/29 07:33:18 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -62,7 +62,7 @@ S!= cd ../../../..; pwd ## INCLUDES?= -I. ${EXTRA_INCLUDES} -I${S}/../common/include -I$S/arch \ -I$S -nostdinc -CPPFLAGS+= ${INCLUDES} ${IDENT} -D_KERNEL -D_KERNEL_OPT +CPPFLAGS+= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT CPPFLAGS+= -std=gnu99 DEFCOPTS?= -O2 COPTS?= ${DEFCOPTS} Index: src/sys/conf/files diff -u src/sys/conf/files:1.1137 src/sys/conf/files:1.1138 --- src/sys/conf/files:1.1137 Sat Aug 29 07:08:38 2015 +++ src/sys/conf/files Sat Aug 29 07:33:18 2015 @@ -1,7 +1,7 @@ -# $NetBSD: files,v 1.1137 2015/08/29 07:08:38 uebayasi Exp $ +# $NetBSD: files,v 1.1138 2015/08/29 07:33:18 uebayasi Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 -version 20150829 +version 20150820 # # device classes @@ -17,7 +17,6 @@ devclass bus # options understood by the machine-independent part of the kernel # (note, these are case-sensitive) # -defparam opt_param.h MAXUSERS defflagINSECURE defflagKMEMSTATS defflagKTRACE Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.484 src/sys/sys/param.h:1.485 --- src/sys/sys/param.h:1.484 Sat Aug 29 07:08:38 2015 +++ src/sys/sys/param.h Sat Aug 29 07:33:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.484 2015/08/29 07:08:38 uebayasi Exp $ */ +/* $NetBSD: param.h,v 1.485 2015/08/29 07:33:18 uebayasi Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -39,10 +39,6 @@ #ifndef _SYS_PARAM_H_ #define _SYS_PARAM_H_ -#ifdef _KERNEL_OPT -#include opt_param.h -#endif - /* * Historic BSD #defines -- probably will remain untouched for all time. */ Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.68 src/usr.bin/config/defs.h:1.69 --- src/usr.bin/config/defs.h:1.68 Sat Aug 29 07:08:38 2015 +++ src/usr.bin/config/defs.h Sat Aug 29 07:33:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.68 2015/08/29 07:08:38 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.69 2015/08/29 07:33:18 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 20150829 +#define CONFIG_VERSION 20150820 #define CONFIG_MINVERSION 0 /* Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.43 src/usr.bin/config/mkmakefile.c:1.44 --- src/usr.bin/config/mkmakefile.c:1.43 Sat Aug 29 07:08:38 2015 +++ src/usr.bin/config/mkmakefile.c Sat Aug 29 07:33:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.43 2015/08/29 07:08:38 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.44 2015/08/29 07:33:18 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include sys/cdefs.h -__RCSID($NetBSD: mkmakefile.c,v 1.43 2015/08/29 07:08:38 uebayasi Exp $); +__RCSID($NetBSD: mkmakefile.c,v 1.44 2015/08/29 07:33:18 uebayasi Exp $); #include sys/param.h #include ctype.h @@ -276,6 +276,7 @@ emitdefs(FILE *fp) s ? \ : ); } putc('\n', fp); + fprintf(fp, PARAM=-DMAXUSERS=%d\n, maxusers); fprintf(fp, MACHINE=%s\n, machine); const char *subdir = ;
CVS commit: src
Module Name:src Committed By: uebayasi Date: Sat Aug 29 07:08:38 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc files src/sys/sys: param.h src/usr.bin/config: defs.h mkmakefile.c sem.c Log Message: Define MAXUXERS in opt_param.h. Bump config(1) version. To generate a diff of this commit: cvs rdiff -u -r1.200 -r1.201 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.1136 -r1.1137 src/sys/conf/files cvs rdiff -u -r1.483 -r1.484 src/sys/sys/param.h cvs rdiff -u -r1.67 -r1.68 src/usr.bin/config/defs.h cvs rdiff -u -r1.42 -r1.43 src/usr.bin/config/mkmakefile.c cvs rdiff -u -r1.71 -r1.72 src/usr.bin/config/sem.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.200 src/sys/conf/Makefile.kern.inc:1.201 --- src/sys/conf/Makefile.kern.inc:1.200 Sat Aug 29 05:03:36 2015 +++ src/sys/conf/Makefile.kern.inc Sat Aug 29 07:08:38 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.200 2015/08/29 05:03:36 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.201 2015/08/29 07:08:38 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -62,7 +62,7 @@ S!= cd ../../../..; pwd ## INCLUDES?= -I. ${EXTRA_INCLUDES} -I${S}/../common/include -I$S/arch \ -I$S -nostdinc -CPPFLAGS+= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT +CPPFLAGS+= ${INCLUDES} ${IDENT} -D_KERNEL -D_KERNEL_OPT CPPFLAGS+= -std=gnu99 DEFCOPTS?= -O2 COPTS?= ${DEFCOPTS} Index: src/sys/conf/files diff -u src/sys/conf/files:1.1136 src/sys/conf/files:1.1137 --- src/sys/conf/files:1.1136 Fri Aug 21 07:19:39 2015 +++ src/sys/conf/files Sat Aug 29 07:08:38 2015 @@ -1,7 +1,7 @@ -# $NetBSD: files,v 1.1136 2015/08/21 07:19:39 uebayasi Exp $ +# $NetBSD: files,v 1.1137 2015/08/29 07:08:38 uebayasi Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 -version 20150820 +version 20150829 # # device classes @@ -17,6 +17,7 @@ devclass bus # options understood by the machine-independent part of the kernel # (note, these are case-sensitive) # +defparam opt_param.h MAXUSERS defflagINSECURE defflagKMEMSTATS defflagKTRACE Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.483 src/sys/sys/param.h:1.484 --- src/sys/sys/param.h:1.483 Sun Aug 16 18:00:03 2015 +++ src/sys/sys/param.h Sat Aug 29 07:08:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.483 2015/08/16 18:00:03 mlelstv Exp $ */ +/* $NetBSD: param.h,v 1.484 2015/08/29 07:08:38 uebayasi Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -39,6 +39,10 @@ #ifndef _SYS_PARAM_H_ #define _SYS_PARAM_H_ +#ifdef _KERNEL_OPT +#include opt_param.h +#endif + /* * Historic BSD #defines -- probably will remain untouched for all time. */ Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.67 src/usr.bin/config/defs.h:1.68 --- src/usr.bin/config/defs.h:1.67 Sat Aug 29 02:54:07 2015 +++ src/usr.bin/config/defs.h Sat Aug 29 07:08:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.67 2015/08/29 02:54:07 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.68 2015/08/29 07:08:38 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 20150820 +#define CONFIG_VERSION 20150829 #define CONFIG_MINVERSION 0 /* Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.42 src/usr.bin/config/mkmakefile.c:1.43 --- src/usr.bin/config/mkmakefile.c:1.42 Sat Aug 29 02:54:07 2015 +++ src/usr.bin/config/mkmakefile.c Sat Aug 29 07:08:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.42 2015/08/29 02:54:07 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.43 2015/08/29 07:08:38 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include sys/cdefs.h -__RCSID($NetBSD: mkmakefile.c,v 1.42 2015/08/29 02:54:07 uebayasi Exp $); +__RCSID($NetBSD: mkmakefile.c,v 1.43 2015/08/29 07:08:38 uebayasi Exp $); #include sys/param.h #include ctype.h @@ -276,7 +276,6 @@ emitdefs(FILE *fp) s ? \ : ); } putc('\n', fp); - fprintf(fp, PARAM=-DMAXUSERS=%d\n, maxusers); fprintf(fp, MACHINE=%s\n, machine); const char *subdir = ; Index: src/usr.bin/config/sem.c diff -u src/usr.bin/config/sem.c:1.71 src/usr.bin/config/sem.c:1.72 --- src/usr.bin/config/sem.c:1.71 Fri Nov 21 20:46:56 2014 +++ src/usr.bin/config/sem.c Sat Aug 29 07:08:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sem.c,v 1.71 2014/11/21 20:46:56 christos Exp $ */ +/* $NetBSD: sem.c,v 1.72 2015/08/29 07:08:38 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include sys/cdefs.h -__RCSID($NetBSD: sem.c,v 1.71 2014/11/21
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Sat Aug 29 07:24:49 UTC 2015 Modified Files: src/usr.bin/config: main.c sem.c Log Message: Fix previous. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/usr.bin/config/main.c cvs rdiff -u -r1.72 -r1.73 src/usr.bin/config/sem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/main.c diff -u src/usr.bin/config/main.c:1.77 src/usr.bin/config/main.c:1.78 --- src/usr.bin/config/main.c:1.77 Fri Aug 28 03:55:15 2015 +++ src/usr.bin/config/main.c Sat Aug 29 07:24:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.77 2015/08/28 03:55:15 uebayasi Exp $ */ +/* $NetBSD: main.c,v 1.78 2015/08/29 07:24:49 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include sys/cdefs.h -__RCSID($NetBSD: main.c,v 1.77 2015/08/28 03:55:15 uebayasi Exp $); +__RCSID($NetBSD: main.c,v 1.78 2015/08/29 07:24:49 uebayasi Exp $); #ifndef MAKE_BOOTSTRAP #include sys/cdefs.h @@ -429,6 +429,13 @@ main(int argc, char **argv) stop(); /* + * Fix maxusers. + */ + char buf[32]; + snprintf(buf, sizeof(buf), %d, maxusers); + addoption(intern(MAXUSERS), intern(buf)); + + /* * If working on an ioconf-only config, process here and exit */ if (ioconfname) { Index: src/usr.bin/config/sem.c diff -u src/usr.bin/config/sem.c:1.72 src/usr.bin/config/sem.c:1.73 --- src/usr.bin/config/sem.c:1.72 Sat Aug 29 07:08:38 2015 +++ src/usr.bin/config/sem.c Sat Aug 29 07:24:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sem.c,v 1.72 2015/08/29 07:08:38 uebayasi Exp $ */ +/* $NetBSD: sem.c,v 1.73 2015/08/29 07:24:49 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include sys/cdefs.h -__RCSID($NetBSD: sem.c,v 1.72 2015/08/29 07:08:38 uebayasi Exp $); +__RCSID($NetBSD: sem.c,v 1.73 2015/08/29 07:24:49 uebayasi Exp $); #include sys/param.h #include ctype.h @@ -239,7 +239,6 @@ setdefmaxusers(int min, int def, int max void setmaxusers(int n) { - char buf[32]; if (maxusers == n) { cfgerror(duplicate maxusers parameter); @@ -257,8 +256,6 @@ setmaxusers(int n) cfgerror(warning: maxusers (%d) %d, n, maxmaxusers); errors--; } - snprintf(buf, sizeof(buf), %d, maxusers); - addoption(MAXUSERS, buf); } void
CVS commit: src/usr.bin/config
Module Name:src Committed By: uebayasi Date: Sat Aug 29 13:34:21 UTC 2015 Modified Files: src/usr.bin/config: main.c Log Message: Revert MAXUSERS. CVS is hard. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/usr.bin/config/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/main.c diff -u src/usr.bin/config/main.c:1.78 src/usr.bin/config/main.c:1.79 --- src/usr.bin/config/main.c:1.78 Sat Aug 29 07:24:49 2015 +++ src/usr.bin/config/main.c Sat Aug 29 13:34:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.78 2015/08/29 07:24:49 uebayasi Exp $ */ +/* $NetBSD: main.c,v 1.79 2015/08/29 13:34:21 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include sys/cdefs.h -__RCSID($NetBSD: main.c,v 1.78 2015/08/29 07:24:49 uebayasi Exp $); +__RCSID($NetBSD: main.c,v 1.79 2015/08/29 13:34:21 uebayasi Exp $); #ifndef MAKE_BOOTSTRAP #include sys/cdefs.h @@ -429,13 +429,6 @@ main(int argc, char **argv) stop(); /* - * Fix maxusers. - */ - char buf[32]; - snprintf(buf, sizeof(buf), %d, maxusers); - addoption(intern(MAXUSERS), intern(buf)); - - /* * If working on an ioconf-only config, process here and exit */ if (ioconfname) {
CVS commit: src
Module Name:src Committed By: uebayasi Date: Sat Aug 29 14:07:46 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc files src/sys/sys: param.h src/usr.bin/config: defs.h gram.y mkmakefile.c Log Message: Convert MAXUSERS, take 2. Define MAXUSERS in opt_param.h and include it from sys/param.h, for more accurate dependency. Don't define -DMAXUSERS and add it to ${CPPFLAGS}. config(5)'s maxusers syntax doesn't change. (The version just before revert was OK, but I had something bad in my obj dirs.) To generate a diff of this commit: cvs rdiff -u -r1.202 -r1.203 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.1138 -r1.1139 src/sys/conf/files cvs rdiff -u -r1.485 -r1.486 src/sys/sys/param.h cvs rdiff -u -r1.69 -r1.70 src/usr.bin/config/defs.h cvs rdiff -u -r1.48 -r1.49 src/usr.bin/config/gram.y cvs rdiff -u -r1.44 -r1.45 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.202 src/sys/conf/Makefile.kern.inc:1.203 --- src/sys/conf/Makefile.kern.inc:1.202 Sat Aug 29 07:33:18 2015 +++ src/sys/conf/Makefile.kern.inc Sat Aug 29 14:07:45 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.202 2015/08/29 07:33:18 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.203 2015/08/29 14:07:45 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -62,7 +62,7 @@ S!= cd ../../../..; pwd ## INCLUDES?= -I. ${EXTRA_INCLUDES} -I${S}/../common/include -I$S/arch \ -I$S -nostdinc -CPPFLAGS+= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT +CPPFLAGS+= ${INCLUDES} ${IDENT} -D_KERNEL -D_KERNEL_OPT CPPFLAGS+= -std=gnu99 DEFCOPTS?= -O2 COPTS?= ${DEFCOPTS} Index: src/sys/conf/files diff -u src/sys/conf/files:1.1138 src/sys/conf/files:1.1139 --- src/sys/conf/files:1.1138 Sat Aug 29 07:33:18 2015 +++ src/sys/conf/files Sat Aug 29 14:07:45 2015 @@ -1,7 +1,7 @@ -# $NetBSD: files,v 1.1138 2015/08/29 07:33:18 uebayasi Exp $ +# $NetBSD: files,v 1.1139 2015/08/29 14:07:45 uebayasi Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 -version 20150820 +version 20150830 # # device classes @@ -17,6 +17,7 @@ devclass bus # options understood by the machine-independent part of the kernel # (note, these are case-sensitive) # +defparam opt_param.h MAXUSERS defflagINSECURE defflagKMEMSTATS defflagKTRACE Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.485 src/sys/sys/param.h:1.486 --- src/sys/sys/param.h:1.485 Sat Aug 29 07:33:18 2015 +++ src/sys/sys/param.h Sat Aug 29 14:07:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.485 2015/08/29 07:33:18 uebayasi Exp $ */ +/* $NetBSD: param.h,v 1.486 2015/08/29 14:07:45 uebayasi Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -39,6 +39,10 @@ #ifndef _SYS_PARAM_H_ #define _SYS_PARAM_H_ +#ifdef _KERNEL_OPT +#include opt_param.h +#endif + /* * Historic BSD #defines -- probably will remain untouched for all time. */ Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.69 src/usr.bin/config/defs.h:1.70 --- src/usr.bin/config/defs.h:1.69 Sat Aug 29 07:33:18 2015 +++ src/usr.bin/config/defs.h Sat Aug 29 14:07:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.69 2015/08/29 07:33:18 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.70 2015/08/29 14:07:45 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 20150820 +#define CONFIG_VERSION 20150830 #define CONFIG_MINVERSION 0 /* Index: src/usr.bin/config/gram.y diff -u src/usr.bin/config/gram.y:1.48 src/usr.bin/config/gram.y:1.49 --- src/usr.bin/config/gram.y:1.48 Sat Aug 29 02:54:07 2015 +++ src/usr.bin/config/gram.y Sat Aug 29 14:07:45 2015 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: gram.y,v 1.48 2015/08/29 02:54:07 uebayasi Exp $ */ +/* $NetBSD: gram.y,v 1.49 2015/08/29 14:07:45 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -42,7 +42,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: gram.y,v 1.48 2015/08/29 02:54:07 uebayasi Exp $); +__RCSID($NetBSD: gram.y,v 1.49 2015/08/29 14:07:45 uebayasi Exp $); #include sys/types.h #include sys/param.h @@ -760,7 +760,13 @@ select_options: ; select_maxusers: - MAXUSERS int32 { setmaxusers($2); } + MAXUSERS int32 { + char str[32]; + + setmaxusers($2); + snprintf(str, sizeof(str), %d, $2); + addoption(intern(MAXUSERS), intern(str)); + } ; select_ident: Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.44 src/usr.bin/config/mkmakefile.c:1.45 --- src/usr.bin/config/mkmakefile.c:1.44 Sat Aug 29 07:33:18 2015 +++
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sat Aug 29 16:07:07 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Added Files: src/sys/conf: kern.ldscript Log Message: Define two suffix rules, .c - .o and .S - .o, using ${NORMAL_C} and ${NORMAL_S} respectively. Use the .c rule to build devsw.c, ioconf.c, and param.c. Other .c/.S files have explicit rules in the generated `Makefile', and unaffected. To generate a diff of this commit: cvs rdiff -u -r1.208 -r1.209 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r0 -r1.1 src/sys/conf/kern.ldscript 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.208 src/sys/conf/Makefile.kern.inc:1.209 --- src/sys/conf/Makefile.kern.inc:1.208 Sat Aug 29 15:58:38 2015 +++ src/sys/conf/Makefile.kern.inc Sat Aug 29 16:07:07 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.208 2015/08/29 15:58:38 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.209 2015/08/29 16:07:07 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -163,6 +163,14 @@ LINK_O?= @${_MKSHMSG}link ${.CURDI ${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC} \ ${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC} +.SUFFIXES: .c .o +.c.o: + ${NORMAL_C} + +.SUFFIXES: .S .o +.S.o: + ${NORMAL_S} + ## ## (3) libkern and compat ## @@ -196,6 +204,7 @@ SYSLIBCOMPATLN?= ${COMPATLIBLN} ## Each port should have a corresponding section with settings for ## MD_CFILES, MD_SFILES, and MD_OBJS, along with build rules for same. ## + MI_CFILES=devsw.c ioconf.c param.c # the need for a MI_SFILES variable is dubitable at best MI_OBJS=${MI_CFILES:S/.c/.o/} @@ -205,11 +214,6 @@ param.c: $S/conf/param.c rm -f param.c cp $S/conf/param.c . -.for _cfile in ${MI_CFILES} -${_cfile:T:R}.o: ${_cfile} - ${NORMAL_C} -.endfor - ## ## (5) link settings ## Added files:
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sat Aug 29 16:27:07 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Added Files: src/sys/conf: cscope.mk gdbinit.mk lint.mk Log Message: Move less important part out of Makefile.kern.inc. To generate a diff of this commit: cvs rdiff -u -r1.209 -r1.210 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r0 -r1.1 src/sys/conf/cscope.mk src/sys/conf/gdbinit.mk \ src/sys/conf/lint.mk 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.209 src/sys/conf/Makefile.kern.inc:1.210 --- src/sys/conf/Makefile.kern.inc:1.209 Sat Aug 29 16:07:07 2015 +++ src/sys/conf/Makefile.kern.inc Sat Aug 29 16:27:07 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.209 2015/08/29 16:07:07 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.210 2015/08/29 16:27:07 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -446,51 +446,14 @@ DEPS+= assym.d .endif ## -## lint +## install ## -.if !target(lint) -ALLSFILES?= ${MD_SFILES} ${SFILES} -LINTSTUBS?= ${ALLSFILES:T:R:C/^.*$/LintStub_.c/g} -KERNLINTFLAGS?= -bcehnxzFS -NORMAL_LN?= ${LINT} ${KERNLINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i $ -o $@ - -_lsrc=${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES} -LOBJS?= ${_lsrc:T:S/.c$/.ln/g} ${LIBKERNLN} ${SYSLIBCOMPATLN} - -.for _sfile in ${ALLSFILES} -LintStub_${_sfile:T:R}.c: ${_sfile} assym.h - ${_MKTARGET_COMPILE} - ${CC} -E -C ${AFLAGS} ${CPPFLAGS} ${_sfile} | \ - ${TOOL_AWK} -f $S/kern/genlintstub.awk ${.TARGET} -.endfor - -.for _cfile in ${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES} -${_cfile:T:R}.ln: ${_cfile} - ${_MKTARGET_COMPILE} - ${NORMAL_LN} -.endfor - -lint: ${LOBJS} - ${LINT} ${KERNLINTFLAGS} ${CPPFLAGS:M-[IDU]*} ${LOBJS} -.endif - -# Attempt to do a syntax-only compile of the entire kernel as one entity. -# Alas, bugs in the GCC C frontend prevent this from completely effective -# but information can be gleaned from the output. -syntax-only: ${CFILES} ${MD_CFILES} - ${CC} -fsyntax-only -combine ${CFLAGS} ${CPPFLAGS} \ - ${CFILES} ${MD_CFILES} - # List of kernel images that will be installed into the root file system. # Some platforms may need to install more than one (e.g. a netbsd.aout file # to be loaded directly by the firmware), so this can be overriden by them. KERNIMAGES?= netbsd -## -## install -## - .if !target(install) # The install target can be redefined by putting a # install-kernel-${MACHINE_NAME} target into /etc/mk.conf @@ -507,81 +470,9 @@ install-kernel-${MACHINE_NAME}: .endif .endif -## -## tags -## - -.if !target(tags) -tags: - @echo see $S/kern/Makefile for tags -.endif - -## -## cscope -## - -EXTRA_CLEAN+= cscope.out cscope.tmp -.if !target(cscope.out) -cscope.out: Makefile depend - ${_MKTARGET_CREATE} - @${TOOL_SED} 's/[^:]*://;s/^ *//;s/ *\\ *$$//;' lib/kern/.depend \ - | tr -s ' ' '\n' \ - | ${TOOL_SED} ';s|^../../||;' \ - cscope.tmp - @${TOOL_SED} 's/[^:]*://;s/^ *//;s/ *\\ *$$//;' lib/compat/.depend \ - | tr -s ' ' '\n' \ - | ${TOOL_SED} 's|^../../||;' \ - cscope.tmp - @echo ${SRCS} | cat - cscope.tmp | tr -s ' ' '\n' | sort -u | \ - ${CSCOPE} -k -i - -b `echo ${INCLUDES} | ${TOOL_SED} s/-nostdinc//` -# cscope doesn't write cscope.out if it's uptodate, so ensure -# make doesn't keep calling cscope when not needed. - @rm -f cscope.tmp; touch cscope.out -.endif - -.if !target(cscope) -cscope: cscope.out - @${CSCOPE} -d -.endif - -EXTRA_CLEAN+= ID -.if !target(mkid) -.PHONY: mkid -mkid: ID - -ID: Makefile depend - ${_MKTARGET_CREATE} - @${MKID} \ - `${TOOL_SED} 's/[^:]*://;s/^ *//;s/ * *$$//;' \ - lib/kern/.depend lib/compat/.depend \ - | tr ' ' '\n' \ - | ${TOOL_SED} s|^../../|| \ - | sort -u` \ - `${TOOL_SED} 's/[^:]*://;s/^ *//;s/ * *$$//;' \ - .depend \ - | tr ' ' '\n' \ - | sort -u` - -.endif - -## -## .gdbinit -## - -.include ${S}/gdbscripts/Makefile.inc - -EXTRA_CLEAN+= .gdbinit -.gdbinit: Makefile ${S}/gdbscripts/Makefile.inc - ${_MKTARGET_CREATE} - rm -f .gdbinit -.for __gdbinit in ${SYS_GDBINIT} - echo source ${S}/gdbscripts/${__gdbinit} .gdbinit -.endfor -.if defined(GDBINIT) !empty(GDBINIT) -.for __gdbinit in ${GDBINIT} - echo source ${__gdbinit} .gdbinit -.endfor -.endif +.include ${S}/conf/lint.mk +.include ${S}/conf/cscope.mk +.include ${S}/conf/gdbinit.mk ## ## the kernel Added files: Index: src/sys/conf/cscope.mk diff -u /dev/null src/sys/conf/cscope.mk:1.1 --- /dev/null Sat Aug 29 16:27:07 2015 +++ src/sys/conf/cscope.mk Sat Aug 29 16:27:07 2015 @@ -0,0 +1,49 @@ +# $NetBSD: cscope.mk,v 1.1 2015/08/29 16:27:07 uebayasi Exp $ + +## +## cscope +## + +EXTRA_CLEAN+= cscope.out cscope.tmp +.if !target(cscope.out) +cscope.out: Makefile
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sat Aug 29 15:06:35 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: conf.c doesn't exist. autoconf.c exists, but it's just a C file, no need to depend on Makefile. To generate a diff of this commit: cvs rdiff -u -r1.204 -r1.205 src/sys/conf/Makefile.kern.inc 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.204 src/sys/conf/Makefile.kern.inc:1.205 --- src/sys/conf/Makefile.kern.inc:1.204 Sat Aug 29 14:43:38 2015 +++ src/sys/conf/Makefile.kern.inc Sat Aug 29 15:06:35 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.204 2015/08/29 14:43:38 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.205 2015/08/29 15:06: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}. @@ -362,9 +362,6 @@ md_root.o: md_root_image.h # depend on MEMORY_DISK_IMAGE configuration md_root.o: Makefile -# depend on root or device configuration -autoconf.o conf.o: Makefile - # depend on maxusers and CPU configuration assym.h machdep.o: Makefile
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sat Aug 29 15:58:38 UTC 2015 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Now that MAXUSERS is in opt_param.h, param.o doesn't depend on Makefile. To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 src/sys/conf/Makefile.kern.inc 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.207 src/sys/conf/Makefile.kern.inc:1.208 --- src/sys/conf/Makefile.kern.inc:1.207 Sat Aug 29 15:51:53 2015 +++ src/sys/conf/Makefile.kern.inc Sat Aug 29 15:58:38 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.207 2015/08/29 15:51:53 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.208 2015/08/29 15:58:38 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -205,8 +205,6 @@ param.c: $S/conf/param.c rm -f param.c cp $S/conf/param.c . -param.o: Makefile - .for _cfile in ${MI_CFILES} ${_cfile:T:R}.o: ${_cfile} ${NORMAL_C}
CVS commit: src/sys/conf
Module Name:src Committed By: uebayasi Date: Sat Aug 29 16:10:01 UTC 2015 Removed Files: src/sys/conf: kern.ldscript Log Message: Revert a mistakenly added file. To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/sys/conf/kern.ldscript Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.