make it possible to assemble a CONFIG_SITE instead of having one

single file.
approved by aja@, sthen@, jasper@...
This commit is contained in:
espie 2011-12-09 09:42:44 +00:00
parent fdb2cfc6dc
commit 949fe672d3
2 changed files with 12 additions and 10 deletions

View File

@ -1,6 +1,6 @@
#-*- mode: Makefile; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: bsd.port.mk,v 1.1150 2011/12/08 08:15:36 espie Exp $
# $OpenBSD: bsd.port.mk,v 1.1151 2011/12/09 09:42:44 espie Exp $
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
#
@ -2399,6 +2399,10 @@ ${_PATCH_COOKIE}: ${_EXTRACT_COOKIE}
${_CONFIGURE_COOKIE}: ${_PATCH_COOKIE}
@${ECHO_MSG} "===> Configuring for ${FULLPKGNAME}${_MASTER}"
.if defined(_CONFIG_SITE)
@cat ${CONFIG_SITE_LIST} >${_CONFIG_SITE}
@echo "Using ${_CONFIG_SITE} (generated)"
.endif
@mkdir -p ${WRKBUILD}
.if target(pre-configure)
@${_MAKESYS} pre-configure

View File

@ -1,6 +1,6 @@
#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: gnu.port.mk,v 1.45 2011/11/07 15:39:50 espie Exp $
# $OpenBSD: gnu.port.mk,v 1.46 2011/12/09 09:42:44 espie Exp $
# Based on bsd.port.mk, originally by Jordan K. Hubbard.
# This file is in the public domain.
@ -33,14 +33,12 @@ MAKE_ENV += AUTOCONF_VERSION=${AUTOCONF_VERSION}
CONFIGURE_STYLE += autoheader
. endif
.endif
.if !defined(CONFIG_SITE)
CONFIG_SITE = ${PORTSDIR}/infrastructure/db/config.site
.endif
.if !empty(CONFIG_SITE)
CONFIGURE_ENV += CONFIG_SITE='${CONFIG_SITE}'
. if !defined(MODGNU_EMACS_YOURE_WEIRD)
MAKE_ENV += CONFIG_SITE='${CONFIG_SITE}'
. endif
CONFIG_SITE_LIST += ${PORTSDIR}/infrastructure/db/config.site
_CONFIG_SITE = ${WRKDIR}/config.site
CONFIGURE_ENV += CONFIG_SITE='${_CONFIG_SITE}'
.if !defined(MODGNU_EMACS_YOURE_WEIRD)
MAKE_ENV += CONFIG_SITE='${_CONFIG_SITE}'
.endif
MODGNU_CONFIG_GUESS_DIRS ?=${WRKSRC}