summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--po-docs/ja/Makefile.am23
-rw-r--r--po-docs/uk/Makefile.am23
-rwxr-xr-xpodwrapper.pl.in43
3 files changed, 68 insertions, 21 deletions
diff --git a/po-docs/ja/Makefile.am b/po-docs/ja/Makefile.am
index 2e99b022..7bd9a0a3 100644
--- a/po-docs/ja/Makefile.am
+++ b/po-docs/ja/Makefile.am
@@ -58,8 +58,10 @@ all-local: $(MANPAGES)
guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod
$(PODWRAPPER) \
- --section 3 \
+ --no-strict-checks \
--man $@ \
+ --section 3 \
+ --license LGPLv2+ \
--insert $(srcdir)/guestfs-actions.pod:@ACTIONS@ \
--insert $(srcdir)/guestfs-availability.pod:@AVAILABILITY@ \
--insert $(srcdir)/guestfs-structs.pod:@STRUCTS@ \
@@ -67,16 +69,31 @@ guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-stru
guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod
$(PODWRAPPER) \
+ --no-strict-checks \
--man $@ \
+ --license GPLv2+ \
--insert $(srcdir)/guestfish-actions.pod:@ACTIONS@ \
--insert $(srcdir)/guestfish-commands.pod:@FISH_COMMANDS@ \
$<
%.1: %.pod
- $(PODWRAPPER) --man $@ $<
+ $(PODWRAPPER) \
+ --no-strict-checks \
+ --man $@ \
+ $<
+
+%.3: %.pod
+ $(PODWRAPPER) \
+ --no-strict-checks \
+ --man $@ \
+ --section 3 \
+ $<
%.1: %.pl
- $(PODWRAPPER) --man $@ $<
+ $(PODWRAPPER) \
+ --no-strict-checks \
+ --man $@ \
+ $<
# Ensure that the first time we build from git, since guestfs.pod
# hasn't been built yet, build it.
diff --git a/po-docs/uk/Makefile.am b/po-docs/uk/Makefile.am
index 2e99b022..7bd9a0a3 100644
--- a/po-docs/uk/Makefile.am
+++ b/po-docs/uk/Makefile.am
@@ -58,8 +58,10 @@ all-local: $(MANPAGES)
guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod
$(PODWRAPPER) \
- --section 3 \
+ --no-strict-checks \
--man $@ \
+ --section 3 \
+ --license LGPLv2+ \
--insert $(srcdir)/guestfs-actions.pod:@ACTIONS@ \
--insert $(srcdir)/guestfs-availability.pod:@AVAILABILITY@ \
--insert $(srcdir)/guestfs-structs.pod:@STRUCTS@ \
@@ -67,16 +69,31 @@ guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-stru
guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod
$(PODWRAPPER) \
+ --no-strict-checks \
--man $@ \
+ --license GPLv2+ \
--insert $(srcdir)/guestfish-actions.pod:@ACTIONS@ \
--insert $(srcdir)/guestfish-commands.pod:@FISH_COMMANDS@ \
$<
%.1: %.pod
- $(PODWRAPPER) --man $@ $<
+ $(PODWRAPPER) \
+ --no-strict-checks \
+ --man $@ \
+ $<
+
+%.3: %.pod
+ $(PODWRAPPER) \
+ --no-strict-checks \
+ --man $@ \
+ --section 3 \
+ $<
%.1: %.pl
- $(PODWRAPPER) --man $@ $<
+ $(PODWRAPPER) \
+ --no-strict-checks \
+ --man $@ \
+ $<
# Ensure that the first time we build from git, since guestfs.pod
# hasn't been built yet, build it.
diff --git a/podwrapper.pl.in b/podwrapper.pl.in
index 15e2eadb..b8b04593 100755
--- a/podwrapper.pl.in
+++ b/podwrapper.pl.in
@@ -131,6 +131,16 @@ not set, defaults to C<1>.
=cut
+my $strict_checks = 1;
+
+=item B<--no-strict-checks>
+
+Disable strict checks of the man page. This is only used
+when generating the translated man pages in the C<po-docs>
+subdirectory.
+
+=cut
+
my $text;
=item B<--text=output.txt>
@@ -173,6 +183,7 @@ GetOptions ("help|?" => \$help,
"man=s" => \$man,
"name=s" => \$name,
"section=s" => \$section,
+ "strict-checks!" => \$strict_checks,
"text=s" => \$text,
"verbatim=s" => \@verbatims
) or pod2usage (2);
@@ -182,7 +193,7 @@ die "$progname: missing argument: podwrapper input.pod\n" unless @ARGV == 1;
my $input = $ARGV[0];
die "$progname: $input: missing argument: --license parameter is required\n"
- unless @licenses >= 1;
+ if $strict_checks && @licenses == 0;
# There should be at least one output.
die "$progname: $input: no output format specified. Use --man and/or --html and/or --text.\n"
@@ -249,20 +260,22 @@ foreach (@verbatims) {
$content =~ s/$a[1]/$replacement/ge;
}
-# Verify sections present / not present.
-die "$progname: $input: missing AUTHOR or AUTHORS section\n"
- unless $content =~ /^=head1 AUTHOR/m;
-die "$progname: $input: missing SEE ALSO section\n"
- unless $content =~ /^=head1 SEE ALSO/m;
-die "$progname: $input: missing COPYRIGHT section\n"
- unless $content =~ /^=head1 COPYRIGHT/m;
-die "$progname: $input: BUGS is now added automatically, do not add it to the POD file\n"
- if $content =~ /^=head1 (REPORTING )?BUGS/m;
-die "$progname: $input: LICENSE is now added automatically, do not add it to the POD file\n"
- if $content =~ /^=head1 LICENSE/m;
-die "$progname: $input: GPL/LGPL should be specified using the --license parameter, not included in the POD file\n"
- if $content =~ /^This program is free software/ ||
- $content =~ /^This library is free software/;
+if ($strict_checks) {
+ # Verify sections present / not present.
+ die "$progname: $input: missing AUTHOR or AUTHORS section\n"
+ unless $content =~ /^=head1 AUTHOR/m;
+ die "$progname: $input: missing SEE ALSO section\n"
+ unless $content =~ /^=head1 SEE ALSO/m;
+ die "$progname: $input: missing COPYRIGHT section\n"
+ unless $content =~ /^=head1 COPYRIGHT/m;
+ die "$progname: $input: BUGS is now added automatically, do not add it to the POD file\n"
+ if $content =~ /^=head1 (REPORTING )?BUGS/m;
+ die "$progname: $input: LICENSE is now added automatically, do not add it to the POD file\n"
+ if $content =~ /^=head1 LICENSE/m;
+ die "$progname: $input: GPL/LGPL should be specified using the --license parameter, not included in the POD file\n"
+ if $content =~ /^This program is free software/ ||
+ $content =~ /^This library is free software/;
+}
# Add standard LICENSE and BUGS sections.
my $LGPLv2plus =