summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2009-01-04 19:12:53 +0100
committerYves Orton <demerphq@gmail.com>2009-01-04 23:32:40 +0100
commit12d7e04de30e7bc6b13a6f47e4ed1a1365267e6c (patch)
treec1bde96daa7551432e02fb1e1740609200bb31a6
parente9be352a567fab443a8c229b10a5050c9cf2d4cf (diff)
downloadperl-12d7e04de30e7bc6b13a6f47e4ed1a1365267e6c.tar.gz
this seems to work, still not using the perl version, but this works the way it would
-rw-r--r--Makefile.SH5
-rwxr-xr-xconfigpm7
-rw-r--r--make_patchnum.sh11
3 files changed, 14 insertions, 9 deletions
diff --git a/Makefile.SH b/Makefile.SH
index 9bf115c661..c6bebe0c5d 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -541,7 +541,8 @@ sperl.i: perl.c $(h)
.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
@@ -594,7 +595,7 @@ miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.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
diff --git a/configpm b/configpm
index af6f65a0c8..17f02c575c 100755
--- a/configpm
+++ b/configpm
@@ -548,8 +548,11 @@ foreach my $prefix (qw(libs libswanted)) {
$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;
diff --git a/make_patchnum.sh b/make_patchnum.sh
index e770f75e86..6c3ae65e9a 100644
--- a/make_patchnum.sh
+++ b/make_patchnum.sh
@@ -69,19 +69,19 @@ test -z "$commit_title" && commit_title='Commit id:'
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'
@@ -98,6 +98,7 @@ if [ "$new_config" != "$existing_config" ] || [ "$existing_header" != "$new_head
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