Index: cmake/modules/UseMakeDissectorReg.cmake
===================================================================
--- cmake/modules/UseMakeDissectorReg.cmake	(revision 53524)
+++ cmake/modules/UseMakeDissectorReg.cmake	(working copy)
@@ -2,7 +2,18 @@
 # $Id$
 #
 MACRO(REGISTER_DISSECTOR_FILES _outputfile _registertype )
-	set( _sources ${ARGN} )
+	if(${_registertype} STREQUAL "dissectors" )
+	    set( _makeregistertype "dissectorsinfile" )
+  	    set( _ftmp "${CMAKE_CURRENT_BINARY_DIR}/_regc.tmp" )
+  	    file(REMOVE ${_ftmp})
+  	    foreach(f ${ARGN})
+	      file(APPEND ${_ftmp} "${f}\n")
+	    endforeach()
+	    set( _sources ${_ftmp} )
+	elseif()
+	    set( _makeregistertype ${_registertype} )
+  	    set( _sources ${ARGN} )
+	endif()
 	ADD_CUSTOM_COMMAND(
 	    OUTPUT
 	      ${_outputfile}
@@ -9,7 +20,7 @@
 	    COMMAND ${PYTHON_EXECUTABLE}
 	      ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
 	      ${CMAKE_CURRENT_SOURCE_DIR}
-	      ${_registertype}
+	      ${_makeregistertype}
 	      ${_sources}
 	    DEPENDS
 	      ${_sources}
Index: tools/make-dissector-reg.py
===================================================================
--- tools/make-dissector-reg.py	(revision 53524)
+++ tools/make-dissector-reg.py	(working copy)
@@ -32,7 +32,7 @@
 # "dissectors", we build a register.c for libwireshark.
 #
 registertype = sys.argv[2]
-if registertype == "plugin" or registertype == "plugin_wtap":
+if registertype in ("plugin", "plugin_wtap"):
 	final_filename = "plugin.c"
 	cache_filename = None
 	preamble = """\
@@ -42,7 +42,7 @@
  * Generated automatically from %s.
  */
 """ % (sys.argv[0])
-elif registertype == "dissectors":
+elif registertype in ("dissectors", "dissectorsinfile"):
 	final_filename = "register.c"
 	cache_filename = "register-cache.pkl"
 	preamble = """\
@@ -64,10 +64,19 @@
 
 
 #
-# All subsequent arguments are the files to scan.
+# All subsequent arguments are the files to scan
+# or the name of a file containing the files to scan
 #
-files = sys.argv[3:]
-
+if registertype == "dissectorsinfile":
+	try:
+		with open(sys.argv[3]) as f:
+			files = [line.rstrip() for line in f]
+	except IOError:
+	    print(("Unable to open input file '%s'" % sys.argv[3]))
+	    sys.exit(1)
+else:
+	files = sys.argv[3:]
+	
 # Create the proper list of filenames
 filenames = []
 for file in files:
