[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Test something is a file/dir
From: |
Paul Smith |
Subject: |
Re: Test something is a file/dir |
Date: |
Tue, 17 May 2011 10:58:00 -0400 |
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.