From Graeme Hewson: make AUTHORS-SHORT not include formatting codes,

with AUTHORS-SHORT-FORMAT containing the formatting codes.

svn path=/trunk/; revision=12334
This commit is contained in:
Guy Harris 2004-10-17 23:03:11 +00:00
parent 94a7c80639
commit 7e1521119f
8 changed files with 75 additions and 47 deletions

View File

@ -300,8 +300,15 @@ svnversion.h: FORCE
#
# Build the short version of the authors file for the about dialog
#
AUTHORS-SHORT: AUTHORS make-authors-short.pl make-authors-short2.pl
$(PERL) $(srcdir)/make-authors-short.pl < AUTHORS > AUTHORS-SHORT
AUTHORS-SHORT: AUTHORS make-authors-short.pl
$(PERL) $(srcdir)/perlnoutf.pl $(srcdir)/make-authors-short.pl < AUTHORS > AUTHORS-SHORT
#
# Build the short version of the authors file with formatting codes for the
# man page
#
AUTHORS-SHORT-FORMAT: AUTHORS-SHORT make-authors-format.pl
$(PERL) $(srcdir)/perlnoutf.pl $(srcdir)/make-authors-format.pl < AUTHORS-SHORT > AUTHORS-SHORT-FORMAT
#
# Build shell scripts by doing variable substitution.
@ -383,6 +390,7 @@ MAINTAINERCLEANFILES = \
EXTRA_DIST = \
AUTHORS-SHORT \
AUTHORS-SHORT-FORMAT \
FAQ \
INSTALL.configure \
Makefile.common \
@ -521,8 +529,8 @@ EXTRA_DIST = \
image/icon_layout_6.xpm \
image/wiretap.rc.in \
imscxdx.xml \
make-authors-format.pl \
make-authors-short.pl \
make-authors-short2.pl \
make-manuf \
make-tapreg-dotc \
make-version.pl \
@ -531,6 +539,7 @@ EXTRA_DIST = \
mergecap.c \
mobileipv4.xml \
nasreq.xml \
perlnoutf.pl \
print.ps \
randpkt.c \
rdps.c \
@ -556,7 +565,7 @@ else
SUBDIRS = tools wiretap doc epan packaging help @ethereal_SUBDIRS@
endif
ethereal.1: doc/ethereal.pod AUTHORS-SHORT
ethereal.1: doc/ethereal.pod AUTHORS-SHORT-FORMAT
(cd doc ; \
$(MAKE) ../ethereal.1 )
@ -588,7 +597,7 @@ text2pcap.1: doc/text2pcap.pod
(cd doc ; \
$(MAKE) ../text2pcap.1 )
ethereal.html: doc/ethereal.pod AUTHORS-SHORT
ethereal.html: doc/ethereal.pod AUTHORS-SHORT-FORMAT
(cd doc ; \
$(MAKE) ../ethereal.html )

View File

@ -229,9 +229,15 @@ svnversion.h:
#
# Build the short version of the authors file for the about dialog
#
AUTHORS-SHORT: AUTHORS make-authors-short.pl make-authors-short2.pl
$(PERL) make-authors-short.pl < AUTHORS > AUTHORS-SHORT
AUTHORS-SHORT: AUTHORS make-authors-short.pl
$(PERL) perlnoutf.pl make-authors-short.pl < AUTHORS > AUTHORS-SHORT
#
# Build the short version of the authors file with formatting codes for
# the man page
#
AUTHORS-SHORT-FORMAT: AUTHORS-SHORT make-authors-format.pl
$(PERL) perlnoutf.pl make-authors-format.pl < AUTHORS-SHORT > AUTHORS-SHORT-FORMAT
#
# Build "tethereal-tap-register.c", which contains a function
@ -265,6 +271,7 @@ clean: gtk2_distclean
capinfo.obj editcap.obj mergecap.obj text2pcap.obj getopt.obj\
text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \
rdps.pdb rdps.exe rdps.ilk config.h ps.c AUTHORS-SHORT \
AUTHORS-SHORT-FORMAT \
dftest.obj dftest.exe randpkt.obj randpkt.ext doxygen.cfg \
$(RESOURCES)
cd wiretap

View File

