-del /f config.h
copy $(CFGH_TMPL) config.h
-make_patchnum : $(MINIPERL)
+..\git_version.h : $(MINIPERL) make_patchnum.pl
cd ..
miniperl -Ilib make_patchnum.pl
cd win32
-..\git_version.h : ..\stock_git_version.h
- -del /f ..\git_version.h
- copy ..\stock_git_version.h ..\git_version.h
+# make sure that we recompile perl.c if the git version changes
+..\perl$(o) : ..\git_version.h
..\config.sh : config.w32 $(MINIPERL) config_sh.PL
$(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
# 1. we don't want to rebuild miniperl.exe when config.h changes
# 2. we don't want to rebuild miniperl.exe with non-default config.h
+# 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
$(MINI_OBJ) : $(CORE_NOCFG_H)
$(WIN32_OBJ) : $(CORE_H)
perlmainst$(o) : perlmainst.c
$(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
-$(PERLEXE): make_patchnum $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
+$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
$(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
$(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
$(EMBED_EXE_MANI)
copy splittree.pl ..
$(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
-$(PERLEXESTATIC): make_patchnum $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
+$(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
$(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
@Extensions_static $(PERLSTATICLIB) /PDB:NONE \
$(LIBFILES) $(PERLEXEST_OBJ) $(SETARGV_OBJ) $(PERLEXE_RES)
-del /f config.h
copy $(CFGH_TMPL) config.h
-make_patchnum : $(MINIPERL)
+..\git_version.h : $(MINIPERL) make_patchnum.pl
cd .. && miniperl -Ilib make_patchnum.pl
-..\git_version.h : ..\stock_git_version.h
- -del /f ..\git_version.h
- copy ..\stock_git_version.h ..\git_version.h
+# make sure that we recompile perl.c if the git version changes
+..\perl$(o) : ..\git_version.h
..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
$(MINIPERL) -I..\lib config_sh.PL --cfgsh-option-file \
# 1. we don't want to rebuild miniperl.exe when config.h changes
# 2. we don't want to rebuild miniperl.exe with non-default config.h
+# 3. we can't have miniperl.exe depend on git_version.h, as miniperl creates it
$(MINI_OBJ) : $(CORE_NOCFG_H)
$(WIN32_OBJ) : $(CORE_H)
perlmainst$(o) : perlmainst.c
$(CC) $(CFLAGS_O) $(OBJOUT_FLAG)$@ -c perlmainst.c
-$(PERLEXE): make_patchnum $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
+$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
.IF "$(CCTYPE)" == "BORLAND"
$(LINK32) -Tpe -ap $(BLINK_FLAGS) \
@$(mktmp c0x32$(o) $(PERLEXE_OBJ),$@,, \
copy splittree.pl ..
$(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
-$(PERLEXESTATIC): make_patchnum $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
+$(PERLEXESTATIC): $(PERLSTATICLIB) $(CONFIGPM) $(PERLEXEST_OBJ) $(PERLEXE_RES)
.IF "$(CCTYPE)" == "BORLAND"
$(LINK32) -Tpe -ap $(BLINK_FLAGS) \
@$(mktmp c0x32$(o) $(PERLEXEST_OBJ),$@,, \