1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-30 01:15:52 +00:00

- Add a code to invalidate saved OPTIONS when the set of OPTIONS defined in a

port changes. The end user inpact of this is more blue screens.

PR:		ports/97125
Submitted by:	pav
Tested on:	pointyhat exp-run
This commit is contained in:
Pav Lucistnik 2007-04-02 22:42:38 +00:00
parent 14489fef6b
commit 90c48348fe
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=189050

View File

@ -3167,8 +3167,7 @@ DEPENDS_ARGS+= NOCLEANDEPENDS=yes
#
################################################################
.if (!defined(OPTIONS) || defined(CONFIG_DONE) || \
defined(PACKAGE_BUILDING) || defined(BATCH) || \
exists(${_OPTIONSFILE}) || exists(${_OPTIONSFILE}.local))
defined(PACKAGE_BUILDING) || defined(BATCH))
_OPTIONS_OK=yes
.endif
@ -4149,7 +4148,7 @@ fetch: ${_FETCH_DEP} ${_FETCH_SEQ}
.if !target(${target}) && defined(_OPTIONS_OK)
${target}: ${${target:U}_COOKIE}
.elif !target(${target})
${target}: config
${target}: config-conditional
@cd ${.CURDIR} && ${MAKE} CONFIG_DONE=1 ${__softMAKEFLAGS} ${${target:U}_COOKIE}
.elif target(${target}) && defined(IGNORE)
.endif
@ -5708,10 +5707,36 @@ config-recursive:
.if !target(config-conditional)
config-conditional:
.if defined(OPTIONS) && !exists(${_OPTIONSFILE})
.if defined(OPTIONS)
.if exists(${_OPTIONSFILE})
# scan saved options and invalidate them, if the set of options does not match
@. ${_OPTIONSFILE}; \
set ${OPTIONS} XXX; \
while [ $$# -gt 3 ]; do \
withvar=WITH_$$1; \
withoutvar=WITHOUT_$$1; \
withval=$$(eval ${ECHO_CMD} $$\{$${withvar}\}); \
withoutval=$$(eval ${ECHO_CMD} $$\{$${withoutvar}\}); \
if [ ! -z "$${withval}" ]; then \
val=on; \
elif [ ! -z "$${withoutval}" ]; then \
val=off; \
else \
val=missing; \
fi; \
if [ "$${val}" = "missing" ]; then \
OPTIONS_INVALID=yes; \
fi; \
shift 3; \
done; \
if [ "$${OPTIONS_INVALID}" = "yes" ]; then \
cd ${.CURDIR} && ${MAKE} config; \
fi;
.else
cd ${.CURDIR} && ${MAKE} config;
.endif
.endif
.endif
.if !target(showconfig)
showconfig: