Here's where the action is in build_target:
# make sure config.py is up-to-date
export PYTHONPATH=$config_dir $PYTHON $config_py $config_lb $lbpath
exit $?
This is at the end.
So we could, at the end, before exit, compute the distro-specific flags and then append them to $build_dir/Makefile.settings and $build_dir/*/Makefile.settings (I'm sorry for this part, I can only say mea culpa. Somebody got clever). Then all makefiles would pick that up -- they all include it.
That would probably do it.
ron