Created attachment 177115 [details] error into expression I corrected the evaluation of the expression in a variable CPPFLAGS. And added a dummy variable for portlint.
Created attachment 177116 [details] portlint log
Created attachment 177117 [details] build log
Thanks for the patch. Please confirm these changes pass QA (portlint, poudriere).
Ah, you did attach the logs, my bad. A verbal confirmation that it builds with poudriere in different FreeBSD versions should suffice.
(In reply to Vladimir Krstulja from comment #4) Hello. I'm sorry . I don't have computer with the poudriere.
Can you just clarify what was wrong with the CPPFLAGS expression before? Without the patch -DHAVE_STRCHRNUL=1 seems to be passed correctly depending on the FreeBSD version being used.
(In reply to Raphael Kubo da Costa from comment #6) Hello. Yes, It's easy. You may use next Makefile for check. You should execute him on system with support "Variable modifiers :?" (make on FreeBSD 10 and later) and without him (before 10). And see a result. # --- Makefile --- .if defined(q) .warning Test: variable "q" is exist and = ${q} .else .warning Test: variable "q" does not exist .endif reply=${ ${q}<50 :? "It work and <50 (true)" : "It work and >=50 (false)" } .if empty(reply) .warning expression: ":?" not supported .else .warning expression: ${reply} .endif .warning bmake have version ${MAKE_VERSION} all: @echo ${.TARGET} reply=${reply} # --- Makefile ---
Right, so it's a matter of fmake from FreeBSD 9 not supporting that construct (even though the end result is still the desired one). Thanks for the explanation.
A commit references this bug: Author: rakuco Date: Sun Dec 25 17:17:36 UTC 2016 New revision: 429442 URL: https://svnweb.freebsd.org/changeset/ports/429442 Log: Improve the way CFLAGS and CPPFLAGS are set. ":?" is not supported by fmake from FreeBSD 9, so replace it with an explicit version check. The end result was still the desired one (-DHAVE_STRCHRNUL=1 was not passed on FreeBSD 9). While here, also improve the version check by including DragonFly (which supports strchrnul(3) according to its online man page) and restricting the FreeBSD version check to the revision range after strchrnul(3) was added to base. Also stop passing -Os when building in debug mode, and set UNICODE61_CPPFLAGS to pet portlint. PR: 214608 Submitted by: Pavel Volkov <pavelivolkov@gmail.com> (maintainer) MFH: 2016Q4 Changes: head/databases/sqlite3/Makefile
Committed, thanks!
A commit references this bug: Author: rakuco Date: Mon Dec 26 10:04:31 UTC 2016 New revision: 429489 URL: https://svnweb.freebsd.org/changeset/ports/429489 Log: MFH: r429442 Improve the way CFLAGS and CPPFLAGS are set. ":?" is not supported by fmake from FreeBSD 9, so replace it with an explicit version check. The end result was still the desired one (-DHAVE_STRCHRNUL=1 was not passed on FreeBSD 9). While here, also improve the version check by including DragonFly (which supports strchrnul(3) according to its online man page) and restricting the FreeBSD version check to the revision range after strchrnul(3) was added to base. Also stop passing -Os when building in debug mode, and set UNICODE61_CPPFLAGS to pet portlint. PR: 214608 Submitted by: Pavel Volkov <pavelivolkov@gmail.com> (maintainer) Approved by: ports-secteam (junovitch) Changes: _U branches/2016Q4/ branches/2016Q4/databases/sqlite3/Makefile