diff options
author | Evan Huus <eapache@gmail.com> | 2014-08-02 02:11:29 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-08-02 02:14:17 +0000 |
commit | 41e322594bf5b0281e1f8ea317c1970dfc6b1954 (patch) | |
tree | ad235195b33d62700e3971a9720f25a0a8d5223b /epan/wslua | |
parent | fade4b4d97bdaaf4b5dba1da11d227d96df5fd66 (diff) |
Revert "Make Lua taps work in out-of-source-tree builds."
Breaks on windows...
This reverts commit 6b11cd97f2153bb015ade6efd05929999de85457.
Change-Id: I1caf5500da993d7988e09fc0758950469f8252cf
Reviewed-on: https://code.wireshark.org/review/3346
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/wslua')
-rw-r--r-- | epan/wslua/CMakeLists.txt | 1 | ||||
-rw-r--r-- | epan/wslua/Makefile.am | 8 | ||||
-rwxr-xr-x | epan/wslua/make-taps.pl | 16 |
3 files changed, 11 insertions, 14 deletions
diff --git a/epan/wslua/CMakeLists.txt b/epan/wslua/CMakeLists.txt index c374f2c99a..6bb30756d7 100644 --- a/epan/wslua/CMakeLists.txt +++ b/epan/wslua/CMakeLists.txt @@ -71,7 +71,6 @@ ADD_CUSTOM_COMMAND( ${CMAKE_CURRENT_SOURCE_DIR}/wslua/taps ${CMAKE_CURRENT_BINARY_DIR}/taps_wslua.c ${CMAKE_CURRENT_BINARY_DIR}/taps.txt - ${CMAKE_CURRENT_SOURCE_DIR}/wslua WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/wslua DEPENDS diff --git a/epan/wslua/Makefile.am b/epan/wslua/Makefile.am index e57f280078..85203ced2d 100644 --- a/epan/wslua/Makefile.am +++ b/epan/wslua/Makefile.am @@ -3,17 +3,17 @@ # Wireshark - Network traffic analyzer # By Gerald Combs <gerald@wireshark.org> # Copyright 1998 Gerald Combs -# +# # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -108,7 +108,7 @@ taps: $(taps_used) touch taps taps_wslua.c: make-taps.pl taps - $(PERL) $(srcdir)/make-taps.pl $(srcdir)/taps taps_wslua.c taps.txt $(srcdir) + $(PERL) $(srcdir)/make-taps.pl taps taps_wslua.c taps.txt taps.txt: taps_wslua.c diff --git a/epan/wslua/make-taps.pl b/epan/wslua/make-taps.pl index bd709aa006..0c7327fdcb 100755 --- a/epan/wslua/make-taps.pl +++ b/epan/wslua/make-taps.pl @@ -73,19 +73,19 @@ my %enums = (); sub dotap { my ($tname,$fname,$sname,@enums) = @_; my $buf = ''; - + open FILE, "< $fname"; while(<FILE>) { $buf .= $_; } close FILE; - + $buf =~ s@/\*.*?\*/@@; for my $ename (@enums) { $enums{$ename} = []; my $a = $enums{$ename}; - + my $enumre = "typedef\\s+enum[^{]*{([^}]*)}[\\s\\n]*" . ${ename} . "[\\s\\n]*;"; if ($buf =~ s/$enumre//ms ) { $types{$ename} = "/*$ename*/ lua_pushnumber(L,(lua_Number)v->%s);"; @@ -127,13 +127,13 @@ sub dotap { for my $n (sort keys %elems) { my $fmt = $types{$elems{$n}}; - + if ($fmt) { $code .= "\tlua_pushstring(L,\"$n\"); "; $code .= sprintf($fmt,$n,$n) . " lua_settable(L,-3);\n"; $doc .= "\t$n: $comments{$elems{$n}}\n"; } - + } $code .= "}\n\n"; @@ -148,7 +148,6 @@ sub dotap { open TAPSFILE, "< $ARGV[0]"; open CFILE, "> $ARGV[1]"; open DOCFILE, "> $ARGV[2]"; -my $srcdir=$ARGV[3] . "/"; print CFILE <<"HEADER"; /* This file is autogenerated from ./taps by ./make-taps.pl */ @@ -166,7 +165,6 @@ while (<TAPSFILE>) { s@#.*@@; next if /^\s*$/; my ($tname,$fname,$sname,@enums) = split /\s+/; - $fname=$srcdir . "/" . $fname; my ($c,$doc) = dotap($tname,$fname,$sname,@enums); print CFILE "#include \"$fname\"\n"; print CFILE $c; @@ -182,7 +180,7 @@ TBLHDR {"$tname", $functs{$tname} }, TBLELEM } - + print CFILE <<"TBLFTR"; {"frame",NULL}, {NULL,NULL} @@ -213,7 +211,7 @@ tap_extractor_t wslua_get_tap_extractor(const gchar* name) { for(t = tappables; t->name; t++ ) { if (g_str_equal(t->name,name)) return t->extractor; } - + return NULL; } |