[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Test something is a file/dir
From: |
Peng Yu |
Subject: |
Test something is a file/dir |
Date: |
Tue, 17 May 2011 09:47:14 -0500 |
Hi,
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.
VAR:=$(if $(shell if [ -f .. ]; then echo blah; fi), do something for
file, $(if $(shell if [ -d .. ]; then echo blah; fi), do something for
dir))
$(info $(VAR))
.PHONY: all
all:
--
Regards,
Peng
- Test something is a file/dir,
Peng Yu <=