Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: matt_nb6_plus
Fetching contributors…

Cannot retrieve contributors at this time

file 77 lines (61 sloc) 1.5 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 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>
Something went wrong with that request. Please try again.