Subject: Re: CVS commit: src/usr.bin/crunch/crunchgen
To: None <source-changes@NetBSD.org>
From: Luke Mewburn <lukem@NetBSD.org>
List: source-changes
Date: 01/31/2005 18:27:01
--afReowZ/oS2gITrV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jan 31, 2005 at 01:16:12AM -0600, James Chacon wrote:
  | On Sun, Jan 30, 2005 at 11:04:33PM +0000, Luke Mewburn wrote:
  | >=20
  | > Module Name:	src
  | > Committed By:	lukem
  | > Date:		Sun Jan 30 23:04:33 UTC 2005
  | >=20
  | > Modified Files:
  | > 	src/usr.bin/crunch/crunchgen: crunchgen.c
  | >=20
  | > Log Message:
  | > Explicitly cd to the .OBJDIR in the  ${PROG}.strip  target.
  | > This fixes the "make -j N dependall" build issues people were
  | > seeing in src/rescue, that appears to have been introduced
  | > in rev 1.62.
  |=20
  | Why is this needed? Even for -j isn't make always going to do a chdir(2)
  | into $.OBJDIR before exec'ing the target commands?

I added some debug code in that target's { ... } shell block
and noticed that the pwd(1) was ${.CURDIR} not ${.OBJDIR}.
I didn't investigate why that was the case; I just fixed it
in the simplest solution at the time.

Note that if that shell block in ${PROG}.strip was using ${.TARGET}
(and filenames derived from that) instead of ${PROG}, I expect that
it would have worked, because make(1) does get that right.

I suspect that the entire ${PROG}.strip (et al) stuff could be
done in a better way using make's internal handling of timestamps...

--afReowZ/oS2gITrV
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iD8DBQFB/d3FpBhtmn8zJHIRAnEGAJ0Te8CnZ8DHmy58awpCdngqGj68RACbByJJ
+VhzvrptSlp+3rDFNn2eoco=
=7nHS
-----END PGP SIGNATURE-----

--afReowZ/oS2gITrV--