diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-06 08:38:22 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-06 08:38:22 +0000 |
commit | e4182cc9142fbf73e3d37deb4fd6eb113b65d899 (patch) | |
tree | b6ba443744359b6a32c78b975c39f63c2efe9942 /contrib | |
parent | 40c059b1d7ce04405d8897813997e1f3ce8b97e9 (diff) | |
download | gcc-e4182cc9142fbf73e3d37deb4fd6eb113b65d899.tar.gz |
contrib/
2013-03-06 Tobias Burnus <burnus@net-b.de>
* make-obstacks-texi.pl: New.
libiberty/
2013-03-06 Tobias Burnus <burnus@net-b.de>
* libiberty.texi: Update comment, remove lowersections.
* obstacks.texi: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196486 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ChangeLog | 4 | ||||
-rw-r--r-- | contrib/make-obstacks-texi.pl | 46 |
2 files changed, 50 insertions, 0 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 98834acb49f..4339d3c2ddd 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2013-03-06 Tobias Burnus <burnus@net-b.de> + + * make-obstacks-texi.pl: New. + 2013-02-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * make_sunver.pl: Enforce C locale. diff --git a/contrib/make-obstacks-texi.pl b/contrib/make-obstacks-texi.pl new file mode 100644 index 00000000000..63a0bac0b70 --- /dev/null +++ b/contrib/make-obstacks-texi.pl @@ -0,0 +1,46 @@ +#!/usr/bin/perl -w + +# (C) 2013 Free Software Foundation +# Contributed by Tobias Burnus +# +# This script is Free Software, and it can be copied, distributed and +# modified as defined in the GNU General Public License. A copy of +# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html + +use strict; +use File::Basename; + + +if ($#ARGV != 0 or $ARGV[0] eq "") { + my $name = basename($0); + + print "\nUSAGE: `$name` memory.texi\n\n"; + print "Reads GLIBC's manual/memory.texi and extracts the obstacks section\n" + ."Redirect the output to update GCC's libiberty/obstacks.texi\n\n"; + exit 1; +} + +open (IN, "<$ARGV[0]") || die "Cannot open '$ARGV[0]': $!"; +my $data = join ("", <IN>); +close (IN); + +$data =~ s/.*\@node Obstacks\n/\@node Obstacks\n/s; +$data =~ s/\n\@node [^\n]+\n\@subsection.*/\n/s; + +# Add refs to GLIBC +$data =~ s/(\@p?xref{[^}]*)}/$1, , , libc, The GNU C Library Reference Manual}/gs; + + +# And undo the refs which are in this file +my @nodes = grep /^\@node /, (split /\n/, $data); + +foreach my $node (@nodes) { + $node =~ s/\@node //; + $node =~ s/,.*//; + $node =~ s/ / *\n?/g; + chomp ($node); + + $data =~ s/(\@p?xref{$node), , , libc, The GNU C Library Reference Manual}/$1}/gsi; +} + +print $data; |