Fumitoshi Ukai | d81f9b9 | 2015-07-21 17:07:08 +0900 | [diff] [blame] | 1 | # TODO(c): Fix this. Maybe $(wildcard) always runs at eval-phase. |
Fumitoshi Ukai | 3e5161e | 2015-04-01 22:42:10 +0900 | [diff] [blame] | 2 | files = $(wildcard *,*) |
| 3 | |
Fumitoshi Ukai | d81f9b9 | 2015-07-21 17:07:08 +0900 | [diff] [blame] | 4 | # if make starts without foo,bar, it will be empty, although expect foo,bar. |
Fumitoshi Ukai | 3e5161e | 2015-04-01 22:42:10 +0900 | [diff] [blame] | 5 | test: foo,bar |
| 6 | echo $(files) |
Fumitoshi Ukai | d81f9b9 | 2015-07-21 17:07:08 +0900 | [diff] [blame] | 7 | echo $(wildcard foo*) |
Fumitoshi Ukai | 3e5161e | 2015-04-01 22:42:10 +0900 | [diff] [blame] | 8 | |
| 9 | # first $(files) will be empty since no foo,bar exists. |
| 10 | # second $(files) expects foo, but empty. |
| 11 | foo,bar: |
| 12 | echo $(files) |
| 13 | touch foo,bar |
| 14 | echo $(files) |
Shinichiro Hamaji | 7409aee | 2015-07-28 14:52:37 +0900 | [diff] [blame] | 15 | |
| 16 | $(shell mkdir dir) |
| 17 | $(info $(wildcard dir/not_exist)) |
| 18 | $(shell touch dir/file) |
| 19 | # This should show nothing. |
| 20 | $(info $(wildcard dir/file)) |