From 81d944371e1e95071f5e3c5eb5a30a0dec601f03 Mon Sep 17 00:00:00 2001 From: itojun Date: Wed, 30 Aug 2000 08:52:40 +0000 Subject: [PATCH] make autobuild --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Makefile b/Makefile index 69db3d6031..70cded274c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,10 @@ TARGET?= bogus +ARCH?= i386 +.if ${TARGET} == "freebsd4" || ${TARGET} == "openbsd" +KERNCONF?= GENERIC.KAME +.else +KERNCONF?= GENERIC.v6 +.endif DEVELOPER= NO .if ${DEVELOPER} == "YES" @@ -60,4 +66,29 @@ tree: fi; \ cvs update -d -P kame) +# use it with caution - must be root for "make includes" +autobuild: + (cd ${.CURDIR}; ${MAKE} clean update prepare) + (cd ${.CURDIR}/${TARGET}; ${MAKE} clean) + case ${TARGET} in \ + bsdi*|freebsd*) \ + (cd ${.CURDIR}/${TARGET}; ${MAKE} includes); \ + (cd ${.CURDIR}/${TARGET}; ${MAKE} install-includes); \ + ;; \ + netbsd*|openbsd*) \ + (cd ${.CURDIR}/${TARGET}; ${MAKE} includes); \ + ;; \ + esac + (cd ${.CURDIR}/${TARGET}; ${MAKE}) + case ${TARGET} in \ + bsdi*|freebsd*) \ + (cd ${.CURDIR}/${TARGET}/sys/${ARCH}/conf; config ${KERNCONF}); \ + (cd ${.CURDIR}/${TARGET}/sys/compile/${KERNCONF}; ${MAKE} clean depend; ${MAKE}); \ + ;; \ + netbsd*|openbsd*) \ + (cd ${.CURDIR}/${TARGET}/sys/arch/${ARCH}/conf; config ${KERNCONF}); \ + (cd ${.CURDIR}/${TARGET}/sys/arch/${ARCH}/compile/${KERNCONF}; ${MAKE} clean depend; ${MAKE}); \ + ;; \ + esac + .include "Makefile.inc"