how to express this logic in Makefile?
if $(XORG_VERSION) > "7.7"
<do some thing>
fi
Conditional Parts of Makefiles only provides ifeq or ifneq.
how to express this logic in Makefile?
if $(XORG_VERSION) > "7.7"
<do some thing>
fi
Conditional Parts of Makefiles only provides ifeq or ifneq.
You're not restricted to using the make
conditional statements - each command is a shell command which may be as complex as you need (including a shell conditional statement):
Consider the following makefile
:
dummy:
if [ ${xyz} -gt 8 ] ; then \
echo urk!! ${xyz} ;\
fi
When you use xyz=7 make --silent
, there is no output. When you use xyz=9 make --silent
, it outputs urk!! 9
as expected.