[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Test something is a file/dir

From: Peng Yu
Subject: Re: Test something is a file/dir
Date: Tue, 17 May 2011 10:02:04 -0500

On Tue, May 17, 2011 at 9:58 AM, Paul Smith <address@hidden> wrote:
> 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.

What if I want to tell the difference between a symbolic link and an
actual file as well?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]