Dan Langille wrote:

On 18 Dec 2003 at 19:02, Dan Langille wrote:



My goal is provide a way to override values in a Makefile with values
from a local config file.



I'm getting further. What's the proper way to do an include?


[EMAIL PROTECTED]:~] $ cat Makefile
A?="things"

all:
       @echo A is $A
       if [ -r ${HOME}/.bacula-regress ] ; then \
               echo loading tha file; \
               .include "${HOME}/.bacula-regress" ; \
       fi

       @echo A is $A
[EMAIL PROTECTED]:~] $ cat .bacula-regress
BACULA_SOURCE="${HOME}/src/bacula-cvs"
[EMAIL PROTECTED]
AUTOCHANGER="/dev/null"

A="stuff"
echo yes, we have stuff here.
[EMAIL PROTECTED]:~] $ make
A is things
if [ -r /home/dan/.bacula-regress ] ; then echo loading tha file; .include "/home/dan/.bacula-regress" ; fi
loading tha file
.include: not found
*** Error code 127


.if exists(your filename, relative to /usr/share/mk)
.include <whatever>    or
include (not documented, but it works, abs path)
.endif

Stop in /usr/home/dan.
[EMAIL PROTECTED]:~] $




_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to