[colug-432] Makefile Help

Steve Roggenkamp roggenkamps at acm.org
Sun Jul 28 21:13:11 EDT 2013


Do you have a tab character as the first character in the executable line?
This is the classic makefile mistake.
 On Jul 28, 2013 9:03 PM, "Joshua Kramer" <joskra42.list at gmail.com> wrote:

> 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
>
> _______________________________________________
> colug-432 mailing list
> colug-432 at colug.net
> http://lists.colug.net/mailman/listinfo/colug-432
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20130728/6bd2056d/attachment.html 


More information about the colug-432 mailing list