Subject: Re: CVS commit: basesrc
To: Simon Burge <simonb@netbsd.org>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: tech-userlevel
Date: 12/03/1999 18:08:28
On Sat, 4 Dec 1999, Simon Burge wrote:

> Bill Sommerfeld wrote:
> 
> In my case, I had a new source tree that I wanted to point to an
> existing obj tree which is almost the opposite of what you were
> trying to achieve.  I can see at least a couple of possiblities
> here:

I'm confused - what exactly are you wanting to do? Do you do this often?

One big reason to do a make clean before make obj in a tree you've built
is that otherwise you can get weird build errors. When programs .PATH in
other .c files, if there wasn't a make clean before make obj, the .PATH
can fild stale files, ruining a build. :-)

>  * User hasn't been using obj dirs and wants too (your case)
> 	make cleandir
> 	make obj
> 	make share/tmac
>  * User wants to add any missing obj dirs
> 	order doesn't matter
>  * User wants to use new source tree with old obj dirs (my case)
> 	make obj
> 	make cleandir
> 	make share/tmac
> 
> So what about:
> 
> 	.if MKSHARE
> 		make share/mk
> 	.endif
> 	.if !UPDATE
> 		make cleandir
> 	.endif
> 	.if MKOBJDIRS
> 		make obj
> 	.if !UPDATE
> 		make cleandir
> 	.endif
> 	.endif
> 	.if MKSHARE
> 		make share/tmac
> 	.endif
> 
> Does that catch everything?  It's an extra "make cleandir" but I'm
> guessing that you wouldn't set MKOBJDIRS in /etc/mk.conf all the
> time ... which leads to...

I think we'd be setting MKOBJDIRS all the time (those of us who use them)
so that we catch new programs. So I'd rather not add the extra make
cleandir..

Take care,

Bill