Permalink
Browse files

make autobuild

  • Loading branch information...
1 parent 6fd26c0 commit 81d944371e1e95071f5e3c5eb5a30a0dec601f03 itojun committed Aug 30, 2000
Showing with 31 additions and 0 deletions.
  1. +31 −0 Makefile
View
@@ -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"

0 comments on commit 81d9443

Please sign in to comment.