git: 665b0219e541 - main - Mk/Uses: Fix feature checks after my previous {WITH,WITHOUT}_*_PORTS change
Date: Thu, 11 Apr 2024 17:54:45 UTC
The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=665b0219e541019b849fd5a1efdf032081dcf610 commit 665b0219e541019b849fd5a1efdf032081dcf610 Author: Gleb Popov <arrowd@FreeBSD.org> AuthorDate: 2024-04-11 12:13:15 +0000 Commit: Gleb Popov <arrowd@FreeBSD.org> CommitDate: 2024-04-11 17:53:11 +0000 Mk/Uses: Fix feature checks after my previous {WITH,WITHOUT}_*_PORTS change Test Plan: Take cmake.mk for example. Choosing a port with USES=cmake and running `make -V CMAKE_BUILD_TYPE` gives "Release" and `make -V CMAKE_BUILD_TYPE WITH_DEBUG=yes` gives "Debug". However, `make -V CMAKE_BUILD_TYPE WITH_DEBUG_PORTS=this/port` still gives "Release" unless this change is applied. Differential Revision: https://reviews.freebsd.org/D44748 Fixes: d697653cffd19ddaf3cdee2589a830c72ab39777 Approved by: bapt --- Mk/Uses/cargo.mk | 2 +- Mk/Uses/cmake.mk | 8 ++++---- Mk/Uses/go.mk | 4 ++-- Mk/Uses/grantlee.mk | 2 +- Mk/Uses/meson.mk | 4 ++-- Mk/Uses/php.mk | 2 +- Mk/Uses/qmake.mk | 6 +++--- Mk/Uses/qt-dist.mk | 6 +++--- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index e3b733d35821..8f6bf1576723 100644 --- a/Mk/Uses/cargo.mk +++ b/Mk/Uses/cargo.mk @@ -194,7 +194,7 @@ CARGO_INSTALL_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' CARGO_TEST_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' . endif -. if !defined(WITH_DEBUG) +. if !defined(_WITH_DEBUG) CARGO_BUILD_ARGS+= --release CARGO_TEST_ARGS+= --release . else diff --git a/Mk/Uses/cmake.mk b/Mk/Uses/cmake.mk index 4129f0f341fc..307bd04d98f8 100644 --- a/Mk/Uses/cmake.mk +++ b/Mk/Uses/cmake.mk @@ -83,13 +83,13 @@ BUILD_DEPENDS+= ${CMAKE_BIN}:devel/cmake-core RUN_DEPENDS+= ${CMAKE_BIN}:devel/cmake-core . endif -. if defined(WITH_DEBUG) +. if defined(_WITH_DEBUG) CMAKE_BUILD_TYPE?= Debug -. elif defined(WITH_DEBUGINFO) +. elif defined(_WITH_DEBUGINFO) CMAKE_BUILD_TYPE?= RelWithDebInfo . else CMAKE_BUILD_TYPE?= Release -. endif #defined(WITH_DEBUG) +. endif #defined(_WITH_DEBUG) CMAKE_ARGS+= -DCMAKE_C_COMPILER:STRING="${CC}" \ -DCMAKE_CXX_COMPILER:STRING="${CXX}" \ @@ -128,7 +128,7 @@ CMAKE_ARGS+= -DCMAKE_COLOR_MAKEFILE:BOOL=OFF . endif . if empty(cmake_ARGS:Mindirect) -. if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) && !defined(WITH_DEBUGINFO) +. if defined(STRIP) && ${STRIP} != "" && !defined(_WITH_DEBUG) && !defined(_WITH_DEBUGINFO) INSTALL_TARGET?= install/strip . endif . endif diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index 1836f8972357..6d65fc2c22bc 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -90,13 +90,13 @@ GO_PKGNAME= ${PORTNAME} GO_TARGET?= ${GO_PKGNAME} GO_TESTTARGET?= ./... -. if !defined(PIE_UNSAFE) && defined(WITH_PIE) && ${ARCH} == amd64 +. if !defined(PIE_UNSAFE) && defined(_WITH_PIE) && ${ARCH} == amd64 GO_BUILDFLAGS+= -buildmode=pie . else GO_BUILDFLAGS+= -buildmode=exe . endif GO_BUILDFLAGS+= -v -trimpath -. if !defined(WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*) +. if !defined(_WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*) GO_BUILDFLAGS+= -ldflags=-s . endif GO_TESTFLAGS+= -v diff --git a/Mk/Uses/grantlee.mk b/Mk/Uses/grantlee.mk index f050981966f1..23ceb969743f 100644 --- a/Mk/Uses/grantlee.mk +++ b/Mk/Uses/grantlee.mk @@ -65,7 +65,7 @@ PLIST_SUB+= GRANTLEE_VERSION_FULL=${GRANTLEE_VERSION} \ # GrantleeMacros.cmake provides grantlee_adjust_plugin_name() which appends a # letter 'd' to the library name in Debug mode. Provide a PLIST_SUB which can be # appended in the plist. -. if defined(WITH_DEBUG) +. if defined(_WITH_DEBUG) PLIST_SUB+= GRANTLEE_DEBUG_SUFFIX=d . else PLIST_SUB+= GRANTLEE_DEBUG_SUFFIX="" diff --git a/Mk/Uses/meson.mk b/Mk/Uses/meson.mk index 571e8a990be0..c4c57af3fa18 100644 --- a/Mk/Uses/meson.mk +++ b/Mk/Uses/meson.mk @@ -51,9 +51,9 @@ CONFIGURE_ARGS+= -Db_colorout=never INSTALL_TARGET= install # should we have strip separate from WITH_DEBUG? -. if defined(WITH_DEBUG) +. if defined(_WITH_DEBUG) CONFIGURE_ARGS+= --buildtype debug -. elif defined(WITH_DEBUGINFO) +. elif defined(_WITH_DEBUGINFO) CONFIGURE_ARGS+= --buildtype debugoptimized . else CONFIGURE_ARGS+= --buildtype release \ diff --git a/Mk/Uses/php.mk b/Mk/Uses/php.mk index 6195ad71a71e..0192a4d73197 100644 --- a/Mk/Uses/php.mk +++ b/Mk/Uses/php.mk @@ -208,7 +208,7 @@ PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts . endif -. if defined(WITH_DEBUG) +. if defined(_WITH_DEBUG) PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug . endif PHP_SAPI?= "" diff --git a/Mk/Uses/qmake.mk b/Mk/Uses/qmake.mk index 926d98002b53..4090e1303419 100644 --- a/Mk/Uses/qmake.mk +++ b/Mk/Uses/qmake.mk @@ -16,7 +16,7 @@ # norecursive Don't pass -recursive argument to qmake binary # outsource Perform an out-of-source build # no_env Suppress modification of configure and make environment. -# no_configure Don't add the configure target -- this is implied by +# no_configure Don't add the configure target -- this is implied by # HAS_CONFIGURE=yes and GNU_CONFIGURE=yes # # @@ -75,7 +75,7 @@ QMAKE_ARGS+= -spec ${QMAKESPEC} \ QMAKE_CXXFLAGS_RELEASE="" \ PREFIX="${PREFIX}" -. if defined(WITH_DEBUG) +. if defined(_WITH_DEBUG) PLIST_SUB+= DEBUG="" QMAKE_ARGS+= CONFIG+="debug separate_debug_info" \ CONFIG-="release" @@ -83,7 +83,7 @@ QMAKE_ARGS+= CONFIG+="debug separate_debug_info" \ PLIST_SUB+= DEBUG="@comment " QMAKE_ARGS+= CONFIG+="release" \ CONFIG-="debug separate_debug_info" -. endif # defined(WITH_DEBUG) +. endif # defined(_WITH_DEBUG) # We set -recursive by default to keep qmake from running in the build stage. . if ! ${qmake_ARGS:Mnorecursive} diff --git a/Mk/Uses/qt-dist.mk b/Mk/Uses/qt-dist.mk index 9b0b4d5ee08e..5b434c1d21f9 100644 --- a/Mk/Uses/qt-dist.mk +++ b/Mk/Uses/qt-dist.mk @@ -239,7 +239,7 @@ CONFIGURE_ARGS+= -no-use-gold-linker CONFIGURE_ARGS+= -recheck-all . endif # ${_QT_VER:M5} -. if defined(WANT_QT_DEBUG) || defined(WITH_DEBUG) +. if defined(WANT_QT_DEBUG) || defined(_WITH_DEBUG) WITH_DEBUG= yes STRIP= # It's done prior to bsd.qt.mk inclusion. CONFIGURE_ARGS+= -debug -separate-debug-info @@ -250,7 +250,7 @@ QMAKE_ARGS+= QT_CONFIG+="debug separate_debug_info" \ CONFIGURE_ARGS+= -release -no-separate-debug-info QMAKE_ARGS+= QT_CONFIG+="release" \ QT_CONFIG-="debug separate_debug_info" -. endif # defined(WANT_QT_DEBUG) || defined(WITH_DEBUG) +. endif # defined(WANT_QT_DEBUG) || defined(_WITH_DEBUG) . if defined(WANT_QT_VERBOSE_CONFIGURE) CONFIGURE_ARGS+= -verbose @@ -302,7 +302,7 @@ QMAKE_ARGS+= QT_CONFIG-="${QT_CONFIG:M-*:O:u:C/^-//}" PLIST_SUB+= SHORTVER=${_QT_VERSION:R} \ FULLVER=${_QT_VERSION:C/-.*//} -. if defined(WITH_DEBUG) +. if defined(_WITH_DEBUG) PLIST_SUB+= DEBUG="" \ NO_DEBUG="@comment " . else