From: Johannes Schindelin Date: Tue, 26 Sep 2006 08:34:19 GMT Subject: Re: [PATCH] perl bindings fix compilation errors Message-ID: In-Reply-To: <7vfyeftehf.fsf@assigned-by-dhcp.cox.net> Hi, On Mon, 25 Sep 2006, Junio C Hamano wrote: > It is certainly incorrect to say that it is a driver error to > git-pull (or git-checkout to switch branches) without running > "make clean" first to get rid of perl/Git.c while your Makefile > still knows it is a generated file. Our Makefile should be more > helpful. How about this: diff --git a/Makefile b/Makefile index d3310ae..a722c5a 100644 --- a/Makefile +++ b/Makefile @@ -612,7 +612,14 @@ ### Build rules all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi \ git-merge-recur$X -all: perl/Makefile +# work around for left-over files +.PHONY: perl/check-left-over + +perl/check-left-over: + (test -f perl/Git.c && test ! -f perl/Git.xs \ + && rm perl/{Git.c,Git.bs,Makefile}) || true + +all: perl/check-left-over perl/Makefile $(MAKE) -C perl $(MAKE) -C templates