Commit Graph

14 Commits

Author SHA1 Message Date
Joakim Karlsson 5b8cb733fa asn2wrs: disable line directive by default
To debug with line directive build with -DENABLE_DEBUG_A2W=ON flag
2022-11-30 11:03:09 +00:00
Peter Wu e9f7bb5127 Require Python 3, drop Python 2 support
Python 3 is widely available. All major Linux distributions support it.
RHEL is covered via EPEL (which is already required for cmake3). Drop
support for Python 2 in order to reduce maintenance costs. The main
motivation is being able to simplify the tests.

CMake is updated to search for Python >= 3.4 and will fail if
unavailable (generating dissectors.c requires Python, so it is quite an
important piece to have).

The documentation is updated to reflect the Python 3.7 paths used by
Chocolatey. Tested the git-review installation instructions in Windows 7
x64 without a previous Chocolatey installation.

macOS brew now installs Python 3 (its dependencies are already installed
by python@2 for libxml2). The macOS (non-brew variant) is updated to use
the official 64-bit installer to install Python 3.

Change-Id: I80b1e36957f338e0dad1bfcc173b6418682cddba
Reviewed-on: https://code.wireshark.org/review/30192
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-07 20:46:59 +00:00
Gerald Combs 1e41221f31 CMake: Find asn2wrs.py once.
Load LocatePythonModule and use it to find asn2wrs once instead of every
time we cal the ASN2WRS function. This reduces the cmake run time by
about 3 to 4 seconds here.

Change-Id: I85f7dcca0b5891c9b4b23a76d017f8e504d6af60
Reviewed-on: https://code.wireshark.org/review/14614
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-24 18:41:39 +00:00
Peter Wu a198f47c06 cmake: add asn1 target, avoid unnecessary rebuilds
Add an "asn1" build target that rebuilds all ASN.1 dissectors.

Do not always generate the ASN.1 dissector when invoking the
"generate_dissector-PROTO" target. Use a special "packet-PROTO-stamp"
file to detect whether the dissector is out of date.

This indirection is needed because cmake removes output files from
add_custom_command in the clean target, but we would like to keep the
generated packet-PROTO.c files.

Make all EXTRA_CNF and EXPORT_DEPENDS point to absolute paths for
generated exported configs (PROTO-exp.cnf). This is done by automake too
and is needed for proper dependency tracking. Example: when h225.cnf is
updated, h225-exp.cnf needs to be generated. That is the purpose of the
"generate-h225-exp.cnf" target. Now h235 (and other) dissectors need to
be regenerated as well because the h225-exp.cnf is updated. This is why
there is a separate add_custom_command and add_custom_target.

Change-Id: I8cfc1f8f43cea595267b21eae30b4548f3407c0b
Reviewed-on: https://code.wireshark.org/review/12080
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-26 12:37:21 +00:00
Joerg Mayer 0a28aa4a1d Revert commit cc8ed845ed
Author: Maarten Bezemer <maarten.bezemer@gmail.com>
Date:   Wed Nov 12 13:39:07 2014 +0100

    Invoke asn2wrs.py using a custom command

Fixes  bugid 11304

Once there is a better solution feel free to revert the revert.

Change-Id: Id64b621c5f3b8a934ce9ec5c3c127326efab46f2
Reviewed-on: https://code.wireshark.org/review/9122
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-06-25 07:40:05 +00:00
Maarten Bezemer a73b89bec1 Use LocatePythonModule to locate asn2wrs.py
This reuses existing functionality and thereby making FindAsn2Wrs.cmake obsolete, resulting in a reduction of the cmake module maintaince load

Change-Id: Ic6ae53e65236246c0cbe86f8c2f066a2d034e0b9
Reviewed-on: https://code.wireshark.org/review/5805
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-18 07:43:22 +00:00
Maarten Bezemer cc8ed845ed Invoke asn2wrs.py using a custom command
A custom target is defined to be always invalid, so asn2wrs.py is always invoked.
A custom command is able to convert input file(s) into output file(s), the actual command is only invoked in the provided dependencies are changed.
As an advantage the dependencies are correct, so cmake is able to determine when the output file is required, so it can be build in time.

Change-Id: I84be5d408cfc87cf88d67b6073bea439febbe712
Reviewed-on: https://code.wireshark.org/review/5255
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-17 09:05:59 +00:00
Maarten Bezemer a1d4c0a792 Do not force the output directory
For out of source builds, the output directory should not point to wireshark source locations.
By default it does point to the wireshark source directory (to stay compatible with the build in dissectors).
When the A2W_OUTPUT_DIR variable is set to "_EMPTY_" the output lcoation argument (-O) is not invoked.
Use A2W_FLAGS to set an output location for out of source builds (or use A2W_OUTPUT_DIR, which has the same result)

Change-Id: I48b7486fcda982f0dce57cde3beacb99f946abd9
Reviewed-on: https://code.wireshark.org/review/5254
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-17 09:05:34 +00:00
Maarten Bezemer fb01f59e69 Use FindAsn2Wrs to find asn2wrs.py
A first step to make it possible to reuse the UseAsn2Wrs for out of source builds.

Change-Id: Iefb34f943e06db3d6afed55ab69d3f26aa9d633d
Reviewed-on: https://code.wireshark.org/review/5253
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-17 09:05:03 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Jörg Mayer fb834104e5 When building packet-dap.c on an empty build tree, packet-dap.c would
be incorrect on the first pass and only be correct when remade.
The reason was that disp-exp.cnf was created incorrectly on first pass.
disp-exp.cnf required dop-exp.cnf to build correctly, so add a mechanism
to add dependencies for export files.

Note: Only the cmake change has been tested, the autofoo stuff requires
  testing.

svn path=/trunk/; revision=52120
2013-09-17 18:02:25 +00:00
Jörg Mayer eab4f3893d Remove generating .cnf files from all target. They will
be generated when needed.

svn path=/trunk/; revision=49241
2013-05-11 10:53:04 +00:00
Jörg Mayer 1d5891111e Make exports actaully work
Add ansi_map as first generated file that uses exports (from gsm_map in
  this case).

svn path=/trunk/; revision=49195
2013-05-07 03:59:29 +00:00
Jörg Mayer 5ba458916a Move common code into UseAsn2Wrs.cmake.
Include the new file.
Use the new file.
Add cmake support to rebuild the gsm_map dissector.

svn path=/trunk/; revision=49194
2013-05-07 03:25:49 +00:00