/ payloads / external / tint / Makefile
Makefile
 1  #
 2  # TINT build system - helps to securely download TINT with a checksum verification and build it.
 3  #
 4  
 5  #
 6  # Properties of the current TINT version
 7  #
 8  
 9  TINT_VERSION=0.07
10  TINT_BASE_URL="https://mirror.fsf.org/trisquel/pool/main/t/tint"
11  TINT_ARCHIVE="tint_${TINT_VERSION}.tar.xz"
12  TINT_DIR="tint-${TINT_VERSION}"
13  TINT_SHA1SUM="a7ec9355b9ea9d47576757219e9b1f4e51ac93a7"
14  
15  #
16  # Locations of the input/output scripts
17  #
18  
19  buildgcc="./../../../util/crossgcc/buildgcc"
20  corescript="./core.sh"
21  tintified="./tint.sh"
22  
23  unexport KCONFIG_AUTOHEADER
24  unexport KCONFIG_AUTOCONFIG
25  unexport KCONFIG_DEPENDENCIES
26  unexport KCONFIG_SPLITCONFIG
27  unexport KCONFIG_TRISTATE
28  unexport KCONFIG_NEGATIVES
29  
30  all: tint
31  
32  ################################################################################
33  #
34  # Three stages of TINT build system:
35  #
36  # 1) generate_core.sh extracts the core part from buildgcc script,
37  #     most importantly the checksum calculation/verification functions.
38  #
39  # 2) tintify_core.sh adds the TINT-specific footer/header to the core,
40  #     such as the properties of current version including its checksum.
41  #
42  # 3) tint.sh - generated and "tintified" core script - builds a TINT.
43  #
44  ################################################################################
45  
46  tint:
47  	if [ ! -f ${tintified} ]; then \
48  		chmod +x "./generate_core.sh" ; \
49  		"./generate_core.sh" ${buildgcc} ${corescript} "prepare_before_patch" ; \
50  		chmod +x "./tintify_core.sh" ; \
51  		"./tintify_core.sh" ${corescript} ${tintified} \
52  			${TINT_BASE_URL} ${TINT_ARCHIVE} ${TINT_DIR} ${TINT_SHA1SUM} ; \
53  	fi ; \
54  	chmod +x ${tintified}
55  	${tintified}
56  
57  clean:
58  	test -d "./tint/" && $(MAKE) -C "./tint/" clean || exit 0
59  
60  distclean:
61  	rm -rf "./tint/"
62  	rm -f ${corescript}
63  	rm -f ${tintified}
64  
65  .PHONY: tint clean distclean
66  
67  #