Also, make_patchnum had not been part of the prerequisites of the common
targets 'perl' or 'test', only 'all', so often it was not getting run. Add it
as a prerequisite of perl$(EXT_EXE), so that it is run on 'make perl' or
'make test'.
.PHONY: all translators utilities make_patchnum
-make_patchnum:
+make_patchnum: miniperl$(EXE_EXT)
$(LDLIBPTH) $(RUN) ./miniperl -Ilib make_patchnum.pl || $(MAKE) miniperl
git_version.h: stock_git_version.h
$spitshell >>$Makefile <<'!NO!SUBS!'
-perl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
+perl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) make_patchnum
-@rm -f miniperl.xok
$(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX) $(PERL_PROFILE_LDFLAGS) $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)