diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2017-11-20 11:31:18 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2017-11-20 12:44:49 +0000 |
commit | ed9d08552049d061a8951f2dee5bc7b73173c14d (patch) | |
tree | 72c68084cf2a86a31813349c49fc192a274ebee3 /epan | |
parent | 496797f0dc414ede3e0e6ac297ab7d7ed966d76a (diff) |
make-dissectors: Be more resilient with whitespace
Preemptively try to be more resilient for files with spaces in them
(for Windows).
Use newlines to separate file list. Clean up duplicate PIDL file entries.
Change-Id: Ib506cca785836e05e4665e911de0d45ab4da1165
Reviewed-on: https://code.wireshark.org/review/24507
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/CMakeLists.txt | 3 | ||||
-rw-r--r-- | epan/dissectors/Makefile.am | 2 | ||||
-rw-r--r-- | epan/dissectors/dcerpc/CMakeLists.txt | 2 | ||||
-rw-r--r-- | epan/dissectors/make-dissectors.c | 7 |
4 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/CMakeLists.txt b/epan/dissectors/CMakeLists.txt index 1f2771c3f2..9ed4b7d27b 100644 --- a/epan/dissectors/CMakeLists.txt +++ b/epan/dissectors/CMakeLists.txt @@ -1848,7 +1848,6 @@ source_group(dissector-support FILES ${DISSECTOR_SUPPORT_SRC}) set(DISSECTOR_FILES ${DISSECTOR_SRC} ${PIDL_DISSECTOR_SRC} - ${PIDL_DISSECTOR_AUTOGEN_SRC} ${ASN1_DISSECTOR_SRC} ${NCP2222_DISSECTOR_SRC} ${CUSTOM_DISSECTOR_SRC} @@ -1866,7 +1865,7 @@ target_link_libraries(make-dissectors ${GLIB2_LIBRARIES}) file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/dissectors.c.in" - CONTENT "$<JOIN:${ALL_DISSECTOR_SRC}, >" + CONTENT "$<JOIN:${ALL_DISSECTOR_SRC},\n>\n" ) add_custom_command( OUTPUT dissectors.c diff --git a/epan/dissectors/Makefile.am b/epan/dissectors/Makefile.am index 1b6d77c0bd..0d58216c47 100644 --- a/epan/dissectors/Makefile.am +++ b/epan/dissectors/Makefile.am @@ -1939,7 +1939,7 @@ x11-dissector: $(top_srcdir)/tools/process-x11-fields.pl $(srcdir)/x11-fields $( # dissectors.c: make-dissectors $(ALL_DISSECTORS_SRC) @echo Making dissectors.c - $(file >$@.in,$(filter %.c,$^)) + $(file >$@.in) $(foreach O,$(filter %.c,$^),$(file >>$@.in,$O)) $(builddir)/make-dissectors @$@.in > $@ @rm $@.in diff --git a/epan/dissectors/dcerpc/CMakeLists.txt b/epan/dissectors/dcerpc/CMakeLists.txt index 0b044e1352..f417482ea8 100644 --- a/epan/dissectors/dcerpc/CMakeLists.txt +++ b/epan/dissectors/dcerpc/CMakeLists.txt @@ -66,8 +66,6 @@ foreach(PROTOCOL_NAME IN LISTS PIDL_DISSECTOR_NAMES) ) endforeach() -set(PIDL_DISSECTOR_AUTOGEN_SRC ${PIDL_DISSECTOR_SRC} PARENT_SCOPE) - # TODO should probably just merge this into pidl-dissectors add_custom_target(idl2wrs-dissectors ALL DEPENDS ${PIDL_DISSECTOR_TARGETS}) set_target_properties(idl2wrs-dissectors diff --git a/epan/dissectors/make-dissectors.c b/epan/dissectors/make-dissectors.c index b023da7877..0fcc015207 100644 --- a/epan/dissectors/make-dissectors.c +++ b/epan/dissectors/make-dissectors.c @@ -15,6 +15,10 @@ #define ARRAY_RESERVED_SIZE 2048 +#ifndef SEP + #define SEP "\n" +#endif + GRegex *protos_regex, *handoffs_regex; static int @@ -57,7 +61,7 @@ scan_list(const char *list, GPtrArray *protos, GPtrArray *handoffs) if (!g_file_get_contents(list, &contents, NULL, NULL)) return; - for (arg = strtok(contents, " \n"); arg != NULL; arg = strtok(NULL, " \n")) { + for (arg = strtok(contents, SEP); arg != NULL; arg = strtok(NULL, SEP)) { scan_file(arg, protos, handoffs); } g_free(contents); @@ -104,7 +108,6 @@ int main(int argc, char **argv) " * \"make-dissectors\".\n" " */\n" "\n" - "#include <ws_symbol_export.h>\n" "#include <dissectors.h>\n" "\n"); |