On Tue, May 17, 2011 at 9:58 AM, Paul Smith <[email protected]> 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? -- Regards, Peng _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
