texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo/tp MANIFEST TODO texi2any.pl Texinfo/Do...


From: Patrice Dumas
Subject: texinfo/tp MANIFEST TODO texi2any.pl Texinfo/Do...
Date: Thu, 22 Sep 2011 22:48:00 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/09/22 22:48:00

Modified files:
        tp             : MANIFEST TODO texi2any.pl 
        tp/Texinfo     : Documentlanguages.pm 
Added files:
        tp             : Makefile.am 
        tp/maintain    : all_tests.sh regenerate_documentlanguages.pl 
                         regenerate_file_lists.pl 
Removed files:
        tp             : regenerate_documentlanguages.pl 

Log message:
        Preliminary support of automake based distribution.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/MANIFEST?cvsroot=texinfo&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.172&r2=1.173
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.60&r2=1.61
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Makefile.am?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/regenerate_documentlanguages.pl?cvsroot=texinfo&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Documentlanguages.pm?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/maintain/all_tests.sh?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/maintain/regenerate_documentlanguages.pl?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/maintain/regenerate_file_lists.pl?cvsroot=texinfo&rev=1.1

Patches:
Index: MANIFEST
===================================================================
RCS file: /sources/texinfo/texinfo/tp/MANIFEST,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- MANIFEST    17 Sep 2011 20:24:24 -0000      1.5
+++ MANIFEST    22 Sep 2011 22:47:59 -0000      1.6
@@ -11,7 +11,6 @@
 Texinfo/Common.pm
 Texinfo/Structuring.pm
 Texinfo/Documentlanguages.pm
-Texinfo/Parser.pm
 Texinfo/Convert/Texinfo.pm
 Texinfo/Convert/Info.pm
 Texinfo/Convert/NodeNameNormalization.pm

Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -b -r1.172 -r1.173
--- TODO        19 Sep 2011 19:29:03 -0000      1.172
+++ TODO        22 Sep 2011 22:47:59 -0000      1.173
@@ -2,6 +2,8 @@
 perl -w t/02coverage.t -o
 xmllint --nonet --noout --valid commands.xml
 
+autoreconf && ./configure --prefix=$HOME/tmp/install_texinfo && make && make 
install
+
 xml_tests/raw
 
  Para

Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- texi2any.pl 17 Sep 2011 20:24:24 -0000      1.60
+++ texi2any.pl 22 Sep 2011 22:48:00 -0000      1.61
@@ -34,6 +34,12 @@
 
 Getopt::Long::Configure("gnu_getopt");
 
+BEGIN
+{
+  my $texinfolibdir = '@datadir@/@PACKAGE@';
+  unshift @INC, ($texinfolibdir) if ($texinfolibdir ne '');
+}
+
 use Texinfo::Convert::Texinfo;
 
 # defaults for options relevant in the main program, not undef, and also
@@ -117,9 +123,9 @@
 # FIXME use something else than srcdir?
 my $srcdir = defined $ENV{'srcdir'} ? $ENV{'srcdir'} : dirname $0;
 # FIXME
-$srcdir = "$srcdir/../texi2html";
+my $libsrcdir = "$srcdir/../texi2html";
 if ($0 =~ /\.pl$/) {
-  unshift @INC, "$srcdir/lib/libintl-perl/lib";
+  unshift @INC, "$libsrcdir/lib/libintl-perl/lib";
 } elsif ('@USE_EXTERNAL_LIBINTL@' ne 'yes') {
   unshift @INC, "$pkgdatadir/lib/libintl-perl/lib";
 } else {
@@ -141,7 +147,7 @@
   # FIXME
   # or in the texi2html directory
   my $locales_dir_found = 0;
-  foreach my $locales_dir ("$srcdir/locales", "./locales", 
'../texi2html/locales') {
+  foreach my $locales_dir ("$libsrcdir/locales", "./locales", 
'../texi2html/locales') {
     if (-d $locales_dir) {
       Locale::Messages::bindtextdomain ($strings_textdomain, $locales_dir);
       $locales_dir_found = 1;
@@ -158,7 +164,7 @@
 Locale::Messages::bindtextdomain ($messages_textdomain, "$datadir/locale");
 
 if ($0 =~ /\.pl$/) {
-  unshift @INC, "$srcdir/lib/Unicode-EastAsianWidth/lib";
+  unshift @INC, "$libsrcdir/lib/Unicode-EastAsianWidth/lib";
 } elsif ('@USE_EXTERNAL_EASTASIANWIDTH@' ne 'yes') {
   unshift @INC, "$pkgdatadir/lib/Unicode-EastAsianWidth/lib";
 } else {
@@ -170,7 +176,7 @@
 require Unicode::EastAsianWidth;
 
 if ($0 =~ /\.pl$/) {
-  unshift @INC, "$srcdir/lib/Text-Unidecode/lib";
+  unshift @INC, "$libsrcdir/lib/Text-Unidecode/lib";
 } elsif ('@USE_EXTERNAL_UNIDECODE@' ne 'yes') {
   unshift @INC, "$pkgdatadir/lib/Text-Unidecode/lib";
 } else {

Index: Texinfo/Documentlanguages.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Documentlanguages.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- Texinfo/Documentlanguages.pm        13 Sep 2011 19:45:31 -0000      1.2
+++ Texinfo/Documentlanguages.pm        22 Sep 2011 22:48:00 -0000      1.3
@@ -1,4 +1,4 @@
-# This file was automatically generated from ./regenerate_documentlanguages.pl
+# This file was automatically generated from 
./maintain/regenerate_documentlanguages.pl
 
 package Texinfo::Documentlanguages;
 

Index: Makefile.am
===================================================================
RCS file: Makefile.am
diff -N Makefile.am
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ Makefile.am 22 Sep 2011 22:47:59 -0000      1.1
@@ -0,0 +1,147 @@
+include Makefile.incl
+
+$(srcdir)/Makefile.incl:
+       (cd $(srcdir)/ && $(SHELL) ./maintain/regenerate_file_lists.pl)
+
+bin_SCRIPTS = texi2any
+
+do_subst = sed \
+  -e 's,address@hidden@],$(PACKAGE_VERSION),g' \
+  -e 's,address@hidden@],$(PACKAGE_NAME),g' \
+  -e 's,address@hidden@],$(sysconfdir),g' \
+  -e 's,address@hidden@],$(prefix),g' \
+  -e 's,address@hidden@],$(datarootdir),g' \
+  -e 's,address@hidden@],$(datadir),g' \
+  -e 's,address@hidden@],$(PACKAGE),g' \
+  -e 's,address@hidden@],$(USE_EXTERNAL_LIBINTL),g' \
+  -e 's,address@hidden@],$(USE_EXTERNAL_EASTASIANWIDTH),g' \
+  -e 's,address@hidden@],$(USE_EXTERNAL_UNIDECODE),g'
+
+texi2any: texi2any.pl
+       $(do_subst) $(srcdir)/$< > $@
+       chmod a+x $@
+
+modulesdir = $(pkgdatadir)/Texinfo
+dist_modules_DATA = \
+ Texinfo/Parser.pm \
+ Texinfo/Report.pm \
+ Texinfo/Common.pm \
+ Texinfo/Structuring.pm \
+ Texinfo/Documentlanguages.pm
+
+convertersdir = $(pkgdatadir)/Texinfo/Convert
+dist_converters_DATA = \
+ Texinfo/Convert/Texinfo.pm \
+ Texinfo/Convert/Info.pm \
+ Texinfo/Convert/NodeNameNormalization.pm \
+ Texinfo/Convert/Converter.pm \
+ Texinfo/Convert/XML.pm \
+ Texinfo/Convert/Plaintext.pm \
+ Texinfo/Convert/HTML.pm \
+ Texinfo/Convert/DocBook.pm \
+ Texinfo/Convert/Text.pm \
+ Texinfo/Convert/UnFilled.pm \
+ Texinfo/Convert/Paragraph.pm \
+ Texinfo/Convert/Line.pm \
+ Texinfo/Convert/Unicode.pm
+
+debugmodulesdir = $(pkgdatadir)/DebugTexinfo
+dist_debugmodules_DATA = \
+ DebugTexinfo/DebugCount.pm \
+ DebugTexinfo/DebugTree.pm
+
+test_files = \
+ t/27float.t \
+ t/test_count.t \
+ t/03coverage_braces.t \
+ t/70value_and_macro.t \
+ t/10menu.t \
+ t/05paragraph.t \
+ t/22xtable.t \
+ t/test_sort.t \
+ t/02coverage.t \
+ t/19def.t \
+ t/01use.t \
+ t/18itemize.t \
+ t/06columnfractions.t \
+ t/04verb.t \
+ t/plaintext_tests.t \
+ t/181quotation.t \
+ t/57invalid_nestings.t \
+ t/58alias.t \
+ t/21multitable.t \
+ t/08misc_commands.t \
+ t/paragraph.t \
+ t/30sectioning.t \
+ t/test_utils.pl \
+ t/info_tests.t \
+ t/55conditionals.t \
+ t/html_tests.t \
+ t/50value.t \
+ t/60macro.t \
+ t/include/file_with_xml_chars.texi \
+ t/include/a.txt \
+ t/include/count_image.txt \
+ t/include/fdotext.png \
+ t/include/incl-incl.txi \
+ t/include/fdotext.ext \
+ t/include/count_image_text.txt \
+ t/include/aa.txt \
+ t/include/image.txt \
+ t/include/section_file.texi \
+ t/include/f.txt \
+ t/include/this_is_a_long_unknown_file.png \
+ t/include/count_image.png \
+ t/include/f--ile.txt \
+ t/include/fext.png \
+ t/include/fextext \
+ t/include/included_file_with_setfilename.texi \
+ t/include/fext.txt \
+ t/include/inc_file.texi \
+ t/include/address@hidden \
+ t/include/f--ile.png \
+ t/include/words.txt \
+ t/include/fdotext.txt \
+ t/include/macro_included.texi \
+ t/include/fext.ext \
+ t/languages.t \
+ t/16raw.t \
+ t/09indices.t \
+ t/accents.t \
+ t/28heading.t \
+ t/README \
+ t/init/test_renamed_nodes.init \
+ t/init/redefine_need.init \
+ t/init/test_directions.init
+
+
+EXTRA_DIST = \
+  texi2any.pl \
+  $(test_results) \
+  $(test_files)
+
+# FIXME put those somewhere else?  In maintain/lib?
+libsrcdir = $(srcdir)/../texi2html/lib
+  
+install-data-local:
+       $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/lib/libintl-perl/lib/Locale/Recode \
+         $(DESTDIR)$(pkgdatadir)/lib/libintl-perl/lib/Locale/RecodeData
+       $(INSTALL_DATA) $(libsrcdir)/libintl-perl/lib/Locale/*.pm \
+         $(DESTDIR)$(pkgdatadir)/lib/libintl-perl/lib/Locale
+       $(INSTALL_DATA) $(libsrcdir)/libintl-perl/lib/Locale/Recode/*.pm \
+         $(DESTDIR)$(pkgdatadir)/lib/libintl-perl/lib/Locale/Recode
+       $(INSTALL_DATA) $(libsrcdir)/libintl-perl/lib/Locale/RecodeData/*.pm \
+         $(DESTDIR)$(pkgdatadir)/lib/libintl-perl/lib/Locale/RecodeData
+       $(MKDIR_P) 
$(DESTDIR)$(pkgdatadir)/lib/Unicode-EastAsianWidth/lib/Unicode
+       $(INSTALL_DATA) 
$(libsrcdir)/Unicode-EastAsianWidth/lib/Unicode/EastAsianWidth.pm \
+        $(DESTDIR)$(pkgdatadir)/lib/Unicode-EastAsianWidth/lib/Unicode
+       $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/lib/Text-Unidecode/lib/Text/Unidecode
+       $(INSTALL_DATA) $(libsrcdir)/Text-Unidecode/lib/Text/Unidecode.pm \
+         $(DESTDIR)$(pkgdatadir)/lib/Text-Unidecode/lib/Text
+       $(INSTALL_DATA) $(libsrcdir)/Text-Unidecode/lib/Text/Unidecode/*.pm \
+         $(DESTDIR)$(pkgdatadir)/lib/Text-Unidecode/lib/Text/Unidecode
+
+uninstall-local:
+       rm -rf $(DESTDIR)$(pkgdatadir)/lib/
+
+CLEANFILES = texi2any

Index: maintain/all_tests.sh
===================================================================
RCS file: maintain/all_tests.sh
diff -N maintain/all_tests.sh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ maintain/all_tests.sh       22 Sep 2011 22:48:00 -0000      1.1
@@ -0,0 +1,37 @@
+#! /bin/sh
+
+command=$1
+if [ $# -gt 0 ]; then 
+ shift
+ test_name=$1
+fi
+
+if [ z"$command" = 'z' ]; then
+  echo "Need an arg"
+  exit 1
+fi
+
+if [ "$command" = 'clean' ]; then
+  rm -f t/results/*/*.pl.new
+elif [ "$command" = 'generate' ]; then
+  for file in t/*.t; do
+    perl $file -g
+  done
+elif [ "$command" = 'output' ]; then
+  for file in t/*.t; do
+    perl $file -o
+  done
+elif [ "$command" = 'diff' ]; then
+  if [ z"$test_name" = 'z' ]; then
+    for result in t/results/*/*.pl; do
+      diff -U 3 $result $result.new
+    done
+  else
+    for result in t/results/$test_name/*.pl; do
+      diff -u $result $result.new
+    done
+  fi 
+else
+  echo "Unknown command"
+  exit 1
+fi

Index: maintain/regenerate_documentlanguages.pl
===================================================================
RCS file: maintain/regenerate_documentlanguages.pl
diff -N maintain/regenerate_documentlanguages.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ maintain/regenerate_documentlanguages.pl    22 Sep 2011 22:48:00 -0000      
1.1
@@ -0,0 +1,77 @@
+#! /usr/bin/perl -w
+
+# regenerate_documentlanguages.pl: download the iana files language
+# and regenerate Texinfo/Documentlanguages.pm list of languages and regions
+#
+# Copyright 2010, 2011 Free Software Foundation, Inc.
+# 
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.  This file is offered as-is,
+# without any warranty.
+#
+# Original author: Patrice Dumas <address@hidden>
+#
+# Calling that script for each release could be a good idea.
+
+use strict;
+
+my $dir = 'maintain';
+system ("cd $dir && wget -N 
http://www.iana.org/assignments/language-subtag-registry";);
+
+open (TXT,"$dir/language-subtag-registry") or die "Open 
$dir/language-subtag-registry: $!\n";
+
+my $entry;
+my @entries;
+while (<TXT>)
+{
+   if (/^%%/)
+   {
+      push @entries, $entry if (defined($entry));
+      $entry = undef;
+   }
+   else
+   {
+       if (/^(\w+): (.*)/)
+       {
+           $entry->{$1} = $2;
+       }
+   }
+}
+push @entries, $entry if (defined($entry));
+if (!defined($entry->{'Type'})) {
+  die "Type not defined for $entry ".join('|', keys(%$entry))."\n";
+}
+
+open (OUT, ">Texinfo/Documentlanguages.pm") or die "Open 
Texinfo/Documentlanguages.pm: $!\n";
+
+print OUT "# This file was automatically generated from $0\n\n";
+
+print OUT "package Texinfo::Documentlanguages;\n\n";
+
+print OUT 'our %language_codes = ('."\n";
+foreach my $entry (@entries)
+{
+   # Scope collection macrolanguage are used
+   if ($entry->{'Type'} eq 'language' and !defined($entry->{'Preferred-Value'})
+         and !defined($entry->{'Macrolanguage'}) and 
+         (!defined($entry->{'Scope'}) or ($entry->{'Scope'} ne 'special' and
+           $entry->{'Scope'} ne 'private-use')))
+   {
+       print OUT "'$entry->{'Subtag'}' => 1,\n";
+       print STDERR "$entry->{'Subtag'} Scope $entry->{'Scope'}\n" if 
defined($entry->{'Scope'});
+   }
+}
+print OUT ");\n\n";
+
+print OUT 'our %region_codes = ('."\n";
+foreach my $entry (@entries)
+{
+   if ($entry->{'Type'} eq 'region' and !defined($entry->{'Preferred-Value'})
+        and $entry->{'Description'} ne 'Private use' and $entry->{'Subtag'} !~ 
/^\d{3}$/)
+   {
+       print OUT "'$entry->{'Subtag'}' => 1,\n";
+   }
+}
+print OUT ");\n\n1;\n";
+

Index: maintain/regenerate_file_lists.pl
===================================================================
RCS file: maintain/regenerate_file_lists.pl
diff -N maintain/regenerate_file_lists.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ maintain/regenerate_file_lists.pl   22 Sep 2011 22:48:00 -0000      1.1
@@ -0,0 +1,40 @@
+#! /usr/bin/perl -w
+
+use strict;
+
+use File::Find;
+
+my %files;
+find (\&wanted, ('t'));
+
+sub wanted 
+{
+  if (/\.pl$/ and $File::Find::dir =~ /^t\/results\//) {
+    $files{$File::Find::name} = 1;
+  }
+}
+
+my %new_files = %files;
+#print STDERR join("\n", @files)."\n";
+
+open (FILE, "MANIFEST") or die "Open MANIFEST: $!\n";
+
+while (<FILE>) {
+  chomp;
+  delete ($new_files{$_});
+}
+
+print join("\n", sort(keys(%new_files))) ."\n";
+
+if (! -d "tmp") {
+  mkdir "tmp" or die "mkdir tmp: $!\n";
+}
+open (OUT, '>maintain/MANIFEST_test_results') or die "Open 
maintain/MANIFEST_test_results: $!\n";
+open (INCLUDE, '>Makefile.incl') or die "Open Makefile.incl: $!\n";
+print INCLUDE "test_results =";
+
+foreach my $file (sort(keys(%files))) {
+  print OUT "$file\n";
+  print INCLUDE " \\\n\t$file";
+}
+print INCLUDE "\n\n";

Index: regenerate_documentlanguages.pl
===================================================================
RCS file: regenerate_documentlanguages.pl
diff -N regenerate_documentlanguages.pl
--- regenerate_documentlanguages.pl     13 Sep 2011 19:45:30 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,73 +0,0 @@
-#! /usr/bin/perl -w
-
-# regenerate_documentlanguages.pl: download the iana files language
-# and regenerate Texinfo/Documentlanguages.pm list of languages and regions
-#
-# Copyright 2010, 2011 Free Software Foundation, Inc.
-# 
-# Copying and distribution of this file, with or without modification,
-# are permitted in any medium without royalty provided the copyright
-# notice and this notice are preserved.  This file is offered as-is,
-# without any warranty.
-#
-# Original author: Patrice Dumas <address@hidden>
-#
-# Calling that script for each release could be a good idea.
-
-use strict;
-
-system ("wget -N http://www.iana.org/assignments/language-subtag-registry";);
-
-open (TXT,"language-subtag-registry") or die "Open language-subtag-registry: 
$!\n";
-
-my $entry;
-my @entries;
-while (<TXT>)
-{
-   if (/^%%/)
-   {
-      push @entries, $entry if (defined($entry));
-      $entry = undef;
-   }
-   else
-   {
-       if (/^(\w+): (.*)/)
-       {
-           $entry->{$1} = $2;
-       }
-   }
-}
-push @entries, $entry if (defined($entry));
-
-open (OUT, ">Texinfo/Documentlanguages.pm") or die "Open 
Texinfo/Documentlanguages.pm: $!\n";
-
-print OUT "# This file was automatically generated from $0\n\n";
-
-print OUT "package Texinfo::Documentlanguages;\n\n";
-
-print OUT 'our %language_codes = ('."\n";
-foreach my $entry (@entries)
-{
-   # Scope collection macrolanguage are used
-   if ($entry->{'Type'} eq 'language' and !defined($entry->{'Preferred-Value'})
-         and !defined($entry->{'Macrolanguage'}) and 
-         (!defined($entry->{'Scope'}) or ($entry->{'Scope'} ne 'special' and
-           $entry->{'Scope'} ne 'private-use')))
-   {
-       print OUT "'$entry->{'Subtag'}' => 1,\n";
-       print STDERR "$entry->{'Subtag'} Scope $entry->{'Scope'}\n" if 
defined($entry->{'Scope'});
-   }
-}
-print OUT ");\n\n";
-
-print OUT 'our %region_codes = ('."\n";
-foreach my $entry (@entries)
-{
-   if ($entry->{'Type'} eq 'region' and !defined($entry->{'Preferred-Value'})
-        and $entry->{'Description'} ne 'Private use' and $entry->{'Subtag'} !~ 
/^\d{3}$/)
-   {
-       print OUT "'$entry->{'Subtag'}' => 1,\n";
-   }
-}
-print OUT ");\n\n1;\n";
-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]