diff -urN Mk.orig/bsd.port.mk Mk/bsd.port.mk --- Mk.orig/bsd.port.mk Mon Feb 20 21:50:10 2006 +++ Mk/bsd.port.mk Wed Feb 22 02:12:28 2006 @@ -978,16 +978,8 @@ .endif -# Start of pre-makefile section. -.if !defined(AFTERPORTMK) - -.if defined(_PREMKINCLUDED) -check-makefile:: - @${ECHO_CMD} "${PKGNAME}: Makefile error: you cannot include bsd.port[.pre].mk twice" - @${FALSE} -.endif - -_PREMKINCLUDED= yes +# Start of options section +.if defined(INOPTIONSMK) || ( !defined(USEOPTIONSMK) && !defined(AFTERMKPORT) ) .if defined(MAKE_VERSION) .if ${MAKE_VERSION} >= 5200408030 || ${MAKE_VERSION} >= 4200408030 && ${MAKE_VERSION} < 5000000000 @@ -1180,6 +1172,20 @@ . endif .endif +.endif + + +# Start of pre-makefile section. +.if !defined(AFTERPORTMK) && !defined(INOPTIONSMK) + +.if defined(_PREMKINCLUDED) +check-makefile:: + @${ECHO_CMD} "${PKGNAME}: Makefile error: you cannot include bsd.port[.pre].mk twice" + @${FALSE} +.endif + +_PREMKINCLUDED= yes + # check for old, crufty, makefile types, part 1: .if !defined(PORTNAME) || !( defined(PORTVERSION) || defined (DISTVERSION) ) || defined(PKGNAME) check-makefile:: @@ -1425,7 +1431,7 @@ # End of pre-makefile section. # Start of post-makefile section. -.if !defined(BEFOREPORTMK) +.if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) .if defined(_POSTMKINCLUDED) check-makefile:: diff -urN Mk.orig/bsd.port.options.mk Mk/bsd.port.options.mk --- Mk.orig/bsd.port.options.mk Thu Jan 1 01:00:00 1970 +++ Mk/bsd.port.options.mk Wed Feb 22 00:49:40 2006 @@ -0,0 +1,8 @@ +# $FreeBSD: ports/Mk/bsd.port.pre.mk,v 1.3 1999/08/25 04:40:21 obrien Exp $ + +USEOPTIONSMK= yes +INOPTIONSMK= yes + +.include "bsd.port.mk" + +.undef INOPTIONSMK