From owner-freebsd-bugs Wed Feb 4 08:30:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA11665 for freebsd-bugs-outgoing; Wed, 4 Feb 1998 08:30:44 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA11656; Wed, 4 Feb 1998 08:30:38 -0800 (PST) (envelope-from wpaul@FreeBSD.org) From: Bill Paul Received: (from wpaul@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id IAA21152; Wed, 4 Feb 1998 08:30:04 -0800 (PST) Date: Wed, 4 Feb 1998 08:30:04 -0800 (PST) Message-Id: <199802041630.IAA21152@freefall.freebsd.org> To: tom@sdf.com, wpaul@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG Subject: Re: bin/5571 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe freebsd-bugs" Synopsis: /var/yp/Makefile does not use temporary files properly State-Changed-From-To: open-closed State-Changed-By: wpaul State-Changed-When: Wed Feb 4 08:22:26 PST 1998 State-Changed-Why: I have modified Makefile.yp in both -current and the 2.2.5 branch so that it no longer needs to create /tmp/ypmake. The reason I had that there in the first place is kind of dump. In a Makefile, if I say: FOO = 'echo $$$$' this does not, as you might expect, assign the current PID ($$) to FOO and keep it there so that it can be referenced as $(FOO), thus yielding the same PID each time. Instead, every time you reference $(FOO), it gets re-evaluated, so multiple references to $(FOO) yields different PIDs each time, which is not what I want. I tried to work around this by writing the PID to a file once so that I could call up the same value a couple different times without it changing unexpectedly. What I did now was to simply append the two commands that need to use $$ together using a semicolon (yp_mkdb -o foo.$$; mv foo.$$ foo) so that both commands are executed in the same subshell and thus the PID won't change. -Bill