This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Make docs include GPLv3 instead of GPLv2
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 1 Apr 2008 16:39:38 +0000 (UTC)
- Subject: Make docs include GPLv3 instead of GPLv2
This patch makes the GCC manuals include gpl_v3.texi instead of
gpl.texi where appropriate, adding the necessary markup to gpl_v3.texi
to generate a manpage from it.
Tested with "make info", "make man" and "make pdf". The texi2pod.pl
changes only affect the output for gpl_v3.texi, not the other
manpages. Applied to mainline. Will apply to 4.3 and 4.2 branches
after testing there.
Note that gpl.texi is left unchanged for the use of the libgomp
manual. (libgomp is under LGPL >= 2.1 plus an exception that mentions
the GPL rather than the LGPL.)
contrib:
2008-04-01 Joseph Myers <joseph@codesourcery.com>
* texi2pod.pl: Handle @samp and @url inside verbatim blocks.
Handle @heading. Handle enumerated lists with starting numbers
and extra headings.
gcc:
2008-04-01 Joseph Myers <joseph@codesourcery.com>
* doc/include/gpl_v3.texi: Update for manpage generation.
* doc/gcc.texi, doc/gccint.texi: Include gpl_v3.texi instead of
gpl.texi.
* doc/sourcebuild.texi: Document gpl_v3.texi as well as gpl.texi.
* Makefile.in (TEXI_GCC_FILES, TEXI_GCCINT_FILES): Include
gpl_v3.texi instead of gpl.texi.
(gpl.pod): New.
gcc/fortran:
2008-04-01 Joseph Myers <joseph@codesourcery.com>
* gfortran.texi: Include gpl_v3.texi instead of gpl.texi
* Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
gpl.texi.
gcc/java:
2008-04-01 Joseph Myers <joseph@codesourcery.com>
* gcj.texi: Include gpl_v3.texi instead of gpl.texi
* Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
gpl.texi.
Index: gcc/doc/sourcebuild.texi
===================================================================
--- gcc/doc/sourcebuild.texi (revision 133790)
+++ gcc/doc/sourcebuild.texi (working copy)
@@ -340,6 +340,7 @@
@item gcc-common.texi
Common definitions for manuals.
@item gpl.texi
+@itemx gpl_v3.texi
The GNU General Public License.
@item texinfo.tex
A copy of @file{texinfo.tex} known to work with the GCC manuals.
Index: gcc/doc/gcc.texi
===================================================================
--- gcc/doc/gcc.texi (revision 133790)
+++ gcc/doc/gcc.texi (working copy)
@@ -170,7 +170,7 @@
@include funding.texi
@include gnu.texi
-@include gpl.texi
+@include gpl_v3.texi
@c ---------------------------------------------------------------------
@c GFDL
Index: gcc/doc/gccint.texi
===================================================================
--- gcc/doc/gccint.texi (revision 133790)
+++ gcc/doc/gccint.texi (working copy)
@@ -156,7 +156,7 @@
@include funding.texi
@include gnu.texi
-@include gpl.texi
+@include gpl_v3.texi
@c ---------------------------------------------------------------------
@c GFDL
Index: gcc/doc/include/gpl_v3.texi
===================================================================
--- gcc/doc/include/gpl_v3.texi (revision 133790)
+++ gcc/doc/include/gpl_v3.texi (working copy)
@@ -1,4 +1,19 @@
+@ignore
+@c Set file name and title for man page.
+@setfilename gpl
+@settitle GNU General Public License
+@c man begin SEEALSO
+gfdl(7), fsf-funding(7).
+@c man end
+@c man begin COPYRIGHT
+Copyright @copyright{} 2007 Free Software Foundation, Inc.
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+@c man end
+@end ignore
@node Copying
+@c man begin DESCRIPTION
@unnumbered GNU General Public License
@center Version 3, 29 June 2007
@@ -715,3 +730,4 @@
applications with the library. If this is what you want to do, use
the GNU Lesser General Public License instead of this License. But
first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.
+@c man end
Index: gcc/java/Make-lang.in
===================================================================
--- gcc/java/Make-lang.in (revision 133790)
+++ gcc/java/Make-lang.in (working copy)
@@ -311,7 +311,7 @@
$(srcdir)/java/jcf-path.c $(OUTPUT_OPTION)
TEXI_JAVA_FILES = java/gcj.texi $(gcc_docdir)/include/fdl.texi \
- $(gcc_docdir)/include/gpl.texi $(gcc_docdir)/include/gcc-common.texi \
+ $(gcc_docdir)/include/gpl_v3.texi $(gcc_docdir)/include/gcc-common.texi \
gcc-vers.texi
# Documentation
Index: gcc/java/gcj.texi
===================================================================
--- gcc/java/gcj.texi (revision 133790)
+++ gcc/java/gcj.texi (working copy)
@@ -122,7 +122,7 @@
@end menu
-@include gpl.texi
+@include gpl_v3.texi
@include fdl.texi
Index: gcc/fortran/gfortran.texi
===================================================================
--- gcc/fortran/gfortran.texi (revision 133790)
+++ gcc/fortran/gfortran.texi (working copy)
@@ -1933,7 +1933,7 @@
@c GNU General Public License
@c ---------------------------------------------------------------------
-@include gpl.texi
+@include gpl_v3.texi
Index: gcc/fortran/Make-lang.in
===================================================================
--- gcc/fortran/Make-lang.in (revision 133790)
+++ gcc/fortran/Make-lang.in (working copy)
@@ -149,7 +149,7 @@
$(srcdir)/fortran/intrinsic.texi \
$(srcdir)/fortran/invoke.texi \
$(srcdir)/doc/include/fdl.texi \
- $(srcdir)/doc/include/gpl.texi \
+ $(srcdir)/doc/include/gpl_v3.texi \
$(srcdir)/doc/include/funding.texi \
$(srcdir)/doc/include/gcc-common.texi \
gcc-vers.texi
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in (revision 133790)
+++ gcc/Makefile.in (working copy)
@@ -3638,7 +3638,7 @@
TEXI_GCC_FILES = gcc.texi gcc-common.texi gcc-vers.texi frontends.texi \
standards.texi invoke.texi extend.texi md.texi objc.texi \
gcov.texi trouble.texi bugreport.texi service.texi \
- contribute.texi compat.texi funding.texi gnu.texi gpl.texi \
+ contribute.texi compat.texi funding.texi gnu.texi gpl_v3.texi \
fdl.texi contrib.texi cppenv.texi cppopts.texi \
implement-c.texi arm-neon-intrinsics.texi
@@ -3647,7 +3647,7 @@
portability.texi interface.texi passes.texi c-tree.texi \
rtl.texi md.texi tm.texi hostconfig.texi fragments.texi \
configfiles.texi collect2.texi headerdirs.texi funding.texi \
- gnu.texi gpl.texi fdl.texi contrib.texi languages.texi \
+ gnu.texi gpl_v3.texi fdl.texi contrib.texi languages.texi \
sourcebuild.texi gty.texi libgcc.texi cfg.texi tree-ssa.texi \
loop.texi
@@ -3798,6 +3798,9 @@
fsf-funding.pod: funding.texi
$(STAMP) $@
-$(TEXI2POD) $< > $@
+gpl.pod: gpl_v3.texi
+ $(STAMP) $@
+ -$(TEXI2POD) $< > $@
#
# Deletion of files made during compilation.
Index: contrib/texi2pod.pl
===================================================================
--- contrib/texi2pod.pl (revision 133790)
+++ contrib/texi2pod.pl (working copy)
@@ -218,9 +218,11 @@
s/\@\}/}/g;
s/\@\@/&at;/g;
- # Inside a verbatim block, handle @var specially.
+ # Inside a verbatim block, handle @var, @samp and @url specially.
if ($shift ne "") {
s/\@var\{([^\}]*)\}/<$1>/g;
+ s/\@samp\{([^\}]*)\}/"$1"/g;
+ s/\@url\{([^\}]*)\}/<$1>/g;
}
# POD doesn't interpret E<> inside a verbatim block.
@@ -250,7 +252,7 @@
next;
};
- /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/
+ /^\@(?:section|unnumbered|unnumberedsec|center|heading)\s+(.+)$/
and $_ = "\n=head2 $1\n";
/^\@subsection\s+(.+)$/
and $_ = "\n=head3 $1\n";
@@ -321,8 +323,14 @@
/^\@itemx?\s*(.+)?$/ and do {
if (defined $1) {
if ($ic) {
- # Entity escapes prevent munging by the <> processing below.
- $_ = "\n=item $ic\<$1\>\n";
+ if ($endw eq "enumerate") {
+ $_ = "\n=item $ic $1\n";
+ $ic =~ s/(\d+)/$1 + 1/eg;
+ } else {
+ # Entity escapes prevent munging by the <>
+ # processing below.
+ $_ = "\n=item $ic\<$1\>\n";
+ }
} else {
$_ = "\n=item $1\n";
}
--
Joseph S. Myers
joseph@codesourcery.com