summaryrefslogtreecommitdiff
path: root/ui/cli
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2012-09-18 15:15:39 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2012-09-18 15:15:39 +0000
commitc7fa2f0b6f8937799f97982e60a6260112bf5e3f (patch)
treee7d07e774d837a320d8aaed2fbcd165fd0466a27 /ui/cli
parenta97731bbcbcca96b77efffb86de0500503cef2fc (diff)
downloadwireshark-c7fa2f0b6f8937799f97982e60a6260112bf5e3f.tar.gz
If we have PYTHON use make-tap-reg.py (in both autofoo and Windows): it's
slightly faster than the old shell-script version on *NIX and it seems significantly faster on Windows. svn path=/trunk/; revision=44972
Diffstat (limited to 'ui/cli')
-rw-r--r--ui/cli/Makefile.am11
-rw-r--r--ui/cli/Makefile.nmake17
2 files changed, 22 insertions, 6 deletions
diff --git a/ui/cli/Makefile.am b/ui/cli/Makefile.am
index 13e0c00f3d..4fd3776efd 100644
--- a/ui/cli/Makefile.am
+++ b/ui/cli/Makefile.am
@@ -52,9 +52,14 @@ MAINTAINERCLEANFILES = \
# The first argument is the directory in which the source files live.
# All subsequent arguments are the files to scan.
#
-tshark-tap-register.c: $(TSHARK_TAP_SRC) $(top_srcdir)/tools/make-tapreg-dotc
- @echo Making tshark-tap-register.c
- @$(top_srcdir)/tools/make-tapreg-dotc tshark-tap-register.c $(srcdir) $(TSHARK_TAP_SRC)
+tshark-tap-register.c: $(TSHARK_TAP_SRC) $(top_srcdir)/tools/make-tapreg-dotc $(top_srcdir)/tools/make-tap-reg.py
+ @if test -n "$(PYTHON)"; then \
+ echo Making tshark-tap-register.c with python; \
+ $(PYTHON) $(top_srcdir)/tools/make-tap-reg.py $(srcdir) tshark-taps $(TSHARK_TAP_SRC); \
+ else \
+ echo Making tshark-tap-register.c; \
+ $(top_srcdir)/tools/make-tapreg-dotc tshark-tap-register.c $(srcdir) $(TSHARK_TAP_SRC); \
+ fi
# All sources that should be put in the source distribution tarball
libcliui_a_SOURCES = \
diff --git a/ui/cli/Makefile.nmake b/ui/cli/Makefile.nmake
index 3264b08822..e32645b12f 100644
--- a/ui/cli/Makefile.nmake
+++ b/ui/cli/Makefile.nmake
@@ -41,21 +41,32 @@ libcliui.lib : ..\..\config.h $(TSHARK_TAP_OBJECTS) tshark-tap-register.obj
#
# We do this by grepping through sources.
#
+# 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.
+#
# Formatting conventions: The name of the tap_listener_register_*
# routines must start in column zero, or must be preceded only by
# "void " starting in column zero, and must not be inside #if.
#
+!IFDEF PYTHON
+tshark-tap-register.c: $(TSHARK_TAP_SRC) ..\..\tools\make-tap-reg.py
+ @echo Making tshark-tap-register.c using python
+ @$(PYTHON) ..\..\tools\make-tap-reg.py . tshark-taps $(TSHARK_TAP_SRC)
+!ELSE
# The first argument is the name of the file to write.
# The second argument is the directory in which the source files live.
# All subsequent arguments are the files to scan.
-#
tshark-tap-register.c: $(TSHARK_TAP_SRC) ..\..\tools\make-tapreg-dotc
@echo Making tshark-tap-register.c
@$(SH) ../../tools/make-tapreg-dotc tshark-tap-register.c . $(TSHARK_TAP_SRC)
+!ENDIF
clean:
- rm -f $(TSHARK_TAP_OBJECTS) tshark-tap-register.obj libcliui.lib *.pdb *.sbr \
- doxygen.cfg html/*.* wireshark-tap-register-cache.pkl
+ rm -f $(TSHARK_TAP_OBJECTS) tshark-tap-register.obj libcliui.lib *.pdb \
+ *.sbr doxygen.cfg html/*.* tshark-tap-register-cache.pkl \
+ tshark-tap-register.c-tmp
if exist html rmdir html
distclean: clean