Module Name: src
Committed By: pooka
Date: Wed Feb 3 21:11:24 UTC 2010
Modified Files:
src/sys/rump: Makefile.rump
Log Message:
If IOCONFIG is defined, autogenerate ioconf.c and locators.h
from ${IOCONFIG}.
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/rump/Makefile.rump
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.46 src/sys/rump/Makefile.rump:1.47
--- src/sys/rump/Makefile.rump:1.46 Sun Jan 31 00:38:36 2010
+++ src/sys/rump/Makefile.rump Wed Feb 3 21:11:24 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rump,v 1.46 2010/01/31 00:38:36 pooka Exp $
+# $NetBSD: Makefile.rump,v 1.47 2010/02/03 21:11:24 pooka Exp $
#
WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet
@@ -100,6 +100,20 @@
.if !defined(RUMP_SYMREN)
${AR} ${_ARRANFL} ${.TARGET}
.endif
-
+
+# If IOCONFIG is defined, autocreate ioconf.c and locators.h.
+# This is useful mainly for devices.
+.if !empty(IOCONFIG)
+ioconf.c: ${IOCONFIG}
+ ${TOOL_CONFIG} -b ${.OBJDIR} -s ${RUMPTOP}/.. ${IOCONFIG}
+ # 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
+
+CLEANFILES+= ioconf.c locators.h
+DPSRCS+= ioconf.c locators.h
+.endif
+
.-include "${NETBSDSRCDIR}/sys/arch/${MACHINE_CPU}/include/Makefile.inc"
.-include "${NETBSDSRCDIR}/sys/arch/${MACHINE}/include/Makefile.inc"