summaryrefslogtreecommitdiff
path: root/extsrc/Makefile.extsrc
diff options
context:
space:
mode:
authoruebayasi <uebayasi@NetBSD.org>2009-12-01 01:53:46 +0000
committeruebayasi <uebayasi@NetBSD.org>2009-12-01 01:53:46 +0000
commit45cbcdc3c9ff843ade931423de29a49c78f517e2 (patch)
tree2932b7a7c3ac04866a30e9b246bf291776329674 /extsrc/Makefile.extsrc
parent7ba2798f6e75466ab4df933fae405ab7a153f8ce (diff)
Top level reach-over directory for extsrc.
Diffstat (limited to 'extsrc/Makefile.extsrc')
-rw-r--r--extsrc/Makefile.extsrc77
1 files changed, 77 insertions, 0 deletions
diff --git a/extsrc/Makefile.extsrc b/extsrc/Makefile.extsrc
new file mode 100644
index 00000000000..5d250694b35
--- /dev/null
+++ b/extsrc/Makefile.extsrc
@@ -0,0 +1,77 @@
+# $NetBSD: Makefile.extsrc,v 1.1 2009/12/01 01:53:46 uebayasi Exp $
+
+.include <bsd.own.mk>
+
+.if ${MKUPDATE} == "no" && !defined(NOCLEANDIR)
+BUILDTARGETS+= cleandir
+.endif
+.if ${MKOBJDIRS} != "no"
+BUILDTARGETS+= obj
+.endif
+BUILDTARGETS+= do-tools
+.if !defined(NOINCLUDES)
+BUILDTARGETS+= includes
+.endif
+BUILDTARGETS+= do-lib
+BUILDTARGETS+= do-build
+
+.ORDER: ${BUILDTARGETS}
+
+START_TIME!= date
+
+build: check_EXTSRCSRCDIR
+ @echo "extsrc build started at: ${START_TIME}"
+.for tgt in ${BUILDTARGETS}
+ ${MAKEDIRTARGET} . ${tgt}
+.endfor
+ @echo "extsrc build started at: ${START_TIME}"
+ @printf "extsrc build finished at: " && date
+
+do-build:
+.for targ in dependall install
+ ${MAKEDIRTARGET} . ${targ}
+.endfor
+
+do-tools:
+.for dir in ${SUBDIR_TOOLS}
+ ${MAKEDIRTARGET} . do-${dir:S/\//-/g}
+.endfor
+
+do-lib:
+.for dir in ${SUBDIR_LIB}
+ ${MAKEDIRTARGET} . do-${dir:S/\//-/g}
+.endfor
+
+.for dir in ${SUBDIR_TOOLS} ${SUBDIR_LIB}
+do-${dir:S/\//-/g}:
+. for targ in dependall install
+ ${MAKEDIRTARGET} ${dir} ${targ}
+. endfor
+.endfor
+
+afterinstall: .PHONY
+.if ${MKMAN} != "no"
+ ${MAKEDIRTARGET} ${NETBSDSRCDIR}/share/man makedb \
+ WHATISDBDIR=${EXTSRCMANDIR}
+.endif
+
+# XXX how to decide this?
+
+DISTRIBTARGETS= # XXX
+
+distribution: check_EXTSRCSRCDIR
+.for tgt in ${DISTRIBTARGETS}
+ ${MAKEDIRTARGET} ${tgt} configinstall
+.endfor
+
+
+check_EXTSRCSRCDIR: .PHONY .NOTMAIN
+.if !defined(EXTSRCSRCDIR)
+ @echo
+ @echo "ERROR: setenv EXTSRCSRCDIR before doing that!"
+ @false
+.else
+ @true
+.endif
+
+.include <bsd.subdir.mk>