2001-09-25 05:43:35 +04:00
|
|
|
# $NetBSD: Makefile.inc,v 1.7 2001/09/25 01:43:35 tv Exp $
|
2001-08-14 15:01:55 +04:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
# Ensure that TOOLDIR is set.
|
|
|
|
.if !defined(TOOLDIR)
|
|
|
|
.BEGIN:
|
|
|
|
@echo "===> TOOLDIR must be set in ${MAKECONF} or the environment"
|
|
|
|
@false
|
|
|
|
.endif
|
|
|
|
|
2001-09-22 09:45:50 +04:00
|
|
|
# Stash the current directory (some builds here actually change .CURDIR).
|
2001-08-14 15:01:55 +04:00
|
|
|
_CURDIR?=${.CURDIR}
|
|
|
|
|
2001-09-25 05:43:35 +04:00
|
|
|
# Don't use target tool "strip" at install phase
|
|
|
|
INSTALL= ${TOOLDIR}/bin/binstall
|
|
|
|
|
2001-08-14 15:01:55 +04:00
|
|
|
# "make build": Only build if the installed program is out-of-date.
|
|
|
|
# ("make all" and "make install" always build and install.)
|
|
|
|
.if make(build)
|
|
|
|
MKTOOLS?=no
|
2001-08-14 16:36:10 +04:00
|
|
|
.if ${MKTOOLS} == "always"
|
|
|
|
build:
|
|
|
|
.else
|
2001-08-14 15:01:55 +04:00
|
|
|
build: ${TIMESTAMP}
|
|
|
|
${TIMESTAMP}: ${_CURDIR}/Makefile
|
2001-08-14 16:36:10 +04:00
|
|
|
.endif
|
|
|
|
.if ${MKTOOLS} != "no"
|
2001-08-14 17:55:57 +04:00
|
|
|
@cd ${_CURDIR} && ${MAKE} cleandir
|
2001-08-14 15:01:55 +04:00
|
|
|
@cd ${_CURDIR} && ${MAKE} all
|
|
|
|
@cd ${_CURDIR} && ${MAKE} install
|
|
|
|
.else
|
|
|
|
@echo "===> $@ must be updated"
|
|
|
|
@echo "===> (set MKTOOLS=yes in /etc/mk.conf or the environment to continue)"
|
|
|
|
@false
|
|
|
|
.endif
|
|
|
|
.endif
|