[colug-432] Makefile Help
Joshua Kramer
joskra42.list at gmail.com
Sun Jul 28 21:03:02 EDT 2013
Hello Colug,
Does anyone know how to test for a file's presence and set a Make variable
accordingly?
I have an apache module that needs one of two structure elements, depending
on whether it's 2.2 or 2.4. I have the following function in my makefile:
# Test for presence of /etc/redhat-release:
which-version: $(DEFS)
export DEFS=-DDEF_REMOTE_IP=client_ip;
if test -f /etc/redhat-release; then \
echo RedhatRelease is present. ; \
export DEFS=-DDEF_REMOTE_IP=remote_ip; \
fi;
echo DEFS is "$(DEFS)"
$(DEFS) is never getting set. What am I doing wrong?
Thanks!
-JK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20130728/753289fd/attachment.html
More information about the colug-432
mailing list