Makefile: fix build if CDPATH is set in environment
authorPeter Korsgaard <jacmet@sunsite.dk>
Sun, 13 Dec 2009 21:58:49 +0000 (22:58 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 13 Dec 2009 21:58:49 +0000 (22:58 +0100)
commitf7a501e13ccf76814743ea7a5b46606762505c34
tree22843af7c2122c7f2991021a421bff0d88f1f261
parent617aa4995a2ea97e9663cac26744d67ea726745a
Makefile: fix build if CDPATH is set in environment

Reported by Bjørn Forsman <bjorn.forsman@gmail.com>.

If CDPATH is set in the environment, cd <dir> will print the absolute path
of <dir>, causing various trouble (The most critical being BASE_DIR ending
up as <path> <path> which breaks basically everything).

Fix it by clearing CDPATH. Notice that export doesn't affect the environment
of $(shell ..) calls, so explicitly throw away any output from cd in the
BASE_DIR shell call.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Makefile