#!/bin/sh
Existing=`cat .patchnum 2>/dev/null`
+Existing_Sha1=`cat .sha1 2>/dev/null`
if [ -e ".patch" ]; then
Current=`awk '{print $4}' .patch`
+ Sha1=`awk '{print $3}' .patch`
elif [ -d ".git" ]; then
# we should do something better here
Current=`git describe`
+ Sha1=`git rev-parse HEAD`
Changed=`git diff-index --name-only HEAD`
[ -n "$Changed" ] && Current="$Current-with-uncommitted-changes"
fi
-if [ "$Existing" != "$Current" ]; then
- echo "Updating .patchnum"
+if [ "$Existing" != "$Current" -o "$Existing_Sha1" != "$Sha1" ]; then
+ echo "Updating .patchnum and .sha1"
echo -n $Current > .patchnum
+ echo -n $Sha1 > .sha1
else
- echo "Reusing .patchnum"
+ echo "Reusing .patchnum and .sha1"
fi
#else
sv_catpvs(opts_prog,"\"\\nCharacteristics of this binary (from libperl): \\n");
#endif
-#ifdef PERL_PATCHNUM
- sv_catpvs(opts_prog, " Git Description: " STRINGIFY(PERL_PATCHNUM) "\\n");
-#endif
+ sv_catpvs(opts_prog," Source revision: " STRINGIFY(PERL_GIT_SHA1) "\\n");
sv_catpvs(opts_prog," Compile-time options: $_\\n\",");
#if defined(LOCAL_PATCH_COUNT)
"\" Locally applied patches:\\n\",");
for (i = 1; i <= LOCAL_PATCH_COUNT; i++) {
if (PL_localpatches[i])
- Perl_sv_catpvf(aTHX_ opts_prog,"q%c\t%s\n%c,",
+#ifdef X_PERL_PATCHNUM
+ if (strEQ(PL_localpatches[i],"DEVEL"))
+ Perl_sv_catpvf(aTHX_ opts_prog,"q%c\t%s\n%c,",
+ 0, STRINGIFY(PERL_PATCHNUM), 0);
+ else
+#endif
+ Perl_sv_catpvf(aTHX_ opts_prog,"q%c\t%s\n%c,",
0, PL_localpatches[i], 0);
}
}
Perl_form(aTHX_ " OS Specific Release: %s\n",
OSVERS));
#endif /* !DGUX */
-#ifdef PERL_PATCHNUM
- PerlIO_printf(PerlIO_stdout(), "\nGit Description: %s", STRINGIFY(PERL_PATCHNUM));
+#if defined PERL_PATCHNUM
+ PerlIO_printf(PerlIO_stdout(),"\nCompiled from: %s",STRINGIFY(PERL_PATCHNUM));
#endif
-
#if defined(LOCAL_PATCH_COUNT)
if (LOCAL_PATCH_COUNT > 0)
PerlIO_printf(PerlIO_stdout(),