libunwind: Add MIPS64 dep check
[openwrt/openwrt.git] / Makefile
index 24f5955c906652e62880bf2c001de32d0c065219..d3c51761e9f36b5ab00d7e101f8ec800cdc8d144 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,6 @@
-# Makefile for OpenWrt
+# SPDX-License-Identifier: GPL-2.0-only
 #
 # Copyright (C) 2007 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
 TOPDIR:=${CURDIR}
 LC_ALL:=C
@@ -18,7 +14,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir
 
 world:
 
-DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
+DISTRO_PKG_CONFIG:=$(shell command -pv pkg-config | grep -E '\/usr' | head -n 1)
 export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
 
 ifneq ($(OPENWRT_BUILD),1)
@@ -64,7 +60,7 @@ dirclean: clean
 
 cacheclean:
 ifneq ($(CONFIG_CCACHE),)
-       rm -rf $(if $(call qstrip,$(CONFIG_CCACHE_DIR)),$(call qstrip,$(CONFIG_CCACHE_DIR)),$(TOPDIR)/.ccache)
+       $(STAGING_DIR_HOST)/bin/ccache -C
 endif
 
 ifndef DUMP_TARGET_DB
@@ -86,12 +82,6 @@ endif
 
 # check prerequisites before starting to build
 prereq: $(target/stamp-prereq) tmp/.prereq_packages
-       @if [ ! -f "$(INCLUDE_DIR)/site/$(ARCH)" ]; then \
-               echo 'ERROR: Missing site config for architecture "$(ARCH)" !'; \
-               echo '       The missing file will cause configure scripts to fail during compilation.'; \
-               echo '       Please provide a "$(INCLUDE_DIR)/site/$(ARCH)" file and restart the build.'; \
-               exit 1; \
-       fi
 
 $(BIN_DIR)/profiles.json: FORCE
        $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \