On Mon, Feb 16, 2009 at 11:50:43PM +0100, Nicholas Clark wrote: > In perl.git, the branch blead has been updated > > <http://perl5.git.perl.org/perl.git/commitdiff/a89d24b9fe54d44395806c16ac1c19f3c678cbbb?hp=1fa74d9f2486a5a4ae9109d21458f9b93dfec557> > > - Log ----------------------------------------------------------------- > commit a89d24b9fe54d44395806c16ac1c19f3c678cbbb > Author: Nicholas Clark <n...@ccl4.org> > Date: Mon Feb 16 22:47:54 2009 +0000 > > Ignore #defines in in patchlevel.h that end the line with backslash. > (Otherwise config.sh ends up with part of PERL_VERSION_STRING, and the > build > chokes to a stop.) > ----------------------------------------------------------------------- > > Summary of changes: > Configure | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/Configure b/Configure > index 47ca217..402ba33 100755 > --- a/Configure > +++ b/Configure > @@ -23167,7 +23167,7 @@ $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> > config.sh > > : add special variables > $test -f $src/patchlevel.h && \ > -awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h > >>config.sh > +awk '/^#define[ ]+PERL_.*[^\\]$/ {printf "%s=%s\n",$2,$3}' > $src/patchlevel.h >>config.sh
I'm not being helped by lies and inconsistencies in awk here. Solaris 9's manpage claims that awk uses the same regular expressions as egrep. Not true: $ awk '/^#define[ ]+PERL_.*[^\\]$/ {printf "%s=%s\n",$2,$3}' patchlevel.h PERL_REVISION=5 PERL_VERSION=11 PERL_SUBVERSION=0 PERL_VERSION_STRING=STRINGIFY(PERL_REVISION) PERL_API_REVISION=5 PERL_API_VERSION=11 PERL_API_SUBVERSION=0 $ egrep '^#define[ ]+PERL_.*[^\\]$' patchlevel.h #define PERL_REVISION 5 /* age */ #define PERL_VERSION 11 /* epoch */ #define PERL_SUBVERSION 0 /* generation */ #define PERL_API_REVISION 5 /* Adjust manually as needed. */ #define PERL_API_VERSION 11 /* Adjust manually as needed. */ #define PERL_API_SUBVERSION 0 /* Adjust manually as needed. */ nawk behaves the same as egrep. But awk is what we use... Nicholas Clark