X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=target%2Fsdk%2Ffiles%2FMakefile;h=31758c124845226141e58738f30bccf2805d93bd;hb=57e7ef99c025b17ff8aa178ab4bcf86b10d60cc5;hp=ba488e380c9ebfbd1a0b9245af0a543b54e02799;hpb=30010567953c3acfa28c2beafe50e6177254eefa;p=openwrt-10.03%2F.git diff --git a/target/sdk/files/Makefile b/target/sdk/files/Makefile index ba488e380..31758c124 100644 --- a/target/sdk/files/Makefile +++ b/target/sdk/files/Makefile @@ -30,21 +30,41 @@ export TOPDIR DEVELOPER=1 export DEVELOPER +SDK=1 +export SDK + +export IS_TTY=$(shell tty -s && echo 1 || echo 0) +include $(TOPDIR)/include/verbose.mk + all: world -.pkginfo: FORCE -ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo) - @echo Collecting package info... - @-for dir in package/*/; do \ - echo Source-Makefile: $${dir}Makefile; \ - $(MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || true; \ - done > $@ -endif +define stamp +tmp/info/.stamp-$(1)-$(shell ls $(2)/*/Makefile $(5) | (md5sum || md5) 2>/dev/null | cut -d' ' -f1) +endef + +STAMP=$(call stamp,packageinfo,package) + +$(STAMP): + @mkdir -p tmp/info + @rm -f tmp/info/.stamp-packageinfo* + @touch $@ + +define filedep +$(foreach FILE,$(shell ls package/*/Makefile), +tmp/.packageinfo: $(FILE) +$(FILE): + @true +) +endef + +$(eval $(filedep)) -pkginfo-clean: FORCE - -rm -f .pkginfo .config.in +tmp/.packageinfo: $(STAMP) + @echo -n Collecting package info... + @$(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPS="" -package/%: .pkginfo FORCE +package/%: FORCE + @$(NO_TRACE_MAKE) -s tmp/.packageinfo $(MAKE) -C package $(patsubst package/%,%,$@) SDK=1 download: FORCE @@ -56,7 +76,7 @@ world: FORCE cd package; \ find . -maxdepth 2 -name Config.in | \ sed -e 's,/Config.in,,g' | \ - xargs -r -n1 make compile -C; \ + xargs -n1 make compile -C; \ ) clean: FORCE