Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Move make snippets for use with config(1) ioconf functionali...
details: https://anonhg.NetBSD.org/src/rev/02f4f9de7056
branches: trunk
changeset: 753229:02f4f9de7056
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Mar 21 06:55:44 2010 +0000
description:
Move make snippets for use with config(1) ioconf functionality from
rump into share/mk. This is to make it useful for all kernel
builders.
Note: we have waaay too many weird and wonderful ways of making
kernel code (monolithic kernel, modules, rump). There should be
only one way to build kernel code instead of a maze of twisty little
.mk files, all not quite alike. When that is fixed, this snippet can go
into the more generic .mk file.
diffstat:
share/mk/bsd.ioconf.mk | 31 +++++++++++++++++++++++++++++++
sys/rump/Makefile.rump | 19 +++----------------
2 files changed, 34 insertions(+), 16 deletions(-)
diffs (68 lines):
diff -r a28bb5e0b0a7 -r 02f4f9de7056 share/mk/bsd.ioconf.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/mk/bsd.ioconf.mk Sun Mar 21 06:55:44 2010 +0000
@@ -0,0 +1,31 @@
+# $NetBSD: bsd.ioconf.mk,v 1.1 2010/03/21 06:55:45 pooka Exp $
+#
+
+# If IOCONF is defined, autocreate ioconf.c and locators.h.
+# This is useful mainly for devices.
+.if !empty(IOCONF)
+
+# discourage direct inclusion. bsd.ioconf.mk will hopefully go away
+# when the kernel build procedures are unified.
+.if defined(_BSD_IOCONF_MK_USER_)
+
+ioconf.c: ${IOCONF}
+ ${TOOL_CONFIG} -b ${.OBJDIR} -s ${S} ${.CURDIR}/${IOCONF}
+ # config doesn't change the files if they're unchanged. however,
+ # here we want to satisfy our make dependency, so force a
+ # timestamp update
+ touch ioconf.c locators.h
+
+.else # _BSD_IOCONF_MK_USER_
+
+ioconf.c:
+ @echo do not include bsd.ioconf.mk directly
+ @false
+
+.endif # _BSD_IOCONF_MK_USER_
+
+locators.h: ioconf.c
+
+CLEANFILES+= ioconf.c locators.h
+DPSRCS+= ioconf.c locators.h
+.endif
diff -r a28bb5e0b0a7 -r 02f4f9de7056 sys/rump/Makefile.rump
--- a/sys/rump/Makefile.rump Sun Mar 21 00:10:40 2010 +0000
+++ b/sys/rump/Makefile.rump Sun Mar 21 06:55:44 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rump,v 1.52 2010/03/01 15:41:15 pooka Exp $
+# $NetBSD: Makefile.rump,v 1.53 2010/03/21 06:55:44 pooka Exp $
#
WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet
@@ -102,21 +102,8 @@
${AR} ${_ARRANFL} ${.TARGET}
.endif
-# If IOCONF is defined, autocreate ioconf.c and locators.h.
-# This is useful mainly for devices.
-.if !empty(IOCONF)
-ioconf.c: ${IOCONF}
- ${TOOL_CONFIG} -b ${.OBJDIR} -s ${RUMPTOP}/.. ${.CURDIR}/${IOCONF}
- # config doesn't change the files if they're unchanged. however,
- # here we want to satisfy our make dependency, so force a
- # timestamp update
- touch ioconf.c locators.h
-
-locators.h: ioconf.c
-
-CLEANFILES+= ioconf.c locators.h
-DPSRCS+= ioconf.c locators.h
-.endif
+_BSD_IOCONF_MK_USER_=1
+.include <bsd.ioconf.mk>
.-include "${NETBSDSRCDIR}/sys/arch/${MACHINE_CPU}/include/Makefile.inc"
.-include "${NETBSDSRCDIR}/sys/arch/${MACHINE}/include/Makefile.inc"
Home |
Main Index |
Thread Index |
Old Index