run metadata scanning only once when multiple targets are specified on the command...
[openwrt/svn-archive/archive.git] / Makefile
index 9b358c3..bee47c4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -91,11 +91,14 @@ kernel_menuconfig: .config FORCE
        -$(MAKE) target/linux-prepare
        $(NO_TRACE_MAKE) -C target/linux menuconfig
 
        -$(MAKE) target/linux-prepare
        $(NO_TRACE_MAKE) -C target/linux menuconfig
 
-package/%: 
+scan_packages:
        @$(NO_TRACE_MAKE) -s tmp/.pkginfo tmp/.targetinfo
        @$(NO_TRACE_MAKE) -s tmp/.pkginfo tmp/.targetinfo
+       
+
+package/%: scan_packages
        $(MAKE) -C package $(patsubst package/%,%,$@)
 
        $(MAKE) -C package $(patsubst package/%,%,$@)
 
-target/%:
+target/%: scan_packages
        @$(NO_TRACE_MAKE) -s tmp/.pkginfo tmp/.targetinfo
        $(MAKE) -C target $(patsubst target/%,%,$@)
 
        @$(NO_TRACE_MAKE) -s tmp/.pkginfo tmp/.targetinfo
        $(MAKE) -C target $(patsubst target/%,%,$@)