Skip to content

configure sometimes saves same key multiple times in config.mk with differing values #17887

Closed
@pnkfelix

Description

@pnkfelix

I don't mind our configure script, but it definitely has occasional warts.

For example, if I do: % ../configure --enable-local-rust --local-rust-root=/nonexistant
then I get a config.mk with the following:

CFG_ENABLE_LOCAL_RUST := 1
CFG_PREFIX           := /usr/local
CFG_LOCAL_RUST_ROOT  := /nonexistant
CFG_LLVM_ROOT        := 
CFG_JEMALLOC_ROOT    := 
[...]
CFG_LLDB_PYTHON_DIR  := /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/Python
CFG_ADB              := /Users/fklock/bin/adb
CFG_LOCAL_RUST_ROOT  := /Users/fklock
CFG_ENABLE_CLANG     := 1
CFG_USING_CLANG      := 1
....

Note that CFG_LOCAL_RUST_ROOT occurs multiple times; I believe the semantics are that the make run will pick up the last assigned value, but a reasonable human skimming the file is probably going to think that the first assignment is the only one in the file.

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