Changeset View
Changeset View
Standalone View
Standalone View
depends/Makefile
.NOTPARALLEL : | .NOTPARALLEL : | ||||
# Pattern rule to print variables, e.g. make print-build_arch | # Pattern rule to print variables, e.g. make print-build_arch | ||||
print-%: | print-%: | ||||
@echo $* = $($*) | @echo '$*' = '$($*)' | ||||
# When invoking a sub-make, keep only the command line variable definitions | # When invoking a sub-make, keep only the command line variable definitions | ||||
# matching the pattern in the filter function. | # matching the pattern in the filter function. | ||||
# | # | ||||
# e.g. invoking: | # e.g. invoking: | ||||
# $ make A=1 C=1 print-MAKEOVERRIDES print-MAKEFLAGS | # $ make A=1 C=1 print-MAKEOVERRIDES print-MAKEFLAGS | ||||
# | # | ||||
# with the following in the Makefile: | # with the following in the Makefile: | ||||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | |||||
all: install | all: install | ||||
include hosts/$(host_os).mk | include hosts/$(host_os).mk | ||||
include hosts/default.mk | include hosts/default.mk | ||||
include builders/$(build_os).mk | include builders/$(build_os).mk | ||||
include builders/default.mk | include builders/default.mk | ||||
include packages/packages.mk | include packages/packages.mk | ||||
build_id_string:=$(BUILD_ID_SALT) | # Previously, we directly invoked the well-known programs using $(shell ...) | ||||
build_id_string+=$(shell $(build_CC) --version 2>/dev/null) | # to contruct build_id_string. However, that was problematic because: | ||||
build_id_string+=$(shell $(build_AR) --version 2>/dev/null) | # | ||||
build_id_string+=$(shell $(build_CXX) --version 2>/dev/null) | # 1. When invoking a shell, GNU Make special-cases exit code 127 (command not | ||||
build_id_string+=$(shell $(build_RANLIB) --version 2>/dev/null) | # found) by not capturing the output but instead passing it through. This is | ||||
build_id_string+=$(shell $(build_STRIP) --version 2>/dev/null) | # not done for any other exit code. | ||||
# | |||||
$(host_arch)_$(host_os)_id_string:=$(HOST_ID_SALT) | # 2. Characters like '#' (from these programs' output) would end up in make | ||||
$(host_arch)_$(host_os)_id_string+=$(shell $(host_CC) --version 2>/dev/null) | # variables like build_id_string, which would be wrongly interpreted by make | ||||
$(host_arch)_$(host_os)_id_string+=$(shell $(host_AR) --version 2>/dev/null) | # when these variables were used. | ||||
$(host_arch)_$(host_os)_id_string+=$(shell $(host_CXX) --version 2>/dev/null) | # | ||||
$(host_arch)_$(host_os)_id_string+=$(shell $(host_RANLIB) --version 2>/dev/null) | # Therefore, we should avoid having arbitrary strings in make variables where | ||||
$(host_arch)_$(host_os)_id_string+=$(shell $(host_STRIP) --version 2>/dev/null) | # possible. The gen_id script used here hashes the output to construct a | ||||
# "make-safe" id. | |||||
ifneq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) | # | ||||
# Make sure that cache is invalidated when switching between system and | # Also note that these lines need to be: | ||||
# depends-managed, pinned clang | # | ||||
build_id_string+=system_clang | # 1. After including {hosts,builders}/*.mk, since they rely on the tool | ||||
$(host_arch)_$(host_os)_id_string+=system_clang | # variables (e.g. build_CC, host_STRIP, etc.) to be set. | ||||
endif | # | ||||
# 2. Before including packages/*.mk (excluding packages/packages.mk), since | |||||
# they rely on the build_id variables | |||||
# | |||||
build_id:=$(shell env CC='$(build_CC)' CXX='$(build_CXX)' AR='$(build_AR)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' ./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))') | |||||
$(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' CXX='$(host_CXX)' AR='$(host_AR)' RANLIB='$(host_RANLIB)' STRIP='$(host_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' ./gen_id '$(HOST_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))') | |||||
qrencode_packages_$(NO_QR) = $(qrencode_packages) | qrencode_packages_$(NO_QR) = $(qrencode_packages) | ||||
qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) $(qrencode_packages_) | qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) $(qrencode_packages_) | ||||
bdb_packages_$(NO_BDB) = $(bdb_packages) | bdb_packages_$(NO_BDB) = $(bdb_packages) | ||||
sqlite_packages_$(NO_SQLITE) = $(sqlite_packages) | sqlite_packages_$(NO_SQLITE) = $(sqlite_packages) | ||||
wallet_packages_$(NO_WALLET) = $(bdb_packages_) $(sqlite_packages_) | wallet_packages_$(NO_WALLET) = $(bdb_packages_) $(sqlite_packages_) | ||||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |