From owner-freebsd-hackers@freebsd.org Wed Mar 28 11:58:28 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89A44F531C5 for ; Wed, 28 Mar 2018 11:58:28 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from mail.ptrcrt.ch (ptrcrt.ch [IPv6:2a02:2770:8:0:21a:4aff:fe7e:c6be]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED01E84F68; Wed, 28 Mar 2018 11:58:27 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from mail.ptrcrt.ch (mail.ptrcrt.ch [192.168.1.1]) by mail.ptrcrt.ch (OpenSMTPD) with ESMTP id 52225eb3; Wed, 28 Mar 2018 11:58:26 +0000 (UTC) Received: from ptrcrt.ch (mail.ptrcrt.ch [192.168.1.1]) by mail.ptrcrt.ch (OpenSMTPD) with ESMTPS id 016ffa5c TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Wed, 28 Mar 2018 11:58:25 +0000 (UTC) Date: Wed, 28 Mar 2018 11:58:25 +0000 From: Pietro Cerutti To: freebsd-hackers@FreeBSD.org, sjg@FreeBSD.org Subject: bmake: variable modifiers in SysV include Message-ID: <20180328115825.ydfnbly6hpsvbo3h@ptrcrt.ch> Reply-To: Pietro Cerutti MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dm6dm3xo5ccsc5bo" Content-Disposition: inline X-PGP-Key: fp="DA6D E106 A5B8 54B8 5DD8 6D49 ADD0 D38E A192 089E"; id="0xA192089E"; get=; get=; get=; get= OpenPGP: id=A192089E; url=https://gahr.ch/pgp/0xADD0D38EA192089E.txt; url=https://keybase.io/gahr/key.asc User-Agent: NeoMutt/20180323-25-688f04 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2018 11:58:28 -0000 --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--