summaryrefslogtreecommitdiff
path: root/mk/configure/bsd.configure.mk
blob: fba595a90bc871765f20aed64607b591b2c29533 (plain)
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
# $NetBSD: bsd.configure.mk,v 1.4 2006/07/06 22:29:52 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and provides all
# variables and targets related to configuring packages for building.
#
# The following are the "public" targets provided by this module:
#
#    configure
#
# The following targets may be overridden in a package Makefile:
#
#    pre-configure, do-configure, post-configure
#

_CONFIGURE_COOKIE=	${WRKDIR}/.configure_done

######################################################################
### configure (PUBLIC)
######################################################################
### configure is a public target to configure the software for building.
###
.PHONY: configure
.if !defined(NO_CONFIGURE)
.  include "${PKGSRCDIR}/mk/configure/configure.mk"
.elif !target(configure)
.  if exists(${_CONFIGURE_COOKIE})
configure:
	@${DO_NADA}
.  else
configure: wrapper configure-cookie
.  endif
.endif

######################################################################
### configure-cookie (PRIVATE)
######################################################################
### configure-cookie creates the "configure" cookie file.
###
.PHONY: configure-cookie
configure-cookie:
	${_PKG_SILENT}${_PKG_DEBUG}${TEST} ! -f ${_CONFIGURE_COOKIE} || ${FALSE}
	${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${_CONFIGURE_COOKIE:H}
	${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${PKGNAME} > ${_CONFIGURE_COOKIE}