Subject: Re: bin/24020: install in src/x11/bin/ssh-askpass fails if using
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Havard Eidnes <he@NetBSD.org>
List: netbsd-bugs
Date: 07/30/2007 18:15:07
The following reply was made to PR toolchain/24020; it has been noted by GNATS.

From: Havard Eidnes <he@NetBSD.org>
To: jmmv@menta.net
Cc: gnats-bugs@NetBSD.org, lukem@netbsd.org, gson@netbsd.org
Subject: Re: bin/24020: install in src/x11/bin/ssh-askpass fails if using
 -j N
Date: Mon, 30 Jul 2007 20:10:45 +0200 (CEST)

 Hi,
 
 a colleague and myself toyed around a bit with this, and didn't
 really understand why all that complicated renaming back and forth
 is necessary at all, especially since it doesn't really work...
 
 So, I think that by simplifying the Makefile we managed to make this
 finally work robustly, and the diff is
 
 
 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/src/x11/bin/ssh-askpass/Makefile,v
 retrieving revision 1.4
 diff -u -r1.4 Makefile
 --- Makefile	29 Jan 2004 01:00:42 -0000	1.4
 +++ Makefile	30 Jul 2007 17:20:09 -0000
 @@ -9,22 +9,10 @@
  
  APPDEFS=	SshAskpass.ad
  
 -BUILDSYMLINKS=	SshAskpass-default.ad SshAskpass.ad
 -
  FILESDIR=	${X11ROOTDIR}/share/examples/ssh-askpass
  FILES=		SshAskpass-1337.ad SshAskpass-NeXTish.ad \
 -		SshAskpass.ad SshAskpass-green.ad SshAskpass-motif.ad
 -
 -# XXX:	We use the following two lines instead of just having
 -# XXX:		FILES+= SshAskpass-default.ad
 -# XXX:	because of an obscure bug with "make -j" where it doesn't find
 -# XXX:	SshAskpass-default.ad in the .PATH correctly, probably because
 -# XXX:	of the rule created for it from BUILDSYMLINKS by <bsd.files.mk>.
 -# XXX:	This is not the correct long-term solution.
 -#
 -FILES+=			SshAskpass.ad
 -FILESNAME_SshAskpass.ad=SshAskpass-default.ad
 -
 +		SshAskpass-green.ad SshAskpass-motif.ad \
 +		SshAskpass-default.ad
  
  CPPFLAGS+=	-I.
  DPSRCS+=	SshAskpass_ad.h
 
 
 In the .PATHed in source directory, SshAskpass.ad is already a
 symlink to SshAskpass-default.ad.  One may then simply install
 SshAskpass-default.ad directly instead of doing that complicated
 dance.
 
 On our test system (4-cpu i386) doing "make install -j 5" now works
 fine where it didn't before.
 
 No file or symlink appears to be created under $DESTDIR by the
 handling of the BUILDSYMLINKS variable, so we just removed that as
 well.  However, that should be OK because the set lists don't
 mention it either -- a distribution + sets build now completes
 nicely.
 
 It would however be nice to know if applying the above patch fixes
 the problem for others as well.
 
 Regards,
 
 - Havard