From owner-freebsd-ports Sat Aug 16 17:42:25 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id RAA21196 for ports-outgoing; Sat, 16 Aug 1997 17:42:25 -0700 (PDT) Received: from alpha.xerox.com (alpha.Xerox.COM [13.1.64.93]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id RAA21190 for ; Sat, 16 Aug 1997 17:42:23 -0700 (PDT) Received: from crevenia.parc.xerox.com ([13.2.116.11]) by alpha.xerox.com with SMTP id <52990(4)>; Sat, 16 Aug 1997 17:41:46 PDT Received: by crevenia.parc.xerox.com id <177513>; Sat, 16 Aug 1997 17:41:38 -0700 From: Bill Fenner To: chuckr@glue.umd.edu, ports@freebsd.org Subject: Re: setting a var Message-Id: <97Aug16.174138pdt.177513@crevenia.parc.xerox.com> Date: Sat, 16 Aug 1997 17:41:33 PDT Sender: owner-freebsd-ports@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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