X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Ftoplevel.mk;h=1171c59093139a5228c2c9ff258f179d0475c2e6;hb=6b76377bc3e01c13030c8e2e718ce379e2ec3f7f;hp=3844f3cfc1414ebf7a1a33c8725e99071c3bcb5b;hpb=5b728074160bb1db064737baf95945ae2e972549;p=lede.git diff --git a/include/toplevel.mk b/include/toplevel.mk index 3844f3cfc1..1171c59093 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -16,13 +16,15 @@ 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 REVISION +export SOURCE_DATE_EPOCH export GIT_CONFIG_PARAMETERS='core.autocrlf=false' +export GIT_ASKPASS:=/bin/true 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 @@ -66,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 @@ -110,7 +112,7 @@ config-clean: FORCE defconfig: scripts/config/conf prepare-tmpinfo FORCE touch .config - @if [ -s .config -a -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 @@ -125,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 @@ -169,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 @@ -178,6 +180,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) @@ -222,12 +227,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