summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Hurlbut <ghurlbut@mythtv.org>2010-12-04 08:18:48 (GMT)
committer Gavin Hurlbut <ghurlbut@mythtv.org>2010-12-04 08:22:18 (GMT)
commitdc4868a1f149322deaa98a44ef8b1739400d49bf (patch)
tree6d5ce454cba30bb0a82df6628266ab89f1a81223
parent11ee9c52ab2d639fa316abd2a2b90bb84b722974 (diff)
Tweak PWD in the Makefile to be more specific
If the Makefile is started with "make -C mythtv" from a Makefile another level up, $PWD is still seeming to be set from the top level Makefile. This forces a reset of $PWD from the shell at this level, causing version.sh to put version.cpp in the correct place.
-rw-r--r--mythtv/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/mythtv/Makefile b/mythtv/Makefile
index 903def0..68e4fdb 100644
--- a/mythtv/Makefile
+++ b/mythtv/Makefile
@@ -26,6 +26,10 @@ all: version.cpp subdirs
config.mak:
$(error run configure to create $@)
+# Override PWD in case this is run from a makefile at a higher level with
+# make -C mythtv
+PWD := $(shell pwd)
+
version.cpp: libs/libmythdb/mythversion.h
sh version.sh $(PWD)