# $NetBSD: Makefile.extsrc,v 1.1 2009/12/01 01:53:46 uebayasi Exp $ .include .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