From: Gurusamy Sarathy Date: Sun, 25 Jul 1999 18:08:58 +0000 (+0000) Subject: add option to omit Changes file, from Abigail ; X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c0f8b9cdfbe91d09a84668a0f66d7bc8fc690dbf;p=p5sagit%2Fp5-mst-13.2.git add option to omit Changes file, from Abigail ; append a HISTORY section to POD if option is used p4raw-id: //depot/perl@3746 --- diff --git a/utils/h2xs.PL b/utils/h2xs.PL index 3650512..992af47 100644 --- a/utils/h2xs.PL +++ b/utils/h2xs.PL @@ -41,7 +41,7 @@ h2xs - convert .h C header files to Perl extensions =head1 SYNOPSIS -B [B<-AOPXcdf>] [B<-v> version] [B<-n> module_name] [B<-p> prefix] [B<-s> sub] [headerfile ... [extra_libraries]] +B [B<-ACOPXcdf>] [B<-v> version] [B<-n> module_name] [B<-p> prefix] [B<-s> sub] [headerfile ... [extra_libraries]] B B<-h> @@ -73,6 +73,11 @@ in the extra-libraries argument. Omit all autoload facilities. This is the same as B<-c> but also removes the S> statement from the .pm file. +=item B<-C> + +Omits creation of the F file, and adds a HISTORY section to +the POD template. + =item B<-F> Additional flags to specify to C preprocessor when scanning header for @@ -218,9 +223,10 @@ use Getopt::Std; sub usage{ warn "@_\n" if @_; - die "h2xs [-AOPXcdfh] [-v version] [-n module_name] [-p prefix] [-s subs] [headerfile [extra_libraries]] + die "h2xs [-ACOPXcdfh] [-v version] [-n module_name] [-p prefix] [-s subs] [headerfile [extra_libraries]] version: $H2XS_VERSION -A Omit all autoloading facilities (implies -c). + -C Omit creating the Changes file, add HISTORY heading to stub POD. -F Additional flags for C preprocessor (used with -x). -O Allow overwriting of a pre-existing extension directory. -P Omit the stub POD section. @@ -241,7 +247,7 @@ extra_libraries } -getopts("AF:OPXcdfhn:p:s:v:x") || usage; +getopts("ACF:OPXcdfhn:p:s:v:x") || usage; usage if $opt_h; @@ -518,11 +524,26 @@ END $author = "A. U. Thor"; $email = 'a.u.thor@a.galaxy.far.far.away'; +my $revhist = ''; +$revhist = <Changes") || die "Can't create $ext$modpname/Changes: $!\n"; -print EX "Revision history for Perl extension $module.\n\n"; -print EX "$TEMPLATE_VERSION ",scalar localtime,"\n"; -print EX "\t- original version; created by h2xs $H2XS_VERSION\n\n"; -close(EX) || die "Can't close $ext$modpname/Changes: $!\n"; +unless ($opt_C) { + warn "Writing $ext$modpname/Changes\n"; + open(EX, ">Changes") || die "Can't create $ext$modpname/Changes: $!\n"; + print EX "Revision history for Perl extension $module.\n\n"; + print EX "$TEMPLATE_VERSION ",scalar localtime,"\n"; + print EX "\t- original version; created by h2xs $H2XS_VERSION\n\n"; + close(EX) || die "Can't close $ext$modpname/Changes: $!\n"; +} warn "Writing $ext$modpname/MANIFEST\n"; open(MANI,'>MANIFEST') or die "Can't create MANIFEST: $!";