Subject: Re: Running just one -current program.
To: Giles Lean <giles@nemeton.com.au>
From: Richard Rauch <rkr@olib.org>
List: current-users
Date: 02/04/2003 06:42:29
On Tue, Feb 04, 2003 at 08:25:30PM +1100, Giles Lean wrote:
> 
> > If one doesn't have a machine to spare for -current, what's the
> > best way to work on a relatively static program?  Unpack 1.6 sources
> > and work on that?  Link against the *installed* 1.6 libraries?
> 
> Yes -- just compile your program on 1.6.  You will quite likely

Well, I asked because when I tried that initially (in a freshly set
up -current source tree), "make" or "make window" in the appropriate
directory failed.  It seemed to want all of the context for making
everything, so I stepped up to the top level and did "./bulid.sh build".

And that's about where I was when I posted the above.  (Trying to set
MKPIC=no and exporting didn't eliminate the shared library dependancy
on libutil.so.7 (and pro'ly others), even though I did a complete rebuild
after seetting MKPIC.)

So I've *tried*.  Telling me that it can be done doesn't get me
any closer.  How do I do it using make or build.sh?  Should I
mix-and-match source trees ("cvs update -PAd -r netbsd-1-6" in
the top level, and "cvs update -PAd" in the specific program's
directory?  I didn't think to try that one...)


Sometime after posting, I gave up and just decided that the various
gcc options that the Makefile set were probably not necessary and did:

  gcc *.c -o window -ltermcap -lutil

...which works.  And only takes about as long to compile as compiling
"hello.c" to "hello.o" back on my Amiga when I was first learning C.
(^&  (Maybe even less time.)


It'd be nice to be able to use the Makefile, though.


 [...]
> It might help if you said what you're trying to build, hint hint. :-)

[Err, "window".  See above.  Sorry.  (^&]

I started to write a lengthier message originally, then decided it was
too verbose.   Besides, the problem is general: I'd like to use
"make" to build some or all of -current, but want the userland to
build against the libraries that I actually have installed.  In many
cases, with a reasonably up-to-date installation, -current versions of
the libraries shouldn't be required.  (Yes, obviously it will sometimes
matter...)

I apparently dropped the reference to the specific program.


For concreteness: 1.6 (proper) sources are in /usr/src.  -current
sources are in ~/prog/curr/src, with DESTDIR=~/prog/curr/dest and
UNPRIVED set.


-- 
  "I probably don't know what I'm talking about."  --rkr@olib.org