On 15/05/20 23:46, Richard Sharpe wrote:
On Fri, May 15, 2020 at 3:33 PM Peter Wu <peter@xxxxxxxxxxxxx> wrote:
The "asn1" target rebuilds all asn1 dissectors.
Alternatively to rebuild a specific one, use a target such as "generate_dissector-pkcs1".
Sure, but there seems to be multiple issues.
1. The 'documented' command placed in the generated source does not
generate the same source:
The reason for this difference is the dependency of pkcs1 on
x509af-exp.cnf. Because of that invoking asn2wrs manually is unlikely to
work.
If you use a verbose build (make VERBOSE=1 generate_dissector-pkcs1)
you'll see the command being used is the same, except cmake uses
absolute paths.
2. make asn1 modifies the source directory, but it seems to me that it
should not do that because that breaks one of the out-of-tree
guarantees that cmake gives you.
Example:
mkdir build
cd build
cmake ..
cmake --build . --target generate_dissector-pkcs1
Or if you use ninja:
mkdir build
cd build
cmake -GNinja ..
ninja generate_dissector-pkcs1