Convert implicit rules to static pattern rules

We're deprecating make implicit rules, preferring static pattern rules,
or just regular rules.

Test: diff build-aosp_dragon.ninja
Change-Id: I450cd49789fe380de20364b45abe8282f84b98c2
diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk
index 39aa33f..dc473b7 100644
--- a/src/mesa/drivers/dri/i965/Android.mk
+++ b/src/mesa/drivers/dri/i965/Android.mk
@@ -283,15 +283,15 @@
 
 intermediates := $(call local-generated-sources-dir)
 
-LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
-	$(i965_oa_GENERATED_FILES))
+gen := $(addprefix $(intermediates)/, $(i965_oa_GENERATED_FILES))
+LOCAL_GENERATED_SOURCES += $(gen)
 
-$(intermediates)/brw_oa_%.h: $(LOCAL_PATH)/brw_oa_%.xml $(LOCAL_PATH)/brw_oa.py
+$(filter %.h,$(gen)): $(intermediates)/brw_oa_%.h: $(LOCAL_PATH)/brw_oa_%.xml $(LOCAL_PATH)/brw_oa.py
 	@echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))"
 	@mkdir -p $(dir $@)
 	$(hide) $(MESA_PYTHON2) $(word 2, $^) --header=$@ --chipset=$(basename $*) $<
 
-$(intermediates)/brw_oa_%.c: $(LOCAL_PATH)/brw_oa_%.xml $(LOCAL_PATH)/brw_oa.py
+$(filter %.c,$(gen)): $(intermediates)/brw_oa_%.c: $(LOCAL_PATH)/brw_oa_%.xml $(LOCAL_PATH)/brw_oa.py
 	@echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))"
 	@mkdir -p $(dir $@)
 	$(hide) $(MESA_PYTHON2) $(word 2, $^) --code=$@ --chipset=$(basename $*) $<
diff --git a/src/util/Android.mk b/src/util/Android.mk
index 9b61442..e463b63 100644
--- a/src/util/Android.mk
+++ b/src/util/Android.mk
@@ -71,7 +71,7 @@
 	@mkdir -p $(dir $@)
 	xgettext -L C --from-code utf-8 -o $@ $<
 
-$(intermediates)/xmlpool/%.po: $(LOCAL_PATH)/xmlpool/%.po $(POT)
+$(MESA_DRI_OPTIONS_LANGS:%=$(intermediates)/xmlpool/%.po): $(intermediates)/xmlpool/%.po: $(LOCAL_PATH)/xmlpool/%.po $(POT)
 	lang=$(basename $(notdir $@)); \
 	mkdir -p $(dir $@); \
 	if [ -f $< ]; then \