[Top][All Lists]

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

Help needed to check whether a directory exists

From: David Aldrich
Subject: Help needed to check whether a directory exists
Date: Mon, 21 Nov 2011 16:10:34 +0000


Our C++ app uses the Boost library. On platforms that we target, Boost header 
files may be in /usr/include/boost or /usr/include/boost141.  Likewise, the 
Boost library files may be in various directories.  So I want my makefile to 
check whether /usr/include/boost141 exists in order to set the compiler flags 

So I added the following code before the rules in my makefile:

if test -d /usr/include/boost141; then \
    echo Using Boost 1.41 directory; \
    BOOST_INC := /usr/include/boost141; \
    BOOST_LIB := boost141/boost_python-mt; \
else \
    echo Using default Boost location; \
    BOOST_INC := /usr/include/boost; \
    BOOST_LIB := boost_python-mt; \

However, this code seems to do nothing. I get no messages from it on the 

Please will someone explain where I am going wrong?

Best regards


reply via email to

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