aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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 /plugins
parent008d0d6c0062c83706d53ce43e71402888ce5e44 (diff)
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
Diffstat (limited to 'plugins')
-rw-r--r--plugins/docsis/Makefile.am4
-rw-r--r--plugins/docsis/Makefile.nmake45
2 files changed, 27 insertions, 22 deletions
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