.PHONY: all translators utilities make_patchnum
make_patchnum:
- sh $(shellflags) make_patchnum.sh
+ sh $(shellflags) make_patchnum.sh || $(MAKE) miniperl
+
git_version.h: stock_git_version.h
cp stock_git_version.h git_version.h
perlmain.c: miniperlmain.c config.sh $(FIRSTMAKEFILE)
sh writemain $(DYNALOADER) $(static_ext) > perlmain.c
-perlmain$(OBJ_EXT): perlmain.c
+perlmain$(OBJ_EXT): perlmain.c git_version.h
$(CCCMD) $(PLDLFLAGS) $*.c
# The file ext.libs is a list of libraries that must be linked in
$heavy_txt .= "EOVIRTUAL\n";
$heavy_txt .= <<'ENDOFGIT';
-require 'Config_git.pl';
-$Config_SH_expanded .= $Config::Git_Data;
+eval {
+ # do not have hairy conniptions if this isnt available
+ require 'Config_git.pl';
+ $Config_SH_expanded .= $Config::Git_Data;
+};
ENDOFGIT
$heavy_txt .= $fetch_string;
new_header=`cat <<EOFTEXT
/***************************************************************************
-* WARNING: $header_file is automatically generated by make_patchnum.sh
-* DO NOT EDIT DIRECTLY - edit make_patchnum.sh instead
+* WARNING: $header_file is automatically generated by make_patchnum.sh
+* DO NOT EDIT DIRECTLY - edit make_patchnum.sh instead
****************************************************************************/
#define PERL_PATCHNUM $describe
$status
-#define PERL_GIT_UNPUSHED_COMMITS $unpushed_commits
+#define PERL_GIT_UNPUSHED_COMMITS $unpushed_commits
/*leave-this-comment*/
EOFTEXT
`
new_config=`cat <<EOFDATA
#######################################################################
-# WARNING: $config_file is generated by make_patchnum.sh
-# DO NOT EDIT DIRECTLY - edit make_patchnum.sh instead
+# WARNING: $config_file is generated by make_patchnum.sh
+# DO NOT EDIT DIRECTLY - edit make_patchnum.sh instead
#######################################################################
\\$Config::Git_Data=<<'ENDOFGIT';
git_commit_id='$commit_id'
echo "Updating $header_file and $config_file"
echo "$new_config" > $config_file
echo "$new_header" > $header_file
+ exit 1
else
echo "Reusing $header_file and $config_file"
fi