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>
next in thread | raw e-mail | index | archive | help
--dm6dm3xo5ccsc5bo Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, our make (contrib/bmake) does not currently support variable modifiers=20 in SysV-style "include" directives. See this simple example: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D % cat Makefile Makefile1.inc Makefile2.inc Makefile3.inc # Makefile SUB=3D Makefile2.foo Makefile3.foo include Makefile1.inc $(SUB:.foo=3D.inc) # =3D=3D=3D=3D=3D THIS =3D=3D=3D= =3D=3D # Makefile1.inc FOO=3D foo # Makefile2.inc BAR=3D 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D 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=20 inhibits SysV inclusion if the line being parsed contains a colon (:)=20 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=3D= 1.4&r2=3D1.5 --=20 Pietro Cerutti --dm6dm3xo5ccsc5bo Content-Type: application/pgp-signature; name="signature.asc" -----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----- --dm6dm3xo5ccsc5bo--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180328115825.ydfnbly6hpsvbo3h>