summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-04-19 09:52:23 +0000
committerGuy Harris <guy@alum.mit.edu>2006-04-19 09:52:23 +0000
commit0c873b006a429833220602791e7d6be72b4d5977 (patch)
treecbf7a66fc2ed2628f4b122293c3b29030d3098e7
parent008d0d6c0062c83706d53ce43e71402888ce5e44 (diff)
downloadwireshark-0c873b006a429833220602791e7d6be72b4d5977.tar.gz
Update comments.
Fix the Makefile.nmake files to pass the output type argument to make-reg-dotc or make-reg-dotc.py. Make tools/make-reg-dotc executable. svn path=/trunk/; revision=17904
-rw-r--r--epan/dissectors/Makefile.am6
-rw-r--r--epan/dissectors/Makefile.nmake45
-rw-r--r--plugins/docsis/Makefile.am4
-rw-r--r--plugins/docsis/Makefile.nmake45
-rwxr-xr-x[-rw-r--r--]tools/make-reg-dotc0
5 files changed, 55 insertions, 45 deletions
diff --git a/epan/dissectors/Makefile.am b/epan/dissectors/Makefile.am
index aeeed1dcb9..cbe866d647 100644
--- a/epan/dissectors/Makefile.am
+++ b/epan/dissectors/Makefile.am
@@ -73,6 +73,10 @@ x11-declarations.h x11-register-info.h: $(PROC_X11_FIELDS) $(X11_FIELDS)
# reason.
#
# Therefore, we have a script to generate the register.c file.
+# The shell script runs slowly, as multiple greps and seds are run
+# for each input file; this is especially slow on Windows. Therefore,
+# if Python is present (as indicated by PYTHON being defined), we run
+# a faster Python script to do that work instead.
#
# The first argument is the directory in which the source files live.
# The second argument is "dissectors", to indicate that we should build
@@ -88,7 +92,7 @@ register.c: $(plugin_src) $(DISSECTOR_SRC) $(top_srcdir)/tools/make-reg-dotc \
else \
echo Making register.c with shell script ; \
$(top_srcdir)/tools/make-reg-dotc $(srcdir) \
- $(plugin_src) dissectors $(DISSECTOR_SRC) ; \
+ dissectors $(plugin_src) $(DISSECTOR_SRC) ; \
fi
#
diff --git a/epan/dissectors/Makefile.nmake b/epan/dissectors/Makefile.nmake
index 2573ee27bd..36fb60cb9c 100644
--- a/epan/dissectors/Makefile.nmake
+++ b/epan/dissectors/Makefile.nmake
@@ -40,44 +40,45 @@ x11-declarations.h x11-register-info.h: x11-fields process-x11-fields.pl
$(PERL) process-x11-fields.pl <x11-fields
#
-# Build "register.c", which contains a function "register_all_protocols()"
-# that calls the register routines for all protocols.
+# Build register.c, which contains a function register_all_protocols()
+# that calls the register routines for all protocols and a function
+# register_all_protocol_handoffs() that calls the handoff registration
+# routines for all protocols.
#
-# We do this by grepping through sources. If that turns out to be too slow,
+# We do this by scanning through sources. If that turns out to be too slow,
# maybe we could just require every .o file to have an register routine
# of a given name (packet-aarp.o -> proto_register_aarp, etc.).
#
-# Formatting conventions: The name of the proto_register_* routines must
-# start in column zero, or must be preceded only by "void " starting in
-# column zero, and must not be inside #if.
+# Formatting conventions: The name of the proto_register_* routines an
+# proto_reg_handoff_* routines must start in column zero, or must be
+# preceded only by "void " starting in column zero, and must not be
+# inside #if.
#
-# We assume that all dissector routines are in "packet-XXX.c" files.
+# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
-# to scan all the "packet-XXX.c" files doesn't work with some "make"s;
-# they seem to pass only the first few names in the list to the shell,
-# for some reason.
+# to scan all the files doesn't work with some "make"s; they seem to
+# pass only the first few names in the list to the shell, for some
+# reason.
#
-# Therefore, we have a script to generate the "register.c" file.
+# Therefore, we have a script to generate the register.c file.
+# The shell script runs slowly, as multiple greps and seds are run
+# for each input file; this is especially slow on Windows. Therefore,
+# if Python is present (as indicated by PYTHON being defined), we run
+# a faster Python script to do that work instead.
#
-# The first argument is the name of the file to write.
-# The second argument is the directory in which the source files live.
+# The first argument is the directory in which the source files live.
+# The second argument is "dissectors", to indicate that we should build
+# a register.c file for libethereal.
# All subsequent arguments are the files to scan.
#
-# On Windows, however, that script runs slowly, as multiple greps
-# and seds are run for each input file, so, if Python is present
-# (as indicated by PYTHON being defined), we run a faster Python
-# script to do that work instead. That script doesn't take the name
-# of the file to write as an argument; it always writes to
-# "register.c".
-#
register.c: $(DISSECTOR_SRC)
!IFDEF PYTHON
@echo Making register.c (using python)
- @$(PYTHON) ../../tools/make-reg-dotc.py . $(DISSECTOR_SRC)
+ @$(PYTHON) ../../tools/make-reg-dotc.py . dissectors $(DISSECTOR_SRC)
!ELSE
@echo Making register.c (using sh)
- @$(SH) ../../tools/make-reg-dotc register.c . $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-reg-dotc . dissectors $(DISSECTOR_SRC)
!ENDIF
packet-ncp2222.c : ncp2222.py
diff --git a/plugins/docsis/Makefile.am b/plugins/docsis/Makefile.am
index d92815478d..bcf6f4f10f 100644
--- a/plugins/docsis/Makefile.am
+++ b/plugins/docsis/Makefile.am
@@ -65,6 +65,10 @@ LIBS =
# reason.
#
# Therefore, we have a script to generate the plugin.c file.
+# The shell script runs slowly, as multiple greps and seds are run
+# for each input file; this is especially slow on Windows. Therefore,
+# if Python is present (as indicated by PYTHON being defined), we run
+# a faster Python script to do that work instead.
#
# The first argument is the directory in which the source files live.
# The second argument is "plugin", to indicate that we should build
diff --git a/plugins/docsis/Makefile.nmake b/plugins/docsis/Makefile.nmake
index 891cf6442e..2f1f8e55c2 100644
--- a/plugins/docsis/Makefile.nmake
+++ b/plugins/docsis/Makefile.nmake
@@ -28,44 +28,45 @@ docsis.dll docsis.exp docsis.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
$(GLIB_LIBS)
#
-# Build "register.c", which contains a function "register_all_protocols()"
-# that calls the register routines for all protocols.
+# Build plugin.c, which contains the plugin version[] string, a
+# function plugin_register() that calls the register routines for all
+# protocols, and a function plugin_reg_handoff() that calls the handoff
+# registration routines for all protocols.
#
-# We do this by grepping through sources. If that turns out to be too slow,
+# We do this by scanning sources. If that turns out to be too slow,
# maybe we could just require every .o file to have an register routine
# of a given name (packet-aarp.o -> proto_register_aarp, etc.).
#
-# Formatting conventions: The name of the proto_register_* routines must
-# start in column zero, or must be preceded only by "void " starting in
-# column zero, and must not be inside #if.
+# Formatting conventions: The name of the proto_register_* routines an
+# proto_reg_handoff_* routines must start in column zero, or must be
+# preceded only by "void " starting in column zero, and must not be
+# inside #if.
#
-# We assume that all dissector routines are in "packet-XXX.c" files.
+# DISSECTOR_SRC is assumed to have all the files that need to be scanned.
#
# For some unknown reason, having a big "for" loop in the Makefile
-# to scan all the "packet-XXX.c" files doesn't work with some "make"s;
-# they seem to pass only the first few names in the list to the shell,
-# for some reason.
+# to scan all the files doesn't work with some "make"s; they seem to
+# pass only the first few names in the list to the shell, for some
+# reason.
#
-# Therefore, we have a script to generate the "register.c" file.
+# Therefore, we have a script to generate the plugin.c file.
+# The shell script runs slowly, as multiple greps and seds are run
+# for each input file; this is especially slow on Windows. Therefore,
+# if Python is present (as indicated by PYTHON being defined), we run
+# a faster Python script to do that work instead.
#
-# The first argument is the name of the file to write.
-# The second argument is the directory in which the source files live.
+# The first argument is the directory in which the source files live.
+# The second argument is "plugin", to indicate that we should build
+# a plugin.c file for a plugin.
# All subsequent arguments are the files to scan.
#
-# On Windows, however, that script runs slowly, as multiple greps
-# and seds are run for each input file, so, if Python is present
-# (as indicated by PYTHON being defined), we run a faster Python
-# script to do that work instead. That script doesn't take the name
-# of the file to write as an argument; it always writes to
-# "register.c".
-#
register.c: $(DISSECTOR_SRC)
!IFDEF PYTHON
@echo Making register.c (using python)
- @$(PYTHON) ../../tools/make-reg-dotc.py . $(DISSECTOR_SRC)
+ @$(PYTHON) ../../tools/make-reg-dotc.py . plugin $(DISSECTOR_SRC)
!ELSE
@echo Making register.c (using sh)
- @$(SH) ../../tools/make-reg-dotc register.c . $(DISSECTOR_SRC)
+ @$(SH) ../../tools/make-reg-dotc . plugin $(DISSECTOR_SRC)
!ENDIF
!ENDIF
diff --git a/tools/make-reg-dotc b/tools/make-reg-dotc
index b1b57e0ce2..b1b57e0ce2 100644..100755
--- a/tools/make-reg-dotc
+++ b/tools/make-reg-dotc