enum_possible_values(): fix conditionally set lists.

The condition on the whole list wasn't respected and only conditions for
individual items were accounted for.  Fixed.
Include dependency targets in submodule's deps.

In makefiles, submakefile invocation should have a dependency on any
target that the submakefiles require.  This wasn't done properly in case
a submodule/submakefile depended on a target in the parent (rather than
a sibling).