Be careful about indentation and TAB/space characters. E.g. CLEAN_SRC needed to be separated by a TAB char otherwise it would throw `no separator` error.
– Arun MAug 18 '11 at 02:24
2
@ArunM: I don't think that's true about the TAB/space characters. Only the *rule definitions* require Tab indentation. Other parts of the makefile can be indented by spaces, or not at all -- make doesn't care there.
– Colin D BennettNov 08 '13 at 21:21
$(realpath file1) would be an alternative to $(wildcard file1) in this context, since it would also evaluate to an empty string if the file is missing.
– AlanNov 25 '13 at 21:25
However, I've been told that $(wildcard file1) is favored over $(realpath file1) because it doesn't print a message that could mistakenly be thought to indicate an error.
– AlanNov 25 '13 at 21:44
2
I'd write the positive case first with `ifneq ($(wildcard file1),)` and then the "file does not exist" would be the `else` case.
– BulletmagnetAug 17 '17 at 08:18