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

Augie Fackler raf at durin42.com
Thu Apr 21 10:16:43 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 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.

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