Subject: Re: pkg/29135: x11/xorg-libs build failure on OpenBSD
To: None <xtraeme@netbsd.org, gnats-admin@netbsd.org,>
From: Hiramatsu Yoshifumi <hiramatu@boreas.dti.ne.jp>
List: pkgsrc-bugs
Date: 01/28/2005 13:14:01
The following reply was made to PR pkg/29135; it has been noted by GNATS.

From: Hiramatsu Yoshifumi <hiramatu@boreas.dti.ne.jp>
To: Juan RP <juan@xtraeme.nopcode.org>
Cc: gnats-bugs@netbsd.org, gnats-admin@netbsd.org,
	pkgsrc-bugs@netbsd.org
Subject: Re: pkg/29135: x11/xorg-libs build failure on OpenBSD
Date: Fri, 28 Jan 2005 22:13:34 +0900

 Hello,
 
 I tried your patch but it didn't work because makefile expressions are
 evaluated before make targets are executed.
 
 At Thu, 27 Jan 2005 16:17:15 +0100,
 Juan RP <juan@xtraeme.nopcode.org> wrote:
 > Index: Makefile.common
 > ===================================================================
 > RCS file: /cvsroot/pkgsrc/meta-pkgs/xorg/Makefile.common,v
 > retrieving revision 1.16
 > diff -b -u -u -r1.16 Makefile.common
 > --- Makefile.common     25 Jan 2005 17:49:57 -0000      1.16
 > +++ Makefile.common     27 Jan 2005 15:15:46 -0000
 > @@ -216,8 +216,10 @@
 >  .endif
 >  
 >  .  for F in ${SYSTEMS}
 > +.    if exists(${WRKSRC}/config/cf/${F}.cf)
 >         @${MV} ${WRKSRC}/config/cf/${F}.cf \
 >                 ${WRKSRC}/config/cf/${F}.cf.in
 > +.    endif
 >  .  endfor
 >  .  undef F
 
 . if exists(${WRKSRC}/config/cf/${F}.cf)
 
 becomes always false because this line is evaluated before xorg sources are
 extracted.
 
 Why don't you use /bin/sh builtin test command instead?
 
 Index: Makefile.common
 ===================================================================
 RCS file: /cvsroot/pkgsrc/meta-pkgs/xorg/Makefile.common,v
 retrieving revision 1.16
 diff -b -u -r1.16 Makefile.common
 --- Makefile.common     25 Jan 2005 17:49:57 -0000      1.16
 +++ Makefile.common     28 Jan 2005 12:58:42 -0000
 @@ -216,8 +216,10 @@
  .endif
  
  .  for F in ${SYSTEMS}
 -       @${MV} ${WRKSRC}/config/cf/${F}.cf \
 -               ${WRKSRC}/config/cf/${F}.cf.in
 +       @if ${TEST} -f ${WRKSRC}/config/cf/${F}.cf; then \
 +       ${MV} ${WRKSRC}/config/cf/${F}.cf \
 +               ${WRKSRC}/config/cf/${F}.cf.in ; \
 +       fi
  .  endfor
  .  undef F
 
 -- 
 // Hiramatsu Yoshifumi
 // hiramatu@boreas.dti.ne.jp