Subject: Re: CVS commit: pkgsrc
To: Dr. Lex Wennmacher <wennmach@geo.Uni-Koeln.DE>
From: Alistair Crooks <agc@pkgsrc.org>
List: pkgsrc-changes
Date: 04/10/2001 14:45:35
WRKDIR is defined in bsd.pkg.mk.

If you need to refer to it in one of the cpp-like statements,
that statement must come after WRKDIR is defined.

(I've not tested this)

Regards,
Alistair

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/parallel/mpi-ch/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- Makefile	2001/04/09 12:00:49	1.17
+++ Makefile	2001/04/10 13:44:50
@@ -24,11 +24,6 @@
 CONFIGURE_ARGS+=	-make=${GMAKE} --with-mpe -rsh=ssh -opt=-O -nodevdebug
 CONFIGURE_ARGS+=	--disable-f90 --disable-f90modules
 
-.include "../../mk/bsd.prefs.mk"
-
-.if exists(${WRKDIR}/with-java)
-PLIST_SRC+=		${PKGDIR}/PLIST.java
-.endif
 PLIST_SRC+=		${PKGDIR}/PLIST
 
 post-build:
@@ -51,3 +46,7 @@
 	@${CHMOD} 755 ${PREFIX}/sbin/mpiuninstall
 
 .include "../../mk/bsd.pkg.mk"
+
+.if exists(${WRKDIR}/with-java)
+PLIST_SRC+=		${PKGDIR}/PLIST.java
+.endif

On Tue, Apr 10, 2001 at 03:38:23PM +0200, Dr. Lex Wennmacher wrote:
> Hi Thomas!
> 
> I appreciate your steady maintenance work on pkgsrc, but this change (see
> below) will actually *break* mpi-ch:
> 
> diff -u -r1.16 -r1.17
> --- pkgsrc/parallel/mpi-ch/Makefile     2001/04/05 17:56:19     1.16
> +++ pkgsrc/parallel/mpi-ch/Makefile     2001/04/09 12:00:49     1.17
> @@ -1,4 +1,4 @@
> -# $NetBSD: Makefile,v 1.16 2001/04/05 17:56:19 wennmach Exp $
> +# $NetBSD: Makefile,v 1.17 2001/04/09 12:00:49 wiz Exp $
> 
>  DISTNAME=              mpich-1.2.1
>  CATEGORIES=            parallel
> @@ -26,14 +26,14 @@
> 
>  .include "../../mk/bsd.prefs.mk"
> 
> -.if exists(work/with-java)
> +.if exists(${WRKDIR}/with-java)
> 
> 
> The problem here is that variable expansion inside exists() does not work. I
> don't know if this is a bug or a feature of make. Maybe I should file a PR,
> what do people think?
> With your change, this effectively is translated to .if exists(/with-java) and
> that will fail.
> 
> 
>  PLIST_SRC+=            ${PKGDIR}/PLIST.java
>  .endif
>  PLIST_SRC+=            ${PKGDIR}/PLIST
> 
>  post-build:
>         @(if [ -e ${WRKSRC}/mpe/viewers/jumpshot-2/bin/jumpshot ]; then \
> -               ${TOUCH} work/with-java; \
> +               ${TOUCH} ${WRKDIR}/with-java; \
>         fi)
> 
> 
> This change is ok, but undesirable. Unless someone has a good idea how to solve
> this problem, I'd prefer if you could undo this commit.
> 
> Thanks,
> Lex
> 
> PS: I should have warned about this in a comment.
> 
> 
> > Subject: CVS commit: pkgsrc
> > To: None <pkgsrc-changes@netbsd.org>
> > From: Thomas Klausner <wiz@netbsd.org>
> > List: pkgsrc-changes
> > Date: 04/09/2001 15:00:49
> >
> > Module Name:    pkgsrc
> > Committed By:   wiz
> > Date:           Mon Apr  9 12:00:49 UTC 2001
> >
> > Modified Files:
> >         pkgsrc/parallel/mpi-ch: Makefile
> >
> > Log Message:
> > replace work with ${WRKDIR}
> >
> >
> > To generate a diff of this commit:
> > cvs rdiff -r1.16 -r1.17 pkgsrc/parallel/mpi-ch/Makefile
> >
> > Please note that diffs are not public domain; they are subject to the
> > copyright notices on the relevant files.