-%-compile: $(STAMP_DIR) $(TARGET_DIR)
- $(MAKE) -C $(patsubst %-compile,%,$@) compile MAKEFLAGS="$(BUILD_MAKEFLAGS)"
-
-%-install: $(STAMP_DIR) $(TARGET_DIR)
- $(MAKE) -C $(patsubst %-install,%,$@) install MAKEFLAGS="$(BUILD_MAKEFLAGS)"
-
-%-clean: $(STAMP_DIR) $(TARGET_DIR)
- $(MAKE) -C $(patsubst %-clean,%,$@) clean MAKEFLAGS="$(BUILD_MAKEFLAGS)"
-
-ifeq ($(SDK),1)
-GENDEP_OPTS := -s
-endif
+$(TMP_DIR)/.packagedeps: $(TMP_DIR)/.packageinfo
+ @$(TOPDIR)/scripts/metadata.pl package_mk < $< > $@ || rm -f $@