You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 intoFOO=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' forifndef
when imported to Makefiles.For now, I have to update all the
ifdef
andifndef
to becomeifneq
in our Tupfiles to work-around the behavior.In summary:
Expected:
# CONFIG_FOO is not set
in a config should evaluate the statements in theifndef CONFIG_FOO ... endif
blockActual:
# CONFIG_FOO is not set
in a config doesn't evaluate the statements in theifndef CONFIG_FOO ... endif
block.The text was updated successfully, but these errors were encountered: