diff options
author | pav <pav@FreeBSD.org> | 2007-04-03 06:41:20 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2007-04-03 06:41:20 +0800 |
commit | a798e824e605b615de3cb6e132ef7a25e1a0d068 (patch) | |
tree | 2abf564752476eb57caf58dee23fa10d31e0d1b5 /Mk | |
parent | d38e7fe28d3eb8d0a5c101dcc637e56deb27d543 (diff) | |
download | freebsd-ports-gnome-a798e824e605b615de3cb6e132ef7a25e1a0d068.tar.gz freebsd-ports-gnome-a798e824e605b615de3cb6e132ef7a25e1a0d068.tar.zst freebsd-ports-gnome-a798e824e605b615de3cb6e132ef7a25e1a0d068.zip |
- Fix handling of OPTIONS default values when configuration files wasn't
written yet (make depends, make describe), and for options missing from
existing configuration files
PR: ports/96777
Submitted by: rafan (in follow-up)
Tested on: pointyhat exp-run
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index ae5e60ba2327..230e9f7137b5 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1273,7 +1273,13 @@ UNIQUENAME?= ${PKGNAMEPREFIX}${PORTNAME} OPTIONSFILE?= ${PORT_DBDIR}/${UNIQUENAME}/options _OPTIONSFILE!= ${ECHO_CMD} "${OPTIONSFILE}" .if defined(OPTIONS) -. if defined(PACKAGE_BUILDING) || (defined(BATCH) && !exists(${_OPTIONSFILE})) +# include OPTIONSFILE first if exists +. if exists(${_OPTIONSFILE}) && !make(rmconfig) +. include "${_OPTIONSFILE}" +. endif +. if exists(${_OPTIONSFILE}.local) +. include "${_OPTIONSFILE}.local" +. endif WITHOUT:= WITH:= . if defined(OPTIONS) @@ -1289,23 +1295,21 @@ WITH:= ${WITH} ${OPT} OPT:=${RO} . endfor . endif +# define only if NO WITH/WITHOUT_${W} is defined . for W in ${WITH} +. if !defined(WITH_${W}) && !defined(WITHOUT_${W}) WITH_${W}:= true +. endif . endfor . for W in ${WITHOUT} +. if !defined(WITH_${W}) && !defined(WITHOUT_${W}) WITHOUT_${W}:= true +. endif . endfor . undef WITH . undef WITHOUT . undef RO . undef REALOPTIONS -. endif -. if exists(${_OPTIONSFILE}) && !make(rmconfig) -. include "${_OPTIONSFILE}" -. endif -. if exists(${_OPTIONSFILE}.local) -. include "${_OPTIONSFILE}.local" -. endif .endif .endif |