X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=include%2Ftoplevel.mk;h=24e4ebf823fbb304fd32c67815596803890a367c;hp=535ac0e065698347774fdbc717d7480a88408ae0;hb=421a6d314a0c8a8ff9e8ede2677007e8fcac3919;hpb=471ca4197c73ce8720339492c29f6c8b230a6371 diff --git a/include/toplevel.mk b/include/toplevel.mk index 535ac0e065..24e4ebf823 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -6,7 +6,6 @@ # See /LICENSE for more information. # -RELEASE:=Designated Driver PREP_MK= OPENWRT_BUILD= QUIET=0 export IS_TTY=$(shell tty -s && echo 1 || echo 0) @@ -17,14 +16,14 @@ ifeq ($(SDK),1) include $(TOPDIR)/include/version.mk else REVISION:=$(shell $(TOPDIR)/scripts/getver.sh) + SOURCE_DATE_EPOCH:=$(shell $(TOPDIR)/scripts/get_source_date_epoch.sh) endif HOSTCC ?= $(CC) -export RELEASE export REVISION +export SOURCE_DATE_EPOCH export GIT_CONFIG_PARAMETERS='core.autocrlf=false' export MAKE_JOBSERVER=$(filter --jobserver%,$(MAKEFLAGS)) -export SOURCE_DATE_EPOCH:=$(shell $(TOPDIR)/scripts/get_source_date_epoch.sh) # prevent perforce from messing with the patch utility unexport P4PORT P4USER P4CONFIG P4CLIENT @@ -68,7 +67,7 @@ SUBMAKE:=umask 022; $(SUBMAKE) ULIMIT_FIX=_limit=`ulimit -n`; [ "$$_limit" = "unlimited" -o "$$_limit" -ge 1024 ] || ulimit -n 1024; -prepare-mk: FORCE ; +prepare-mk: staging_dir/host/.prereq-build FORCE ; ifdef SDK IGNORE_PACKAGES = linux @@ -83,11 +82,11 @@ prepare-tmpinfo: FORCE $(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPS="image/Makefile profiles/*.mk $(TOPDIR)/include/kernel*.mk $(TOPDIR)/include/target.mk" SCAN_DEPTH=2 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1" for type in package target; do \ f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \ - [ "$$t" -nt "$$f" ] || ./scripts/metadata.pl $(_ignore) $${type}_config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \ + [ "$$t" -nt "$$f" ] || ./scripts/$${type}-metadata.pl $(_ignore) config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \ done [ tmp/.config-feeds.in -nt tmp/.packagesubdirs ] || ./scripts/feeds feed_config > tmp/.config-feeds.in - ./scripts/metadata.pl package_mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; } - ./scripts/metadata.pl package_subdirs tmp/.packageinfo > tmp/.packagesubdirs || { rm -f tmp/.packagesubdirs; false; } + ./scripts/package-metadata.pl mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; } + ./scripts/package-metadata.pl subdirs tmp/.packageinfo > tmp/.packagesubdirs || { rm -f tmp/.packagesubdirs; false; } touch $(TOPDIR)/tmp/.build .config: ./scripts/config/conf $(if $(CONFIG_HAVE_DOT_CONFIG),,prepare-tmpinfo) @@ -112,7 +111,7 @@ config-clean: FORCE defconfig: scripts/config/conf prepare-tmpinfo FORCE touch .config - @if [ -e $(HOME)/.openwrt/defconfig ]; then cp $(HOME)/.openwrt/defconfig .config; fi + @if [ ! -s .config -a -e $(HOME)/.openwrt/defconfig ]; then cp $(HOME)/.openwrt/defconfig .config; fi $< --defconfig=.config Config.in confdefault-y=allyes @@ -165,11 +164,14 @@ staging_dir/host/.prereq-build: include/prereq-build.mk printdb: FORCE @$(_SINGLE)$(NO_TRACE_MAKE) -p $@ V=99 DUMP_TARGET_DB=1 2>&1 +ifndef SDK + DOWNLOAD_DIRS = tools/download toolchain/download package/download target/download +else + DOWNLOAD_DIRS = package/download +endif + download: .config FORCE - @+$(SUBMAKE) tools/download - @+$(SUBMAKE) toolchain/download - @+$(SUBMAKE) package/download - @+$(SUBMAKE) target/download + @+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);) clean dirclean: .config @+$(SUBMAKE) -r $@ @@ -177,6 +179,9 @@ clean dirclean: .config prereq:: prepare-tmpinfo .config @+$(NO_TRACE_MAKE) -r -s $@ +check: .config FORCE + @+$(NO_TRACE_MAKE) -r -s $@ QUIET= V=s + WARN_PARALLEL_ERROR = $(if $(BUILD_LOG),,$(and $(filter -j,$(MAKEFLAGS)),$(findstring s,$(OPENWRT_VERBOSE)))) ifeq ($(SDK),1) @@ -221,12 +226,6 @@ package/symlinks-clean: help: cat README -docs docs/compile: FORCE - @$(_SINGLE)$(SUBMAKE) -C docs compile - -docs/clean: FORCE - @$(_SINGLE)$(SUBMAKE) -C docs clean - distclean: rm -rf bin build_dir .config* dl feeds key-build* logs package/feeds package/openwrt-packages staging_dir tmp @$(_SINGLE)$(SUBMAKE) -C scripts/config clean