Patchwork [3,of,3,bsdmake,stable?] Makefile: use shell-command assignment instead of $(eval ...)

login
register
mail settings
Submitter Augie Fackler
Date April 21, 2016, 3:30 p.m.
Message ID <9471e80ea13cefc02a45.1461252606@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/14765/
State Accepted
Headers show

Comments

Augie Fackler - April 21, 2016, 3:30 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1461247880 14400
#      Thu Apr 21 10:11:20 2016 -0400
# Branch stable
# Node ID 9471e80ea13cefc02a4567a26d17914c8d7237b6
# Parent  d798163ea54318407c4a86ae65ec94774a19eb0a
Makefile: use shell-command assignment instead of $(eval ...)

This is portable between BSD and GNU make.

As of this change, our Makefile appears to work in both BSD and GNU
make, with the caveat that the test-% and testpy-% wildcard rules
don't work on BSD make. That said, this still seems worthwhile because
it lets the buildbots work more consistently across platforms.
Sean Farley - April 21, 2016, 8:29 p.m.
Augie Fackler <raf@durin42.com> writes:

> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1461247880 14400
> #      Thu Apr 21 10:11:20 2016 -0400
> # Branch stable
> # Node ID 9471e80ea13cefc02a4567a26d17914c8d7237b6
> # Parent  d798163ea54318407c4a86ae65ec94774a19eb0a
> Makefile: use shell-command assignment instead of $(eval ...)
>
> This is portable between BSD and GNU make.
>
> As of this change, our Makefile appears to work in both BSD and GNU
> make, with the caveat that the test-% and testpy-% wildcard rules
> don't work on BSD make. That said, this still seems worthwhile because
> it lets the buildbots work more consistently across platforms.

I would lean towards applying this so our CI builds will work with 3.8
but I defer to The Old Ones.
Matt Mackall - April 23, 2016, 3:47 p.m.
On Thu, 2016-04-21 at 11:30 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1461247880 14400
> #      Thu Apr 21 10:11:20 2016 -0400
> # Branch stable
> # Node ID 9471e80ea13cefc02a4567a26d17914c8d7237b6
> # Parent  d798163ea54318407c4a86ae65ec94774a19eb0a
> Makefile: use shell-command assignment instead of $(eval ...)

These are queued for stable, thanks.

-- 
Mathematics is the supreme nostalgia of our time.

Patch

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ 
 
 export PREFIX=/usr/local
 PYTHON=python
-$(eval HGROOT := $(shell pwd))
+HGROOT != pwd
 HGPYTHONS ?= $(HGROOT)/build/pythons
 PURE=
 PYFILES:=$(shell find mercurial hgext doc -name '*.py')