Hi Philip,
On Thu, 2007 Aug 09 16:33:00 +0100, Philip Hazel wrote:
>
> It seems to be working fine. I have a script that does the whole job for
> me - it calls the PrepareRelease[*] script that is in the SVN, then runs
> "make distcheck", then moves the tarballs to where I want them, and then
> calls gpg for me to sign them. I can't think of any way of making it any
> easier than that. :-)
There are some aspects of this that can stand improvement.
Right now, if you pull down a fresh SVN tree, autogen, configure, and then
run "make dist", you get
$ make dist
rm -f pcre.h.generic
cp -p pcre.h pcre.h.generic
make: *** No rule to make target `config.h.generic', needed by `distdir'. Stop.
config.h.generic is currently created by the PrepareRelease script (as a
lightly processed copy of config.h), but it should really be handled by a
makefile rule. The dist/distcheck targets should be usable without needing
to invoke a separate script.
I'm also not too keen on how PrepareRelease contains practically a second
copy of the list of files in the package, for the invocation of the Detrail
script. I've put together a first-draft "detrail" target for the makefile
that works similarly, but can take advantage of variables assigned
elsewhere in the file. If this seems like a reasonable proposition, both
Makefile.am and PrepareRelease will need more work; the bit I have here is
just to get the ball rolling.
I've attached a patch against SVN.
--Daniel
--
NAME = Daniel Richard G. ## Remember, skunks _\|/_ meef?
EMAIL1 = skunk@??? ## don't smell bad--- (/o|o\) /
EMAIL2 = skunk@??? ## it's the people who < (^),>
WWW = http://www.******.org/ ## annoy them that do! / \
--
(****** = site not yet online)
Index: PrepareRelease
===================================================================
--- PrepareRelease (revision 212)
+++ PrepareRelease (working copy)
@@ -183,34 +183,6 @@
echo Detrailing
./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
Index: Makefile.am
===================================================================
--- Makefile.am (revision 212)
+++ Makefile.am (working copy)
@@ -112,6 +112,9 @@
rm -f $@
cp -p pcre.h $@
+config.h.generic: config.h
+ perl -pe 'if(/^#define\s(?!PACKAGE)(\w+)/){print"#ifndef $$1\n$$_#endif\n";$$_="";}' config.h >$@
+
MAINTAINERCLEANFILES += pcre.h.generic
# These are the header files we'll install. We do not distribute pcre.h because
@@ -350,6 +353,15 @@
man_MANS = $(pcrecpp_man)
endif
+detrail:
+ $(srcdir)/Detrail \
+ $(dist_doc_DATA) \
+ $(dist_html_DATA) \
+ $(dist_noinst_DATA) \
+ $(srcdir)/*.h \
+ $(srcdir)/*.c \
+ $(srcdir)/*.cc
+
## CMake support
EXTRA_DIST += \