[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
testing if a file exists
From: |
Kris Thielemans |
Subject: |
testing if a file exists |
Date: |
Wed, 30 Jan 2002 17:41:08 -0000 |
Hi,
I have a makefile which tests if a certain file exists. If so, it will
compile more files. Could anyone recommended me a way of doing this? Maybe
with $(wildcard..) or so? At the moment I do it as follows
__TEST_LLN:=$(shell if [ -r matrix.h ]; then echo 1; fi)
ifeq ($(__TEST_LLN),1)
SOURCES += ifheaders_for_ecat7.cxx
endif
This would break though if somebody changed SHELL.
Thanks,
Kris Thielemans
(kris.thielemans <at> ic.ac.uk)
Imaging Research Solutions Ltd
Cyclotron Building
Hammersmith Hospital
Du Cane Road
London W12 ONN, United Kingdom
web site address: http://www.irsl.org/~kris
- testing if a file exists,
Kris Thielemans <=