help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to check for file existence in a makefile?


From: Robert P. J. Day
Subject: how to check for file existence in a makefile?
Date: Thu, 14 Feb 2008 02:35:00 -0500 (EST)
User-agent: Alpine 1.00 (LFD 882 2007-12-20)

  what is the standard way to check for file existence in a makefile
and bail if it doesn't exist?  personally, i use:

$(if $(wildcard <file>),,$(error "<file> is missing, bye bye."))

is there a better or more popular way?

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================




reply via email to

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