Kconfig compatibility for the standalone kconfig tool
Upon cleaning up a bunch of my messy configs to make it work with the standalone kconfig tool, I found some unexpected behavior.
Looking into https://github.com/gittup/tup/blob/master/src/tup/db.c#L7710-L7722, it appears
that ifdef CONFIG_FOO would come into FOO=n (where FOO is considered defined) if Tup finds a # CONFIG_ line in the config file. This is not compatible with the convention used by Make and Kconfig (AFAIK), where a commented CONFIG symbol such as # CONFIG_FOO is not set is evaluated to 'true' for ifndef when imported to Makefiles.
For now, I have to update all the ifdef and ifndef to become ifneq in our Tupfiles to work-around the behavior.
In summary:
Expected:
# CONFIG_FOO is not set in a config should evaluate the statements in the ifndef CONFIG_FOO ... endif block
Actual:
# CONFIG_FOO is not set in a config doesn't evaluate the statements in the ifndef CONFIG_FOO ... endif block.