Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.414 diff -u -r1.414 bsd.port.mk --- bsd.port.mk 13 Jun 2002 18:20:40 -0000 1.414 +++ bsd.port.mk 19 Jun 2002 19:24:14 -0000 @@ -553,8 +570,9 @@ CHMOD?= /bin/chmod CHOWN?= /usr/sbin/chown CP?= /bin/cp CUT?= /usr/bin/cut DC?= /usr/bin/dc +DIALOG?= /usr/bin/dialog EGREP?= /usr/bin/egrep EXPR?= /bin/expr FALSE?= false # Shell builtin @@ -810,6 +834,10 @@ XFREE86_VERSION?= 3 .endif +.if exists(${MASTERDIR}/Makefile.options) +.include "Makefile.options" +.endif + .endif # End of pre-makefile section. @@ -3462,6 +3551,15 @@ OSVERSION="${OSVERSION:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \ PORTOBJFORMAT="${PORTOBJFORMAT:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \ SYSTEMVERSION="${SYSTEMVERSION:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" +.endif + +.if exists(options) && !target(menuconfig) && make(menuconfig) +USERCONFIG?=${WRKDIR}/ports-userconfig +PORTOPTIONS?=${MASTERDIR}/options +MENUOPTIONS!=${SED} 's|^\([^ ]*\)[ ]*NO|\1 OFF|;s|^\([^ ]*\)[ ]*YES|\1 ON|;s|^\([^ ]*\)[ ]*\([^ ]*\)[ ]*\(.*\)|\1 "\3" \2|' < ${PORTOPTIONS} +menuconfig: + @${DIALOG} --checklist "Options for ${PORTNAME} ${PORTVERSION}" 21 70 15 ${MENUOPTIONS} 2> ${USERCONFIG} && (${XARGS} ${SH} -c 'while [ "$$1" != "" ]; do echo WITH_$$1=\"YES\"; shift; done' '' < ${USERCONFIG} > ${MASTERDIR}/Makefile.options) + @${RM} -f ${USERCONFIG} .endif .endif