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

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

Reply via email to