Date: Wed, 28 Mar 2018 11:58:25 +0000 From: Pietro Cerutti <gahr@FreeBSD.org> To: freebsd-hackers@FreeBSD.org, sjg@FreeBSD.org Subject: bmake: variable modifiers in SysV include Message-ID: <20180328115825.ydfnbly6hpsvbo3h@ptrcrt.ch>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Hi,
our make (contrib/bmake) does not currently support variable modifiers
in SysV-style "include" directives. See this simple example:
==============================================================================
% cat Makefile Makefile1.inc Makefile2.inc Makefile3.inc
# Makefile
SUB= Makefile2.foo Makefile3.foo
include Makefile1.inc $(SUB:.foo=.inc) # ===== THIS =====
# Makefile1.inc
FOO= foo
# Makefile2.inc
BAR= bar
# Makefile3.inc
all:
@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].
Questions:
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?
Thanks!
[1] https://people.freebsd.org/~gahr/bmake-inc-subst.diff
[2] http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/make/parse.c.diff?r1=1.4&r2=1.5
--
Pietro Cerutti
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
iQJiBAABCgBMFiEE2m3hBqW4VLhd2G1JrdDTjqGSCJ4FAlq7g10uFIAAAAAAFQAQ
cGthLWFkZHJlc3NAZ251cGcub3JnZ2FockBGcmVlQlNELm9yZwAKCRCt0NOOoZII
nlhUD/oCgLjHensB56uaTPF2500pOVg8UzybdrbjgWhSvnEAqzipLc3XqrtTqOXa
BFYwGKSjnJGRT13t0Jl0cd+tRJfQZ/ar+VonUUYbm0RW7eJGM7kW1QDg8aoR9Tup
lIEtYukWGT4jED/pVj7mHeuPaYh9BtPNaNNTzQZWP+gY4BEohPkl0fMtGHBmNwYE
yNUbwF297iRdGPfwBFFCH77t4jWHb9u+wS5MeiUffVw6ITz/wUiE2Qgb3fha85w3
Z8HtxjL5Ju+bTCk8TTsxywuGdAKfCKB5qRNXZQYkYv7bLMWy9RRqYRc5KZTWU3TA
rXQAnihodTmgoeHRkmQDIHc9+k4dEz5qze4m2fE44q7fMNSTux7TYRAJ0QOXQKhR
GCOF6kEvQk3I/lf9v/gM6CE82InfN1QDinKwnnzus+JE3fwXi6qC80kkuU7yESza
JCiOHzOQbafGqtQ1AOeXMsK0VfNTYVS0GabKLkqF1912Kumpmj6H/8ItQKFvXVOp
zJoyPOHXyGcFySizXrZsPQ/zEq6PdckBk442AHM3nOh9EvVAKG12T3aaDcJJ6uxK
OBcnJkA0rCn5M5O7BQfnTtFCEAOTEfx8babC7axAAx6on0ajN8oaJ14XFegHnmZW
AHOLbo70Y6Bt5bJ/7ztMUoWaJrRflJcA6eNx2OGVWQvjDtox8Q==
=yFxA
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180328115825.ydfnbly6hpsvbo3h>
