diff options
-rw-r--r-- | Mk/bsd.options.mk | 4 | ||||
-rw-r--r-- | Mk/bsd.port.mk | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk index df0b04e38b85..f326f4938c99 100644 --- a/Mk/bsd.options.mk +++ b/Mk/bsd.options.mk @@ -391,6 +391,10 @@ NOPORTDOCS= yes NOPORTEXAMPLES= yes .endif +.if ${PORT_OPTIONS:MDEBUG} +WITH_DEBUG= yes +.endif + .if defined(NO_OPTIONS_SORT) ALL_OPTIONS= ${OPTIONS_DEFINE} .endif diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 6b7f7c655c3a..0dff6d398f83 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1311,12 +1311,6 @@ WITH_DEBUG= yes .endif .endif -# Reset value from bsd.own.mk. -.if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG) -STRIP= #none -MAKE_ENV+= DONTSTRIP=yes -.endif - .include "${PORTSDIR}/Mk/bsd.options.mk" # Start of pre-makefile section. @@ -1596,7 +1590,10 @@ CFLAGS:= ${CFLAGS:C/${_CPUCFLAGS}//} .endif .endif +# Reset value from bsd.own.mk. .if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG) +STRIP= #none +MAKE_ENV+= DONTSTRIP=yes STRIP_CMD= ${TRUE} DEBUG_FLAGS?= -g CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} |