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

login
register
mail settings
Submitter Augie Fackler
Date April 21, 2016, 2:16 p.m.
Message ID <c37d891e3cb4f4501e65.1461248203@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/14762/
State Changes Requested
Headers show

Comments

Augie Fackler - April 21, 2016, 2:16 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 c37d891e3cb4f4501e65a061633871f7d27cd87f
# Parent  c5e702fe862a157067f38824ce717ed603ee318b
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.

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')