build: Refactor order-only configure directory dependency with a pattern

Signed-off-by: Diego Biurrun <diego@biurrun.de>