mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
build: get rid of host.mk
Defined required host related variables in toplevel.mk instead Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
be206eba3a
commit
9467ce42da
2
Makefile
2
Makefile
@ -18,7 +18,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the LEDE direct
|
||||
|
||||
world:
|
||||
|
||||
include $(TOPDIR)/include/host.mk
|
||||
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
|
||||
|
||||
ifneq ($(OPENWRT_BUILD),1)
|
||||
_SINGLE=export MAKEFLAGS=$(space);
|
||||
|
@ -19,7 +19,6 @@ else
|
||||
HOST_JOBS?=$(if $(HOST_BUILD_PARALLEL),$(HOST_MAKE_J),-j1)
|
||||
endif
|
||||
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
include $(INCLUDE_DIR)/unpack.mk
|
||||
include $(INCLUDE_DIR)/depends.mk
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2007-2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
TMP_DIR ?= $(TOPDIR)/tmp
|
||||
ifeq ($(if $(TARGET_BUILD),,$(DUMP)),)
|
||||
-include $(TMP_DIR)/.host.mk
|
||||
endif
|
||||
|
||||
ifneq ($(__host_inc),1)
|
||||
__host_inc:=1
|
||||
|
||||
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
|
||||
|
||||
try-run = $(shell set -e; \
|
||||
TMP_F="$(TMP_DIR)/try-run.$$$$.tmp"; \
|
||||
if ($(1)) >/dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi; \
|
||||
rm -f "$$TMP_F"; \
|
||||
)
|
||||
|
||||
host-cc-option = $(call try-run, \
|
||||
$(HOSTCC) $(HOST_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP_F",$(1),$(2) \
|
||||
)
|
||||
|
||||
.PRECIOUS: $(TMP_DIR)/.host.mk
|
||||
$(TMP_DIR)/.host.mk: $(TOPDIR)/include/host.mk
|
||||
@mkdir -p $(TMP_DIR)
|
||||
@( \
|
||||
HOST_OS=`uname`; \
|
||||
case "$$HOST_OS" in \
|
||||
Linux) HOST_ARCH=`uname -m`;; \
|
||||
Darwin) HOST_ARCH=`uname -m`;; \
|
||||
*) HOST_ARCH=`uname -p`;; \
|
||||
esac; \
|
||||
GNU_HOST_NAME=`gcc -dumpmachine`; \
|
||||
[ -z "$$GNU_HOST_NAME" -o "$$HOST_OS" = "Darwin" ] && \
|
||||
GNU_HOST_NAME=`$(TOPDIR)/scripts/config.guess`; \
|
||||
echo "HOST_OS:=$$HOST_OS" > $@; \
|
||||
echo "HOST_ARCH:=$$HOST_ARCH" >> $@; \
|
||||
echo "GNU_HOST_NAME:=$$GNU_HOST_NAME" >> $@; \
|
||||
) >/dev/null 2>/dev/null
|
||||
|
||||
endif
|
@ -8,7 +8,6 @@
|
||||
override TARGET_BUILD=
|
||||
include $(INCLUDE_DIR)/prereq.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
include $(INCLUDE_DIR)/version.mk
|
||||
include $(INCLUDE_DIR)/image-commands.mk
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
include $(INCLUDE_DIR)/prereq.mk
|
||||
include $(INCLUDE_DIR)/depends.mk
|
||||
|
||||
|
@ -37,7 +37,6 @@ endif
|
||||
|
||||
include $(INCLUDE_DIR)/hardening.mk
|
||||
include $(INCLUDE_DIR)/prereq.mk
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
include $(INCLUDE_DIR)/unpack.mk
|
||||
include $(INCLUDE_DIR)/depends.mk
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/prereq.mk
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
SHELL:=sh
|
||||
@ -123,9 +122,9 @@ $(eval $(call SetupHostCommand,getopt, \
|
||||
getopt -o t --long test -- --test | grep '^ *--test *--'))
|
||||
|
||||
$(eval $(call SetupHostCommand,stat,Cannot find a file stat utility, \
|
||||
gnustat -c%s $(TMP_DIR)/.host.mk, \
|
||||
gstat -c%s $(TMP_DIR)/.host.mk, \
|
||||
stat -c%s $(TMP_DIR)/.host.mk))
|
||||
gnustat -c%s $(TOPDIR)/Makefile, \
|
||||
gstat -c%s $(TOPDIR)/Makefile, \
|
||||
stat -c%s $(TOPDIR)/Makefile))
|
||||
|
||||
$(eval $(call SetupHostCommand,unzip,Please install 'unzip', \
|
||||
unzip 2>&1 | grep zipfile, \
|
||||
|
@ -3,8 +3,6 @@ TMP_DIR:=$(TOPDIR)/tmp
|
||||
|
||||
all: $(TMP_DIR)/.$(SCAN_TARGET)
|
||||
|
||||
include $(TOPDIR)/include/host.mk
|
||||
|
||||
SCAN_TARGET ?= packageinfo
|
||||
SCAN_NAME ?= package
|
||||
SCAN_DIR ?= package
|
||||
@ -12,6 +10,8 @@ TARGET_STAMP:=$(TMP_DIR)/info/.files-$(SCAN_TARGET).stamp
|
||||
FILELIST:=$(TMP_DIR)/info/.files-$(SCAN_TARGET)-$(SCAN_COOKIE)
|
||||
OVERRIDELIST:=$(TMP_DIR)/info/.overrides-$(SCAN_TARGET)-$(SCAN_COOKIE)
|
||||
|
||||
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
|
||||
|
||||
ifeq ($(IS_TTY),1)
|
||||
define progress
|
||||
printf "\033[M\r$(1)" >&2;
|
||||
|
@ -24,6 +24,9 @@ export REVISION
|
||||
export SOURCE_DATE_EPOCH
|
||||
export GIT_CONFIG_PARAMETERS='core.autocrlf=false'
|
||||
export MAKE_JOBSERVER=$(filter --jobserver%,$(MAKEFLAGS))
|
||||
export GNU_HOST_NAME:=$(shell $(TOPDIR)/scripts/config.guess)
|
||||
export HOST_OS:=$(shell uname)
|
||||
export HOST_ARCH:=$(shell uname -m)
|
||||
|
||||
# prevent perforce from messing with the patch utility
|
||||
unexport P4PORT P4USER P4CONFIG P4CLIENT
|
||||
@ -148,7 +151,6 @@ kernel_nconfig: prepare_kernel_conf
|
||||
|
||||
staging_dir/host/.prereq-build: include/prereq-build.mk
|
||||
mkdir -p tmp
|
||||
rm -f tmp/.host.mk
|
||||
@$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
|
||||
echo "Prerequisite check failed. Use FORCE=1 to override."; \
|
||||
false; \
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
include $(INCLUDE_DIR)/version.mk
|
||||
include $(INCLUDE_DIR)/feeds.mk
|
||||
|
||||
|
@ -13,7 +13,7 @@ export TOPDIR LC_ALL LANG
|
||||
export OPENWRT_VERBOSE=s
|
||||
all: help
|
||||
|
||||
include $(TOPDIR)/include/host.mk
|
||||
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
|
||||
|
||||
ifneq ($(OPENWRT_BUILD),1)
|
||||
override OPENWRT_BUILD=1
|
||||
@ -82,7 +82,6 @@ PROFILE_LIST = $(foreach p,$(PROFILE_NAMES), \
|
||||
|
||||
staging_dir/host/.prereq-build: include/prereq-build.mk
|
||||
mkdir -p tmp
|
||||
rm -f tmp/.host.mk
|
||||
@$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
|
||||
echo "Prerequisite check failed. Use FORCE=1 to override."; \
|
||||
false; \
|
||||
|
@ -4,7 +4,6 @@
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
|
||||
DEVICE_VARS += DEVICE_PROFILE IMAGE_SIZE DTB_SIZE
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
|
||||
ARCH:=arm
|
||||
BOARD:=brcm2708
|
||||
|
@ -7,7 +7,6 @@
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
|
||||
FAT32_BLOCK_SIZE=1024
|
||||
FAT32_BLOCKS=$(shell echo $$(($(CONFIG_BRCM2708_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
|
||||
|
@ -7,7 +7,6 @@
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
|
||||
FAT32_BLOCK_SIZE=1024
|
||||
FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
|
||||
|
@ -5,7 +5,6 @@
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
|
||||
# UML only makes sense on linux
|
||||
ifeq ($(HOST_OS),Linux)
|
||||
|
@ -5,7 +5,6 @@
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
|
||||
ARCH:=arm
|
||||
BOARD:=zynq
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
include $(INCLUDE_DIR)/version.mk
|
||||
|
||||
override MAKEFLAGS=
|
||||
|
@ -14,7 +14,7 @@ export TOPDIR LC_ALL LANG SDK
|
||||
|
||||
world:
|
||||
|
||||
include $(TOPDIR)/include/host.mk
|
||||
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
|
||||
|
||||
ifneq ($(OPENWRT_BUILD),1)
|
||||
override OPENWRT_BUILD=1
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/host.mk
|
||||
include $(INCLUDE_DIR)/version.mk
|
||||
|
||||
override MAKEFLAGS=
|
||||
|
Loading…
Reference in New Issue
Block a user