Revision: 1172
http://vcs.pcre.org/viewvc?view=rev&revision=1172
Author: ph10
Date: 2012-10-24 17:41:07 +0100 (Wed, 24 Oct 2012)
Log Message:
-----------
Create the *.generic files using "make" instead of PrepareRelease.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/Makefile.am
code/trunk/PrepareRelease
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2012-10-24 15:22:42 UTC (rev 1171)
+++ code/trunk/ChangeLog 2012-10-24 16:41:07 UTC (rev 1172)
@@ -124,6 +124,10 @@
25. Major JIT compiler update (code refactoring and bugfixing).
Experimental Sparc 32 support is added.
+
+26. Applied a modified version of Daniel Richard G's patch to create
+ pcre.h.generic and config.h.generic by "make" instead of in the
+ PrepareRelease script.
Version 8.31 06-July-2012
Modified: code/trunk/Makefile.am
===================================================================
--- code/trunk/Makefile.am 2012-10-24 15:22:42 UTC (rev 1171)
+++ code/trunk/Makefile.am 2012-10-24 16:41:07 UTC (rev 1172)
@@ -132,12 +132,28 @@
pcre.h.generic \
config.h.generic
-pcre.h.generic: configure.ac
+# The only difference between pcre.h.in and pcre.h is the setting of the PCRE
+# version number. Therefore, we can create the generic version just by copying.
+pcre.h.generic: pcre.h.in configure.ac
rm -f $@
cp -p pcre.h $@
-MAINTAINERCLEANFILES += pcre.h.generic
+# It is more complicated for config.h.generic. We need the version that results
+# from a default configuration. We can get this by doing a configure in a
+# temporary directory. It has to be entirely done using files in that
+# directory, because the source directory may already be configured. If you
+# just try running configure in a new directory, it complains that the source
+# directory is already configured.
+config.h.generic: configure.ac
+ rm -rf $@ _generic
+ mkdir _generic
+ cp configure *.in _generic
+ (cd _generic; ./configure srcdir=.)
+ perl -pe 'if(/^#define\s(?!PACKAGE)(\w+)/){print"#ifndef $$1\n$$_#endif\n";$$_="";}' _generic/config.h >$@
+ rm -rf _generic
+MAINTAINERCLEANFILES += pcre.h.generic config.h.generic
+
# These are the header files we'll install. We do not distribute pcre.h because
# it is generated from pcre.h.in.
nodist_include_HEADERS = \
Modified: code/trunk/PrepareRelease
===================================================================
--- code/trunk/PrepareRelease 2012-10-24 15:22:42 UTC (rev 1171)
+++ code/trunk/PrepareRelease 2012-10-24 16:41:07 UTC (rev 1172)
@@ -248,34 +248,6 @@
echo Detrailing
perl ./Detrail $files doc/p* doc/html/*
-echo Doing basic configure to get default pcre.h and config.h
-# This is in case the caller has set aliases (as I do - PH)
-unset cp ls mv rm
-./configure >/dev/null
-
-echo Converting pcre.h and config.h to generic forms
-cp -f pcre.h pcre.h.generic
-
-perl <<'END'
- open(IN, "<config.h") || die "Can't open config.h: $!\n";
- open(OUT, ">config.h.generic") || die "Can't open config.h.generic: $!\n";
- while (<IN>)
- {
- if (/^#define\s(?!PACKAGE)(\w+)/)
- {
- print OUT "#ifndef $1\n";
- print OUT;
- print OUT "#endif\n";
- }
- else
- {
- print OUT;
- }
- }
- close IN;
- close OUT;
-END
-
echo Done
#End