build: implement make check and make package/X/check

This is intended to be used for a wide array of package sanity checks.

The first check that is implemented is for the hash of downloaded files.
It checks:
  - Missing hash
  - Use of SHA256 instead of MD5
  - dl/<file> hash not matching hash in makefile
  - deprecated MD5SUM variable

The deprecated MD5SUM variable check is skipped for feeds/ until OpenWrt
is updated as well

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2016-12-14 15:36:39 +01:00
parent 720b99215d
commit 7a315b0b5d
11 changed files with 103 additions and 22 deletions

View File

@ -179,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)