Skip to content

ifdef NO_FEATURE vs ifeq ($(NO_FEATURE), 1) #1422

Closed
@christoph-conrads

Description

@christoph-conrads

At compile time, you can enable and disable features by giving parameters to make (or exporting environment variables) such as NO_SHARED, NO_STATIC, and NOFORTRAN. In Makefile, the variables are sometimes treated as booleans, e.g., Makefile, line 133-144, sometimes their existence is checked, e.g., Makefile:88.

Which of these operations is correct?

I strongly prefer the interpretation as booleans because I find definitions like NO_SHARED=1 very suggestive of booleans. In fact, I report this issue because I have a script that broke when it called make with NO_SHARED=0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions