[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp texi2any.pl
From: |
Patrice Dumas |
Subject: |
texinfo/tp texi2any.pl |
Date: |
Fri, 17 Feb 2012 18:52:24 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 12/02/17 18:52:24
Modified files:
tp : texi2any.pl
Log message:
Only expand macros for the first file.
Don't pass -E to texi2dvi if -E is passed to texi2any.
Expand macros to the file if -E is given to texi2any and texi2dvi is
called.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.113&r2=1.114
Patches:
Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -b -r1.113 -r1.114
--- texi2any.pl 16 Feb 2012 00:33:49 -0000 1.113
+++ texi2any.pl 17 Feb 2012 18:52:24 -0000 1.114
@@ -435,6 +435,7 @@
$call_texi2dvi = 1;
push @texi2dvi_args, '--'.$format;
$format_from_command_line = 1;
+ set_format('tex');
return $format;
}
@@ -627,8 +628,7 @@
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.\n"), '2012';
exit 0;},
- 'macro-expand|E=s' => sub { push @texi2dvi_args, '-E';
- set_from_cmdline('MACRO_EXPAND', $_[1]); },
+ 'macro-expand|E=s' => sub { set_from_cmdline('MACRO_EXPAND', $_[1]); },
'ifhtml!' => sub { set_expansion('html', $_[1]); },
'ifinfo!' => sub { set_expansion('info', $_[1]); },
'ifxml!' => sub { set_expansion('xml', $_[1]); },
@@ -866,13 +866,7 @@
die sprintf(__('when generating %s, only one input FILE may be specified
with -o'),
$format);
}
- if (get_conf('DEBUG') or get_conf('VERBOSE')) {
- print STDERR "".join('|', (get_conf('TEXI2DVI'), @texi2dvi_args, @ARGV))
- ."\n";
- }
- exec { get_conf('TEXI2DVI') } (get_conf('TEXI2DVI'), @texi2dvi_args, @ARGV);
}
-
my %tree_transformations;
if (get_conf('TREE_TRANSFORMATIONS')) {
my @transformations = split /,/, get_conf('TREE_TRANSFORMATIONS');
@@ -1000,7 +994,7 @@
$parser->Texinfo::Structuring::set_menus_to_simple_menu();
}
- if (defined(get_conf('MACRO_EXPAND'))) {
+ if (defined(get_conf('MACRO_EXPAND')) and $file_number == 0) {
my $texinfo_text = Texinfo::Convert::Texinfo::convert ($tree, 1);
#print STDERR "$texinfo_text\n";
my $macro_expand_file = get_conf('MACRO_EXPAND');
@@ -1027,7 +1021,7 @@
_exit($error_count, address@hidden);
}
}
- if (get_conf('DUMP_TEXI')) {
+ if (get_conf('DUMP_TEXI') or $formats_table{$format}->{'texi2dvi_format'}) {
handle_errors($parser, $error_count, address@hidden);
next;
}
@@ -1163,4 +1157,12 @@
}
}
+if ($call_texi2dvi) {
+ if (get_conf('DEBUG') or get_conf('VERBOSE')) {
+ print STDERR "".join('|', (get_conf('TEXI2DVI'), @texi2dvi_args, @ARGV))
+ ."\n";
+ }
+ exec { get_conf('TEXI2DVI') } (get_conf('TEXI2DVI'), @texi2dvi_args, @ARGV);
+}
+
1;