infra: fix transitive option propagation in gen_config.pl
infra: fix BUILDTAG for out-of-tree builds