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

Augie Fackler raf at durin42.com
Thu Apr 21 11:30:06 EDT 2016


# HG changeset patch
# User Augie Fackler <augie at 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.

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


More information about the Mercurial-devel mailing list