Avoid a possible race condition where a parallel make might
Andy Dougherty [Tue, 5 Jan 2010 16:28:39 +0000 (11:28 -0500)]
attempt to update git_version.h and lib/Config_git.pl in
concurrent processes.

Makefile.SH

index 1a22205..97df05a 100644 (file)
@@ -559,7 +559,11 @@ all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) miniperl $(generated_pods) $(private) $(un
 
 .PHONY: all translators utilities
 
-lib/Config_git.pl git_version.h: $(MINIPERL_EXE) make_patchnum.pl
+# Both git_version.h and lib/Config_git.pl are built
+# by make_patchnum.pl.
+git_version.h: lib/Config_git.pl
+
+lib/Config_git.pl: $(MINIPERL_EXE) make_patchnum.pl
        $(MINIPERL) make_patchnum.pl
 
 # make sure that we recompile perl.c if the git version changes