@ -24,8 +24,8 @@
# We include dependencies on ../config.h in order to
# capture when $(VERSION) changes.
ethereal-tmp.pod: $(srcdir)/ethereal.pod $(top_srcdir)/AUTHORS-SHORT
cat $(srcdir)/ethereal.pod $(top_srcdir)/AUTHORS-SHORT > ethereal-tmp.pod
ethereal-tmp.pod: $(srcdir)/ethereal.pod $(top_srcdir)/AUTHORS-SHORT-FORMAT
cat $(srcdir)/ethereal.pod $(top_srcdir)/AUTHORS-SHORT-FORMAT > ethereal-tmp.pod
../ethereal.1: ethereal-tmp.pod ../config.h
$(POD2MAN) \

View File

@ -32,8 +32,8 @@ doc: ethereal.html tethereal.html ethereal-filter.html capinfo.html \
man: ethereal.1 tethereal.1 ethereal-filter.4 capinfo.1 editcap.1 \
idl2eth.1 mergecap.1 text2pcap.1
ethereal-tmp.pod: ethereal.pod ../AUTHORS-SHORT
copy /B ethereal.pod + ..\AUTHORS-SHORT ethereal-tmp.pod
ethereal-tmp.pod: ethereal.pod ../AUTHORS-SHORT-FORMAT
copy /B ethereal.pod + ..\AUTHORS-SHORT-FORMAT ethereal-tmp.pod
ethereal.1: ethereal.pod ../config.h
$(POD2MAN) \

View File

@ -1,36 +1,17 @@
#!/usr/bin/perl -w
# $Id$
# Remove tasks from individual author entries from AUTHORS file
# for use in the about dialog.
# Convert AUTHORS-SHORT file for use in man page and HTML documentation
# after processing through pod2man and pod2html.
#
# Must be called via perlnoutf.
use strict;
my $subinfo=0;
my $nextline;
print "=for html <pre>\n\n";
print "=for man .nf\n\n";
$_ = <>;
s/\xef\xbb\xbf//; # Skip UTF-8 byte order mark
printline() unless /^\n/;
while (<>) {
if (/(.*){/) {
$subinfo = 1;
printline("$1\n");
} elsif (/}/) {
$subinfo = 0;
if (($nextline = <>) !~ /^[\s]*$/) {
print($nextline);
}
} elsif ($subinfo == 1) {
next;
} else {
printline();
}
printline();
}
print "\n=for html </pre>\n";

View File

@ -1,18 +1,31 @@
#!/usr/bin/perl -w
# $Id$
# Remove tasks from individual author entries from AUTHORS file
# for use in the about dialog.
#
# Must be called via perlnoutf.
use strict;
# Unset environment variables so perl doesn't
# interpret bytes as UTF-8 characters
my $subinfo=0;
my $nextline;
delete $ENV{LANG};
delete $ENV{LANGUAGE};
delete $ENV{LC_ALL};
delete $ENV{LC_CTYPE};
$_ = <>;
s/\xef\xbb\xbf//; # Skip UTF-8 byte order mark
print unless /^\n/;
# Call make-authors-short2.pl in same directory, using same interpreter
(my $prog2 = $0) =~ s/\.pl$/2.pl/;
system($^X, "$prog2", @ARGV);
while (<>) {
if (/(.*){/) {
$subinfo = 1;
print "$1\n";
} elsif (/}/) {
$subinfo = 0;
if (($nextline = <>) !~ /^[\s]*$/) {
print $nextline;
}
} elsif ($subinfo == 1) {
next;
} else {
print;
}
}

View File

@ -262,6 +262,7 @@ File "..\..\FAQ"
File "..\..\README"
File "..\..\README.win32"
File "..\..\AUTHORS-SHORT"
File "..\..\AUTHORS-SHORT-FORMAT"
File "..\..\COPYING"
File "NEWS.txt"
File "..\..\manuf"
@ -614,6 +615,7 @@ Delete "$INSTDIR\*.dll"
Delete "$INSTDIR\*.html"
Delete "$INSTDIR\COPYING"
Delete "$INSTDIR\AUTHORS-SHORT"
Delete "$INSTDIR\AUTHORS-SHORT-FORMAT"
Delete "$INSTDIR\README*"
Delete "$INSTDIR\FAQ"
Delete "$INSTDIR\NEWS.txt"

16
perlnoutf.pl Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/perl -w
# $Id$
# Call another Perl script, passing our caller's arguments, with
# environment variables unset so perl doesn't interpret bytes as UTF-8
# characters.
use strict;
delete $ENV{LANG};
delete $ENV{LANGUAGE};
delete $ENV{LC_ALL};
delete $ENV{LC_CTYPE};
system("$^X -w @ARGV");