Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compile option overrides #18

Merged
merged 5 commits into from
Jun 21, 2023
Merged

Conversation

sebastiw
Copy link
Collaborator

@sebastiw sebastiw commented Nov 19, 2022

CLOSES: #8

Option to override configuration per file or match pattern.

One can now specify a list of tuples with some file-pattern and the overrides it should do for that file-pattern.
Use {file, Filename} for overriding specific files, and {re, Regex} to override for all files with full path matching the regex.

Example for including another directory when compiling asn1s with similar names but different content.

{asn1_args, [
   ....
  {overrides, [
    {{file, "CAP_PHASE1.set.asn1"}, [{compile_opts, [{i, "cap_v1/"}]}]},
    {{file, "CAP_PHASE2.set.asn1"}, [{compile_opts, [{i, "cap_v2/"}]}]}
]}.

Example if the user has a directory structure containing files with different encoding.

{asn1_args, [
   ....
  {overrides, [
    {{re, "/per-files/"}, [{encoding, per}]},
    {{re, "/uper-files/"}, [{encoding, uper}]}                     
]}.

e.g. for directory structure:

  • project/asn1/per-files
  • project/asn1/ber-files
  • project/asn1/uper-files

@knusbaum knusbaum merged commit 2ade47c into knusbaum:master Jun 21, 2023
@sebastiw sebastiw deleted the file-override branch August 14, 2023 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure the ASN.1 compiler differently for different ASN.1 files
2 participants