1
2MAKEVER:=$(shell make --version | grep "Make [0-9]" | sed -E 's/.*Make ([0-9]).*/\1/')
3
4files = $(wildcard M*)
5
6$(shell mkdir -p tmp)
7files += $(wildcard tmp/../M*)
8files += $(wildcard not_exist/../M*)
9files += $(wildcard tmp/../M* not_exist/../M* tmp/../M*)
10# GNU make 4 does not sort the result of $(wildcard)
11ifeq ($(MAKEVER),3)
12files += $(wildcard [ABC] C B A)
13endif
14
15test1:
16 touch A C B
17
18test2:
19 echo $(files)