0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 .SUFFIXES:
0015
0016
0017
0018
0019 unexport MAKEFLAGS
0020
0021
0022
0023
0024
0025
0026
0027 ifeq ($(JOBS),)
0028 JOBS := $(shell (getconf _NPROCESSORS_ONLN || egrep -c '^processor|^CPU[0-9]' /proc/cpuinfo) 2>/dev/null)
0029 ifeq ($(JOBS),0)
0030 JOBS := 1
0031 endif
0032 endif
0033
0034
0035
0036
0037 ifneq ($(O),)
0038 FULL_O := $(shell cd $(PWD); readlink -f $(O) || echo $(O))
0039 endif
0040
0041
0042
0043
0044 ifeq ("$(origin DEBUG)", "command line")
0045 ifeq ($(DEBUG),)
0046 override DEBUG = 0
0047 else
0048 SET_DEBUG = "DEBUG=$(DEBUG)"
0049 endif
0050 else
0051 override DEBUG = 0
0052 endif
0053
0054 define print_msg
0055 @printf ' BUILD: Doing '\''make \033[33m-j'$(JOBS)'\033[m'\'' parallel build\n'
0056 endef
0057
0058 define make
0059 @$(MAKE) -f Makefile.perf --no-print-directory -j$(JOBS) O=$(FULL_O) $(SET_DEBUG) $@
0060 endef
0061
0062
0063
0064
0065
0066
0067
0068 all tags TAGS:
0069 $(print_msg)
0070 $(make)
0071
0072 ifdef MAKECMDGOALS
0073 has_clean := 0
0074 ifneq ($(filter clean,$(MAKECMDGOALS)),)
0075 has_clean := 1
0076 endif
0077
0078 ifeq ($(has_clean),1)
0079 rest := $(filter-out clean,$(MAKECMDGOALS))
0080 ifneq ($(rest),)
0081 $(rest): clean
0082 endif
0083 endif
0084 endif
0085
0086
0087
0088
0089 clean:
0090 $(make) -j1
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102 build-test:
0103 @$(MAKE) SHUF=1 -f tests/make REUSE_FEATURES_DUMP=1 MK=Makefile SET_PARALLEL=1 --no-print-directory tarpkg make_static make_with_gtk2 out
0104
0105 build-test-tarball:
0106 @$(MAKE) -f tests/make REUSE_FEATURES_DUMP=1 MK=Makefile SET_PARALLEL=1 --no-print-directory out
0107
0108
0109
0110
0111 %: FORCE
0112 $(print_msg)
0113 $(make)
0114
0115 .PHONY: tags TAGS FORCE Makefile