Subject: Re: problem with sh's Makefile
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-userlevel
Date: 06/14/1999 15:00:18
[ Cleaning up email ]

Manuel,

Is the following still a problem for you?  I just tried to build
distrib/utils/x_sh, and I didn't need to change the ./ to ${.OBJDIR}
for this to work with or without objdirs...

Simon.
--
Manuel Bouyer wrote:

> 
> --WIyZ46R2i8wDzkSu
> Content-Type: text/plain; charset=us-ascii
> 
> On Thu, Apr 15, 1999 at 06:17:46AM +1000, Simon Burge wrote:
> > Manuel Bouyer wrote:
> > 
> > > Hi,
> > > There's a problem in the src/bin/sh/Makefile which causes the i386 miniroot
> > > build to fails, because it tries to execute
> > > .//share/1.4/src/distrib/utils/../../bin/sh/mkinit
> > > (note the leading './').
> > > This is because of the following rule:
> > > init.c: mkinit ${SHSRCS}
> > > 	./${.ALLSRC}
> > > Changing this to 
> > > init.c: mkinit ${SHSRCS}
> > > 	${.ALLSRC}
> > > will break if there's no '.' in $PATH (unless I missed something).
> > > Does someone have an idea on a better solution ?
> > 
> > Does the following do the trick? 
> 
> I allows me to compile both the miniroot's x_sh and bin/sh ...
> seems OK.
> 
> > It works for me with obj-machine
> > dirs.  If so, how many of the other ./${.ALLSRC} should be changed to
> > ${.OBJDIR}?
> 
> Well, I think all the ones that are in bin/sh/Makefile (see diff below)
> 
> Unfortunably I will not have the time to look at this any more before
> I leave for vacations.
> 
> --
> Manuel Bouyer <bouyer@antioche.eu.org>
> --
> 
> 
> 
> --WIyZ46R2i8wDzkSu
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: attachment; filename="sh.diff"
> 
> ? builtins.c
> ? builtins.h
> ? mknodes
> ? nodes.h
> ? nodes.c
> ? mksyntax
> ? syntax.c
> ? syntax.h
> ? token.h
> ? arith.h
> ? arith.c
> ? arith_lex.c
> ? mkinit
> ? init.c
> ? sh
> ? sh.cat1
> Index: Makefile
> ===================================================================
> RCS file: /cvsroot/src/bin/sh/Makefile,v
> retrieving revision 1.48
> diff -u -r1.48 Makefile
> --- Makefile	1999/02/05 22:19:47	1.48
> +++ Makefile	1999/04/15 10:19:37
> @@ -30,13 +30,13 @@
>  	sh ${.ALLSRC} ${.OBJDIR}
>  
>  init.c: mkinit ${SHSRCS}
> -	./${.ALLSRC}
> +	${.OBJDIR}/${.ALLSRC}
>  
>  nodes.c nodes.h: mknodes nodetypes nodes.c.pat
> -	./${.ALLSRC}
> +	${.OBJDIR}/${.ALLSRC}
>  
>  syntax.c syntax.h: mksyntax
> -	./${.ALLSRC}
> +	${.OBJDIR}/${.ALLSRC}
>  
>  mkinit: mkinit.c
>  	${HOST_LINK.c} -o mkinit ${.IMPSRC}
> 
> --WIyZ46R2i8wDzkSu--
>