summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--epan/dissectors/Makefile.am16
-rw-r--r--plugins/asn1/Makefile.am16
-rw-r--r--plugins/docsis/Makefile.am16
-rw-r--r--plugins/ethercat/Makefile.am16
-rw-r--r--plugins/gryphon/Makefile.am16
-rw-r--r--plugins/irda/Makefile.am16
-rw-r--r--plugins/m2m/Makefile.am16
-rw-r--r--plugins/mate/Makefile.am16
-rw-r--r--plugins/opcua/Makefile.am16
-rw-r--r--plugins/profinet/Makefile.am16
-rw-r--r--plugins/unistim/Makefile.am16
-rw-r--r--plugins/wimax/Makefile.am16
-rw-r--r--plugins/wimaxasncp/Makefile.am16
-rw-r--r--plugins/wimaxmacphy/Makefile.am16
-rw-r--r--tools/Makefile.am1
-rwxr-xr-xtools/make-dissector-reg146
17 files changed, 59 insertions, 314 deletions
diff --git a/configure.ac b/configure.ac
index 0ac89fc338..a5ebe540fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,6 +119,8 @@ if test ! -z "$PYTHON"; then
else
AC_MSG_RESULT(yes)
fi
+else
+ AC_MSG_ERROR(I couldn't find python; make sure it's installed and in your path)
fi
#
diff --git a/epan/dissectors/Makefile.am b/epan/dissectors/Makefile.am
index b48d3edd52..b6ea1f88af 100644
--- a/epan/dissectors/Makefile.am
+++ b/epan/dissectors/Makefile.am
@@ -97,17 +97,11 @@ x11-dissector: $(top_srcdir)/tools/process-x11-fields.pl x11-fields $(top_srcdir
# a register.c file for libwireshark.
# All subsequent arguments are the files to scan.
#
-register.c: $(plugin_src) $(ALL_DISSECTORS_SRC) Makefile.common Custom.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making register.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- dissectors $(ALL_DISSECTORS_SRC) ; \
- else \
- echo Making register.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- dissectors $(plugin_src) $(ALL_DISSECTORS_SRC) ; \
- fi
+register.c: $(plugin_src) $(ALL_DISSECTORS_SRC) Makefile.common Custom.common \
+ $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making register.c ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ dissectors $(ALL_DISSECTORS_SRC) ;
#
# Currently register.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/asn1/Makefile.am b/plugins/asn1/Makefile.am
index f7d4401fc1..643d08c336 100644
--- a/plugins/asn1/Makefile.am
+++ b/plugins/asn1/Makefile.am
@@ -81,18 +81,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/docsis/Makefile.am b/plugins/docsis/Makefile.am
index bc2d65cc97..bb38dca2e5 100644
--- a/plugins/docsis/Makefile.am
+++ b/plugins/docsis/Makefile.am
@@ -81,18 +81,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/ethercat/Makefile.am b/plugins/ethercat/Makefile.am
index 2cfe58d70b..a08336841d 100644
--- a/plugins/ethercat/Makefile.am
+++ b/plugins/ethercat/Makefile.am
@@ -81,18 +81,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/gryphon/Makefile.am b/plugins/gryphon/Makefile.am
index 67cd086582..4526d9e4f8 100644
--- a/plugins/gryphon/Makefile.am
+++ b/plugins/gryphon/Makefile.am
@@ -83,18 +83,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/irda/Makefile.am b/plugins/irda/Makefile.am
index 5af7e9cf2a..47382400af 100644
--- a/plugins/irda/Makefile.am
+++ b/plugins/irda/Makefile.am
@@ -81,18 +81,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/m2m/Makefile.am b/plugins/m2m/Makefile.am
index 15b665e1ff..35e00e349b 100644
--- a/plugins/m2m/Makefile.am
+++ b/plugins/m2m/Makefile.am
@@ -81,18 +81,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/mate/Makefile.am b/plugins/mate/Makefile.am
index 87e0ad8e3d..0d334114b2 100644
--- a/plugins/mate/Makefile.am
+++ b/plugins/mate/Makefile.am
@@ -88,18 +88,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/opcua/Makefile.am b/plugins/opcua/Makefile.am
index 4c32a3eccd..cc156aed07 100644
--- a/plugins/opcua/Makefile.am
+++ b/plugins/opcua/Makefile.am
@@ -82,18 +82,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/profinet/Makefile.am b/plugins/profinet/Makefile.am
index 719ed9cf8c..31561ac1f2 100644
--- a/plugins/profinet/Makefile.am
+++ b/plugins/profinet/Makefile.am
@@ -81,18 +81,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/unistim/Makefile.am b/plugins/unistim/Makefile.am
index 929ca44251..d6dd694354 100644
--- a/plugins/unistim/Makefile.am
+++ b/plugins/unistim/Makefile.am
@@ -82,18 +82,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/wimax/Makefile.am b/plugins/wimax/Makefile.am
index 16544e089f..8b41395b9c 100644
--- a/plugins/wimax/Makefile.am
+++ b/plugins/wimax/Makefile.am
@@ -81,18 +81,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/wimaxasncp/Makefile.am b/plugins/wimaxasncp/Makefile.am
index 49fad9d261..f8715de379 100644
--- a/plugins/wimaxasncp/Makefile.am
+++ b/plugins/wimaxasncp/Makefile.am
@@ -84,18 +84,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/plugins/wimaxmacphy/Makefile.am b/plugins/wimaxmacphy/Makefile.am
index a78814bb0c..7919fcfc9e 100644
--- a/plugins/wimaxmacphy/Makefile.am
+++ b/plugins/wimaxmacphy/Makefile.am
@@ -81,18 +81,10 @@ LIBS =
# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg \
- $(top_srcdir)/tools/make-dissector-reg.py
- @if test -n "$(PYTHON)"; then \
- echo Making plugin.c with python ; \
- $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
- plugin $(REGISTER_SRC_FILES) ; \
- else \
- echo Making plugin.c with shell script ; \
- $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
- $(plugin_src) plugin $(REGISTER_SRC_FILES) ; \
- fi
-
+plugin.c: $(REGISTER_SRC_FILES) Makefile.common $(top_srcdir)/tools/make-dissector-reg.py
+ echo Making plugin.c with python ; \
+ $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ plugin $(REGISTER_SRC_FILES) ;
#
# Currently plugin.c can be included in the distribution because
# we always build all protocol dissectors. We used to have to check
diff --git a/tools/Makefile.am b/tools/Makefile.am
index a9f34bc684..0f26c028e9 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -146,7 +146,6 @@ EXTRA_DIST = \
lex.py \
list_protos_in_cap.sh \
Makefile.nmake \
- make-dissector-reg \
make-dissector-reg.py \
make-manuf \
make-sminmpec.pl \
diff --git a/tools/make-dissector-reg b/tools/make-dissector-reg
deleted file mode 100755
index baeb41d642..0000000000
--- a/tools/make-dissector-reg
+++ /dev/null
@@ -1,146 +0,0 @@
-#! /bin/sh
-
-#
-# The first argument is the directory in which the source files live.
-#
-srcdir="$1"
-shift
-
-#
-# The second argument is either "plugin" or "dissectors"; if it's
-# "plugin", we build a plugin.c for a plugin, and if it's
-# "dissectors", we build a register.c for libwireshark.
-#
-registertype="$1"
-shift
-if [ "$registertype" = plugin ]
-then
- outfile="plugin.c"
-elif [ "$registertype" = dissectors ]
-then
- outfile="register.c"
-else
- echo "Unknown output type '$registertype'" 1>&2
- exit 1
-fi
-
-#
-# All subsequent arguments are the files to scan.
-#
-files=''
-
-for f in "$@"
-do
- # This won't work if any filenames contain spaces.
- # However, this script is called by make, which doesn't support
- # spaces either.
- if [ -f "$f" ]
- then
- files="$files $f"
- else
- files="$files $srcdir/$f"
- fi
-done
-
-
-rm -f ${outfile}-tmp
-echo '/* Do not modify this file. */' >${outfile}-tmp
-echo '/* It is created automatically by the Makefile. */'>>${outfile}-tmp
-if [ "$registertype" = plugin ]
-then
- cat <<"EOF" >>${outfile}-tmp
-#include "config.h"
-
-#include <gmodule.h>
-
-#include "moduleinfo.h"
-/* plugins are DLLs */
-#define WS_BUILD_DLL
-#include "ws_symbol_export.h"
-
-#ifndef ENABLE_STATIC
-WS_DLL_PUBLIC_DEF const gchar version[] = VERSION;
-
-/* Start the functions we need for the plugin stuff */
-
-WS_DLL_PUBLIC_DEF void
-plugin_register (void)
-{
-EOF
- #
- # Build code to call all the protocol registration routines.
- #
- grep '^proto_register_[a-z_0-9A-Z]* *(' $files 2>/dev/null | grep -v ';' \
- | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp
-
- grep '^void proto_register_[a-z_0-9A-Z]* *(' $files 2>/dev/null | grep -v ';' \
- | sed -e 's/^.*://' -e 's/^void \([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp
-else
- cat <<"EOF" >>${outfile}-tmp
-#include "register.h"
-void
-register_all_protocols(register_cb cb, gpointer client_data)
-{
-EOF
- #
- # Build code to call all the protocol registration routines.
- #
- grep '^proto_register_[a-z_0-9A-Z]* *(' $files 2>/dev/null | grep -v ';' \
- | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); if(cb) (*cb)(RA_REGISTER, \"\1\", client_data); \1 ();}/' >>${outfile}-tmp
-
- grep '^void proto_register_[a-z_0-9A-Z]* *(' $files 2>/dev/null | grep -v ';' \
- | sed -e 's/^.*://' -e 's/^void \([a-z_0-9A-Z]*\).*/ {extern void \1 (void); if(cb) (*cb)(RA_REGISTER, \"\1\", client_data); \1 ();}/' >>${outfile}-tmp
-
-fi
-echo '}' >>${outfile}-tmp
-
-
-#
-# Build code to call all the protocol handoff registration routines.
-#
-if [ "$registertype" = plugin ]
-then
- cat <<"EOF" >>${outfile}-tmp
-WS_DLL_PUBLIC_DEF void
-plugin_reg_handoff(void)
-{
-EOF
- grep '^proto_reg_handoff_[a-z_0-9A-Z]* *(' $files 2>/dev/null | grep -v ';' \
- | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp
-
- grep '^void proto_reg_handoff_[a-z_0-9A-Z]* *(' $files 2>/dev/null | grep -v ';' \
- | sed -e 's/^.*://' -e 's/^void \([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp
-else
- cat <<"EOF" >>${outfile}-tmp
-void
-register_all_protocol_handoffs(register_cb cb, gpointer client_data)
-{
-EOF
- grep '^proto_reg_handoff_[a-z_0-9A-Z]* *(' $files 2>/dev/null | grep -v ';' \
- | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); if(cb) (*cb)(RA_HANDOFF, \"\1\", client_data); \1 ();}/' >>${outfile}-tmp
-
- grep '^void proto_reg_handoff_[a-z_0-9A-Z]* *(' $files 2>/dev/null | grep -v ';' \
- | sed -e 's/^.*://' -e 's/^void \([a-z_0-9A-Z]*\).*/ {extern void \1 (void); if(cb) (*cb)(RA_HANDOFF, \"\1\", client_data); \1 ();}/' >>${outfile}-tmp
-fi
-echo '}' >>${outfile}-tmp
-if [ "$registertype" = plugin ]
-then
- echo '#endif' >>${outfile}-tmp
-else
- cat <<"EOF" >>${outfile}-tmp
-gulong register_count(void)
-{
-EOF
- proto_regs=`grep -c RA_REGISTER ${outfile}-tmp`
- handoff_regs=`grep -c RA_HANDOFF ${outfile}-tmp`
- echo " return $proto_regs + $handoff_regs;" >>${outfile}-tmp
- echo '}' >>${outfile}-tmp
-fi
-
-# Only overwrite outfile if it differs from newly generated file
-if cmp -s ${outfile}-tmp ${outfile}
-then
- rm ${outfile}-tmp
-else
- mv ${outfile}-tmp ${outfile}
-fi