<div dir="ltr"><div><div><div>Hello Colug,<br><br>Does anyone know how to test for a file&#39;s presence and set a Make variable accordingly?<br><br></div>I have an apache module that needs one of two structure elements, depending on whether it&#39;s 2.2 or 2.4.  I have the following function in my makefile:<br>
<br># Test for presence of /etc/redhat-release:<br>which-version:  $(DEFS)<br>        export DEFS=-DDEF_REMOTE_IP=client_ip;<br>        if test -f /etc/redhat-release; then \<br>         echo RedhatRelease is present. ; \<br>
         export DEFS=-DDEF_REMOTE_IP=remote_ip; \<br>        fi;<br>        echo DEFS is &quot;$(DEFS)&quot;<br><br></div>$(DEFS) is never getting set.  What am I doing wrong?<br><br>Thanks!<br></div>-JK<br></div>