github.com/westcoastroms/westcoastroms-build@v0.0.0-20190928114312-2350e5a73030/build/kati/testcase/wildcard_cache.mk (about)

     1  # TODO(c): Fix this. Maybe $(wildcard) always runs at eval-phase.
     2  
     3  # GNU make 4 agrees with ckati.
     4  MAKEVER:=$(shell make --version | ruby -n0e 'puts $$_[/Make (\d)/,1]')
     5  ifeq ($(MAKE)$(MAKEVER),make4)
     6  $(error test skipped)
     7  endif
     8  
     9  files = $(wildcard *,*)
    10  
    11  # if make starts without foo,bar, it will be empty, although expect foo,bar.
    12  test: foo,bar
    13  	echo $(files)
    14  	echo $(wildcard foo*)
    15  
    16  # first $(files) will be empty since no foo,bar exists.
    17  # second $(files) expects foo, but empty.
    18  foo,bar:
    19  	echo $(files)
    20  	touch foo,bar
    21  	echo $(files)
    22  
    23  $(shell mkdir dir)
    24  $(info $(wildcard dir/not_exist))
    25  $(shell touch dir/file)
    26  # This should show nothing.
    27  $(info $(wildcard dir/file))