Make the makefile pass $MAJORVERSION to genbki.pl, not $VERSION which is
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 6 Jan 2010 19:56:29 +0000 (19:56 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 6 Jan 2010 19:56:29 +0000 (19:56 +0000)
overridden in the snapshot build script.  $MAJORVERSION is what it really
wanted anyway, so we can tighten up the parsing of --set-version's argument.

src/backend/catalog/Makefile
src/backend/catalog/genbki.pl

index a45a46b1d4f9d85d07fcc3d26200b3dc076648c4..197e90e457f3aa27ca74e23c0227b31466946995 100644 (file)
@@ -55,7 +55,7 @@ postgres.shdescription: postgres.bki ;
 schemapg.h: postgres.bki ;
 
 postgres.bki: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS)
-   $(PERL) -I $(catalogdir) $< $(pg_includes) --set-version=$(VERSION) $(POSTGRES_BKI_SRCS)
+   $(PERL) -I $(catalogdir) $< $(pg_includes) --set-version=$(MAJORVERSION) $(POSTGRES_BKI_SRCS)
 
 .PHONY: install-data
 install-data: $(BKIFILES) installdirs
index edd3aee5072d91b2517c40d40d5890bb5e252f2c..fa0de6070e6a2e095bae2aff53e3058b2549e965 100644 (file)
@@ -40,7 +40,7 @@ while (@ARGV)
     {
         push @include_path, length($arg) > 2 ? substr($arg, 2) : shift @ARGV;
     }
-    elsif ($arg =~ /^--set-version=(\d+\.\d+).*$/)
+    elsif ($arg =~ /^--set-version=(\d+\.\d+)$/)
     {
         $major_version = $1;
     }