Date: Mon, 08 Nov 2004 12:39:12 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: arch@freebsd.org Subject: Comments requested on adding ports modules to kernel build Message-ID: <20041108.123912.113102111.imp@bsdimp.com>
next in thread | raw e-mail | index | archive | help
I've been using the following for a while to automatically rebuild and
install a kernel module on one of my machines. I think this is
useful in general and would like to commit it.
Comments?
Warner
diff --exclude CVS -I\$Revision -I\$Id -I\$Header -I \$FreeBSD -ur /shadow/imp/F
reeBSD/src/sys/conf/kern.post.mk /shadow/imp/p4/src/sys/conf/kern.post.mk
--- /shadow/imp/FreeBSD/src/sys/conf/kern.post.mk Thu Oct 7 23:46:20 2004
+++ /shadow/imp/p4/src/sys/conf/kern.post.mk Sat Nov 6 12:29:02 2004
@@ -26,6 +26,19 @@
${target:S/^reinstall$/install/:S/^clobber$/cleandir/}
.endif
.endfor
+# Handle out of tree ports
+.if defined(PORTS_MODULES)
+.if defined(SYSDIR)
+PORTSMODULESENV=SYSDIR=${SYSDIR}
+.endif
+.for target in all install clean
+${target}: ports-${target}
+ports-${target}:
+.for __i in ${PORTS_MODULES}
+ cd /usr/ports/${__i}; ${PORTSMODULESENV} ${MAKE} ${target}
+.endfor
+.endfor
+.endif
.ORDER: kernel-install modules-install
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041108.123912.113102111.imp>
