[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


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

This would break though if somebody changed SHELL.


Kris Thielemans
(kris.thielemans <at>
Imaging Research Solutions Ltd
Cyclotron Building
Hammersmith Hospital
Du Cane Road
London W12 ONN, United Kingdom

web site address:

reply via email to

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