Wireshark-dev: [Wireshark-dev] Huge command-line in tools/make-dissector-reg.py

From: Gisle Vanem <gvanem@xxxxxxxxxxxx>
Date: Tue, 16 Oct 2012 13:55:37 +0200
I'm running into problems with the huge command-line passed to my shell in generating register.c (I'm using a home-made build-system for the MSVC version of Wireshark ... based on Mingw-make/Msys sh). So can you please accept this patch to use a response-file in tools/make-dissector-reg.py?

--- SVN-Latest\tools\make-dissector-reg.py      2012-09-25 10:22:34.375000000 +0200
+++ tools\make-dissector-reg.py 2012-10-16 13:39:18.656250000 +0200
@@ -63,9 +63,17 @@


#
-# All subsequent arguments are the files to scan.
+# If last arg is '@resp_file', read the list of files
+# from this response-file. Otherwise
+# all subsequent arguments are the files to scan.
#
-files = sys.argv[3:]
+if sys.argv[3][0] == '@':
+  resp_file = sys.argv[3][1:]
+  print ("Reading response file: %s " % resp_file)
+  file = open(resp_file,'r')
+  files = file.read().split()
+else:
+  files = sys.argv[3:]

# Create the proper list of filenames
filenames = []


--gv