Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: Seeking advice on ZIP drives & such w/ Linux



On Wed, Dec 17, 1997 at 02:03:13PM +0900, Stephen J. Turnbull wrote:

> Learn about the VPATH capability of GNU make.  It is often possible to
> have your sources in one place and do the build in another.  Many GNU
> packages allow the --srcdir option to configure.  (I don't do this---
> it's really designed for cross-compiling environments---but if you try
> it and want some company, I'd be happy to go at it with you, could
> come handy some day ;-)  

All GNU packages use autoconf-generated configure scripts, and all of
them (unless broken) support building the source in a directory other
than the source directory.  Any GNU packages which use automake most
definitely support it.

The --srcdir option isn't required.  You can build like this:

  tar zxvf newthing-1.2.tar.gz
  mkdir build
  cd build
 ../newthing-1.2/configure ...

I believe VPATH is a part of POSIX make, so it _should_ work on any
POSIX.1 type system.  NB SunOS is not a POSIX.1 system.

Building your objects in a separate place really has nothing to do with
cross-compiling.  The two benefits it provides are a read-only source
area, and the ability to easily have multiple build areas.

So if you're building in build/ and somehow run in to problems, you can
get back to a known state by just removing the entire build/ directory
and rerunning configure.

You can name your build directories with a part including architecture
for multihost builds.  So you might have

  build.sunos
  build.solaris
  build.linux

all built out of a single source directory.  (presumably you'd be NFS
mounting all of this or something).

For the EGCS 1.0 release (which went out a week or two ago--yay!!), the
most tested build method is to build outside your source directory.

Jason
---------------------------------------------------------------
TLUG Meeting: To be announced
---------------------------------------------------------------
a word from the sponsor:
TWICS - Japan's First Public-Access Internet System
www.twics.com  info@example.com  Tel:03-3351-5977  Fax:03-3353-6096



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links