How do I express the following logic in a Makefile?
if $(XORG_VERSION) > "7.7"
<do some thing>
fi
Conditional Parts of Makefiles only provides ifeq or ifneq.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re not restricted to using the
makeconditional statements – each command is a shell command which may be as complex as you need (including a shell conditional statement):Consider the following
makefile:When you use
xyz=7 make --silent, there is no output. When you usexyz=9 make --silent, it outputsurk!! 9as expected.