generate_all_texi.pl 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #! /usr/bin/perl -w
  2. # expand the manuals with nested formats using texi2html and test
  3. # with makeinfo on these expanded manuals (it is likely that makeinfo
  4. # cannot expand those manuals in some cases).
  5. use strict;
  6. open (TXT, 'tests.txt') or die "Cannot open tests.txt: $!\n";
  7. mkdir ("all_texi");
  8. while (<TXT>)
  9. {
  10. next if /^\s*\#/;
  11. if (/^(\w+) nested_formats.texi -D (\w+) *$/)
  12. {
  13. my $dir = $1;
  14. my $def = $2;
  15. my $format;
  16. mkdir ("all_texi/$dir");
  17. if ($def =~ /[a-z]+_([a-z]+)$/)
  18. {
  19. $format = $1;
  20. }
  21. system("perl -w -x ../../texi2html.pl --force nested_formats.texi -D $def --macro-expand=all_texi/$format-nested_formats.texi");
  22. system ("cp all_texi/$format-nested_formats.texi all_texi/$dir/nested_formats.texi");
  23. #system ("perl -w -x ../../texi2html.pl -D $def --expand-macro=all_texi/$dir/$format-nested_formats.texi");
  24. system ("cd all_texi/$dir/ && makeinfo --force nested_formats.texi 2>nested_formats.2");
  25. }
  26. else
  27. {
  28. print STDERR "Ignoring $_";
  29. }
  30. }