On Tue, 2011-05-17 at 09:47 -0500, Peng Yu wrote:
> I current use a shell command to test whether something is a file/dir
> or not. But as you can see it is quite inconvenient, I'm wondering
> what is the best way to test if something is a file/dir in Makefile
> and do something according to the file type.

$(wildcard $(FOO)/.) will evaluate to false (empty string) if the value
of the variable $(FOO) is a file, and true (non-empty string) if it's a
directory.


_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to