tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bmake: variable modifiers in SysV include


see below my original message to a FreeBSD mailing list, which I'm forwarding here sa per Simon's suggestion.

Anybody with historical memory on SysV-style "include" directive in bmake can shed a light on why an include is prevented if a colon is found in the parsed line?

Thank you,

----- Forwarded message from Pietro Cerutti <> -----

Date: Wed, 28 Mar 2018 11:58:25 +0000
From: Pietro Cerutti <>
Subject: bmake: variable modifiers in SysV include


our make (contrib/bmake) does not currently support variable modifiers in SysV-style "include" directives. See this simple example:


% cat Makefile
# Makefile


include $( # ===== THIS =====


FOO=    foo


BAR=    bar


      @echo ${FOO} ${BAR}

% make
make: "/usr/home/gahr/tmp/mk-sysv-include/Makefile" line 5: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/home/gahr/tmp/mk-sysv-include


This patch [1] corrects this problem, and results in the expected

% make
foo bar

Apart from parentheses reshuffling, the patch just removes a check that inhibits SysV inclusion if the line being parsed contains a colon (:) character.

This has been there since bmake has supported SysV includes [2].


1. Any ideas why the check is there, and what problem it's preventing?
2. Anybody with src bit would like to approve me committing the fix?



----- End forwarded message -----

Pietro Cerutti

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index