aboutsummaryrefslogtreecommitdiffstats
path: root/make-reg-dotc
diff options
context:
space:
mode:
authorEd Warnicke <hagbard@physics.rutgers.edu>2001-07-08 21:51:34 +0000
committerEd Warnicke <hagbard@physics.rutgers.edu>2001-07-08 21:51:34 +0000
commitde98ec2efa11e0d31344de3231acffcf6d16bbd5 (patch)
treec4549235ff8beec4866db90728a823c7bf80b0a0 /make-reg-dotc
parentbf877ca5c5adafe44fe93da79835806c0d6f8e10 (diff)
Fixed the {tethereal,ethereal}_static targets so that the
static binaries have the dissectors provided in the plugins available. svn path=/trunk/; revision=3665
Diffstat (limited to 'make-reg-dotc')
-rwxr-xr-xmake-reg-dotc33
1 files changed, 20 insertions, 13 deletions
diff --git a/make-reg-dotc b/make-reg-dotc
index 2c70aefba7..bfa35984fe 100755
--- a/make-reg-dotc
+++ b/make-reg-dotc
@@ -1,7 +1,14 @@
#! /bin/sh
#
-# The first argument is the directory in which the source files live.
+# The first argument is the output filename.
+#
+
+outfile="$1"
+shift
+
+#
+# The second argument is the directory in which the source files live.
#
srcdir="$1"
shift
@@ -9,15 +16,15 @@ shift
#
# All subsequent arguments are the files to scan.
#
-rm -f register.c-tmp
-echo '/* Do not modify this file. */' >register.c-tmp
-echo '/* It is created automatically by the Makefile. */'>>register.c-tmp
+rm -f ${outfile}-tmp
+echo '/* Do not modify this file. */' >${outfile}-tmp
+echo '/* It is created automatically by the Makefile. */'>>${outfile}-tmp
echo '#include "register.h"' >>register.c-tmp
#
# Build code to call all the protocol registration routines.
#
-echo 'void register_all_protocols(void) {' >>register.c-tmp
+echo 'void register_all_protocols(void) {' >>${outfile}-tmp
for f in "$@"
do
if [ -f $f ]
@@ -27,7 +34,7 @@ do
srcfile=$srcdir/$f
fi
grep '^proto_register_[a-z_0-9A-Z]* *(' $srcfile 2>/dev/null | grep -v ';'
-done | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>register.c-tmp
+done | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp
for f in "$@"
do
if [ -f $f ]
@@ -37,13 +44,13 @@ do
srcfile=$srcdir/$f
fi
grep '^void proto_register_[a-z_0-9A-Z]* *(' $srcfile 2>/dev/null | grep -v ';'
-done | sed -e 's/^.*://' -e 's/^void \([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>register.c-tmp
-echo '}' >>register.c-tmp
+done | sed -e 's/^.*://' -e 's/^void \([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp
+echo '}' >>${outfile}-tmp
#
# Build code to call all the protocol handoff registration routines.
#
-echo 'void register_all_protocol_handoffs(void) {' >>register.c-tmp
+echo 'void register_all_protocol_handoffs(void) {' >>${outfile}-tmp
for f in "$@"
do
if [ -f $f ]
@@ -53,7 +60,7 @@ do
srcfile=$srcdir/$f
fi
grep '^proto_reg_handoff_[a-z_0-9A-Z]* *(' $srcfile 2>/dev/null | grep -v ';'
-done | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>register.c-tmp
+done | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp
for f in "$@"
do
if [ -f $f ]
@@ -63,6 +70,6 @@ do
srcfile=$srcdir/$f
fi
grep '^void proto_reg_handoff_[a-z_0-9A-Z]* *(' $srcfile 2>/dev/null | grep -v ';'
-done | sed -e 's/^.*://' -e 's/^void \([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>register.c-tmp
-echo '}' >>register.c-tmp
-mv register.c-tmp register.c
+done | sed -e 's/^.*://' -e 's/^void \([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp
+echo '}' >>${outfile}-tmp
+mv ${outfile}-tmp ${outfile}