build: allow val.% targets to bypass the prepare steps
[openwrt/openwrt.git] / include / toplevel.mk
index 81329ac41455c394b7e618c3f5372a1716407aab..8f967bd50933c1c1a3e77fe61cdce52859599a8c 100644 (file)
@@ -23,6 +23,7 @@ HOSTCC ?= $(CC)
 export REVISION
 export SOURCE_DATE_EPOCH
 export GIT_CONFIG_PARAMETERS='core.autocrlf=false'
+export GIT_ASKPASS:=/bin/true
 export MAKE_JOBSERVER=$(filter --jobserver%,$(MAKEFLAGS))
 
 # prevent perforce from messing with the patch utility
@@ -67,7 +68,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
@@ -126,7 +127,7 @@ menuconfig: scripts/config/mconf prepare-tmpinfo FORCE
        if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \
                cp $(HOME)/.openwrt/defconfig .config; \
        fi
-       $< Config.in
+       [ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; $< Config.in
 
 prepare_kernel_conf: .config FORCE
 
@@ -170,7 +171,7 @@ else
   DOWNLOAD_DIRS = package/download
 endif
 
-download: .config FORCE
+download: .config FORCE $(if $(wildcard $(TOPDIR)/staging_dir/host/bin/flock),,tools/flock/compile)
        @+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);)
 
 clean dirclean: .config
@@ -179,6 +180,12 @@ clean dirclean: .config
 prereq:: prepare-tmpinfo .config
        @+$(NO_TRACE_MAKE) -r -s $@
 
+check: .config FORCE
+       @+$(NO_TRACE_MAKE) -r -s $@ QUIET= V=s
+
+val.%: 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)
@@ -223,12 +230,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