Date: Sat, 16 Aug 1997 17:41:33 PDT From: Bill Fenner <fenner@parc.xerox.com> To: chuckr@glue.umd.edu, ports@freebsd.org Subject: Re: setting a var Message-ID: <97Aug16.174138pdt.177513@crevenia.parc.xerox.com>
next in thread | raw e-mail | index | archive | help
>I have a port nearly ready, of a2ps. Is this different than print/a2ps? >One thing ... I tried doing PAPERSIZE!= cat $(WRKDIR)/.media ... it says >work/.media: not found. Like it's trying to execute the file. I tried that and it worked fine. I'd suggest surrounding it by ".if exists" so that you don't get errors when it doesn't exist -- if I do: PAPERSIZE!= cat /tmp/.media all: @echo ${PAPERSIZE} % make cat: /tmp/.media: No such file or directory "Makefile", line 1: warning: Couldn't read shell's output "Makefile", line 1: warning: "cat /tmp/.media" returned non-zero but .if exists(/tmp/.media) PAPERSIZE!= cat /tmp/.media .endif all: @echo ${PAPERSIZE} does: hub% make PAPERSIZE=booga booga hub% echo fooga > /tmp/.media hub% make PAPERSIZE=booga booga hub% make fooga (watch out for that last one -- it says that the user can override your file on the make command line...) Bill
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?97Aug16.174138pdt.177513>