diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-07-25 19:15:55 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-07-25 19:15:55 +0000 |
commit | 6618b03bfc62e0322a17b9760324899a6d1d73d1 (patch) | |
tree | 109332ea58aa5c9a84ed9dd9b7b494b2804a60ac /utils | |
parent | f9cbebe1529365fa24b4bfbacdcdacd498d1cc75 (diff) | |
parent | c0f8b9cdfbe91d09a84668a0f66d7bc8fc690dbf (diff) | |
download | perl-6618b03bfc62e0322a17b9760324899a6d1d73d1.tar.gz |
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@3749
Diffstat (limited to 'utils')
-rw-r--r-- | utils/h2xs.PL | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL index 710242aedb..5bd9b474de 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<h2xs> [B<-AOPXcdf>] [B<-v> version] [B<-n> module_name] [B<-p> prefix] [B<-s> sub] [headerfile ... [extra_libraries]] +B<h2xs> [B<-ACOPXcdf>] [B<-v> version] [B<-n> module_name] [B<-p> prefix] [B<-s> sub] [headerfile ... [extra_libraries]] B<h2xs> 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<C<use AutoLoader>> statement from the .pm file. +=item B<-C> + +Omits creation of the F<Changes> 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; @@ -519,11 +525,26 @@ END $author = "A. U. Thor"; $email = 'a.u.thor@a.galaxy.far.far.away'; +my $revhist = ''; +$revhist = <<EOT if $opt_C; + +=head1 HISTORY + +=over 8 + +=item $TEMPLATE_VERSION + +Original version; created by h2xs $H2XS_VERSION + +=back + +EOT + my $const_doc = ''; my $fdecl_doc = ''; if (@const_names and not $opt_P) { $const_doc = <<EOD; -\n=head1 Exported constants +\n=head2 Exported constants @{[join "\n ", @const_names]} @@ -531,7 +552,7 @@ EOD } if (defined $fdecls and @$fdecls and not $opt_P) { $fdecl_doc = <<EOD; -\n=head1 Exported functions +\n=head2 Exported functions @{[join "\n ", @$fdecls]} @@ -557,7 +578,7 @@ $pod = <<"END" unless $opt_P; #unedited. # #Blah blah blah. -#$const_doc$fdecl_doc +#$const_doc$fdecl_doc$revhist #=head1 AUTHOR # #$author, $email @@ -849,12 +870,14 @@ print "ok 1\n"; _END_ close(EX) || die "Can't close $ext$modpname/test.pl: $!\n"; -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"; +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: $!"; |