aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-10-17 23:03:11 +0000
committerGuy Harris <guy@alum.mit.edu>2004-10-17 23:03:11 +0000
commit7e1521119f792d256689320289b7926ac32b42c1 (patch)
tree0348f0dc3fa4ef3169ed2d77e35acd0558d92acf
parent94a7c806390c7fc25b020b8acf6879ac47cbc4ae (diff)
From Graeme Hewson: make AUTHORS-SHORT not include formatting codes,
with AUTHORS-SHORT-FORMAT containing the formatting codes. svn path=/trunk/; revision=12334
-rw-r--r--Makefile.am19
-rw-r--r--Makefile.nmake11
-rw-r--r--doc/Makefile.am4
-rw-r--r--doc/Makefile.nmake4
-rwxr-xr-xmake-authors-format.pl (renamed from make-authors-short2.pl)29
-rwxr-xr-xmake-authors-short.pl37
-rw-r--r--packaging/nsis/ethereal.nsi2
-rwxr-xr-xperlnoutf.pl16
8 files changed, 75 insertions, 47 deletions
diff --git a/Makefile.am b/Makefile.am
index 17c613a439..1f8899ae84 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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 )
diff --git a/Makefile.nmake b/Makefile.nmake
index db2d240dfd..679d361cfd 100644
--- a/Makefile.nmake
+++ b/Makefile.nmake
@@ -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
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 796d69c3e9..8857c94e4c 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -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) \
diff --git a/doc/Makefile.nmake b/doc/Makefile.nmake
index 5e6029be11..9741e7e03d 100644
--- a/doc/Makefile.nmake
+++ b/doc/Makefile.nmake
@@ -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) \
diff --git a/make-authors-short2.pl b/make-authors-format.pl
index eb5e0beb40..8c325d2d87 100755
--- a/make-authors-short2.pl
+++ b/make-authors-format.pl
@@ -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";
diff --git a/make-authors-short.pl b/make-authors-short.pl
index caa8b5bc90..ac96b0c264 100755
--- a/make-authors-short.pl
+++ b/make-authors-short.pl
@@ -1,18 +1,31 @@
-#!/usr/bin/perl -w
-
# $Id$
-use strict;
+# Remove tasks from individual author entries from AUTHORS file
+# for use in the about dialog.
+#
+# Must be called via perlnoutf.
-# Unset environment variables 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};
+my $subinfo=0;
+my $nextline;
-# Call make-authors-short2.pl in same directory, using same interpreter
+$_ = <>;
+s/\xef\xbb\xbf//; # Skip UTF-8 byte order mark
+print unless /^\n/;
-(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;
+ }
+}
diff --git a/packaging/nsis/ethereal.nsi b/packaging/nsis/ethereal.nsi
index 312223cf57..660c0f1c44 100644
--- a/packaging/nsis/ethereal.nsi
+++ b/packaging/nsis/ethereal.nsi
@@ -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"
diff --git a/perlnoutf.pl b/perlnoutf.pl
new file mode 100755
index 0000000000..9f5580fa8c
--- /dev/null
+++ b/perlnoutf.pl
@@ -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");