I added some neat stuff to my make dist target, thought I'd share. In
addition to generating the tarball, make dist will:
-Redirect rcs2log to a file and then open up my module in an
editor so that I can update the HISTORY section in the POD.
-Update $VERSION in all .pm files.
-Commit the updated PMs to CVS.
-Do a cvs rtag with RELEASE_X_YY (where X.YY is my new version)
-Update an HTML copy of the documentation that I keep on my
website by running pod2html
-Update the README by running pod2text
Here's what you need to do.
In WriteMakefile, add:
'dist' => { DIST_DEFAULT => 'predist tardist' },
Then add the following (my module is Net::OSCAR, the main file of
which is OSCAR.pm - modify accordingly):
sub MY::postamble {
<<EOF;
ifdef OSCARVER
VERSION = $(OSCARVER)
VERSION_SYM = $(OSCARVER)
XS_VERSION = $(OSCARVER)
CVS_TAG = RELEASE_\$(substr .,_,\$OSCARVER))
predist:
\@rcs2log -R > ~/tmp/rcslog
\@pico OSCAR.pm
\@find -name \\*.pm -exec perl -npi -e "s/VERSION = \
.*/VERSION = \$(OSCARVER);/" \\{\\} \\;
\@cvs commit -m "Changed version number for release \
\$(OSCARVER)"
\@cvs rtag -R \$(CVS_TAG) net-oscar
\@pod2html OSCAR.pm > \
/home/webstuff/programs/net-oscar/net-oscar.html
\@pod2text OSCAR.pm > README
else
predist:
\@echo "You must define OSCARVER!"
\@false
endif
EOF
}
Then do something like OSCARVER=0.07 make dist
--
Matthew Sachs, the original nonstandard deviant
[EMAIL PROTECTED] http://www.zevils.com/
GPG key: 0x600A0342 PGP key: 0x93EA1151