Skip to content

Add support for the GNU Bison option -H #4327

Closed

Description

@piotrsiupa

SCons doesn't recognize the option -H.
It should update the list of output files when the option is encountered. The option -H is the same as --header or --defines which are currently supported. (Well, kinda. See: #4326)
(https://www.gnu.org/software/bison/manual/bison.html#Output-Files)

  • Link to SCons Users thread discussing your issue. - https://discord.com/channels/571796279483564041/571796280146133047/1087434623476301836
  • Version of SCons - v4.5.1.49578b34582d9e92dac7d713a8e58599ae35aa63
  • Version of Python - 3.10.6
  • Which python distribution if applicable (python.org, cygwin, anaconda, macports, brew,etc) - the one from Ubuntu repository
  • How you installed SCons - through pip
  • What Platform are you on? (Linux/Windows and which version) - Linux Mint
  • How to reproduce your issue? Please include a small self contained reproducer. Likely a SConstruct should do for most issues. - it's below
  • How you invoke scons (The command line you're using "scons --flags some_arguments") - scons
targets = CFile('foo.y', YACCFLAGS='-d')
print('Flag `-d` (correct target list):', targets)

targets = CFile('bar.y', YACCFLAGS='-H')
print('Flag `-H` (incorrect target list):', targets)

Activity

  1. mwichmann commented on Mar 20, 2023

    @mwichmann
    Collaborator

    Seems "obvious", but it's a little harder to parse: --header (and its now-obsolete synonym --defines) use an = to indicate there's a following option-argument (filename). -H does not, you have to just concatenate the filename directly with the option (same for -g).

  2. added
    Tools
    on Mar 20, 2023
  3. added a commit that references this issue on Mar 23, 2023
    3ec6fbf
  4. added a commit that references this issue on May 6, 2023
    7ddeb16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Tools

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions