Simplify some logic in dist.mk