[GRASS5] Script to build babyGRASS for handhelds

Glynn Clements glynn.clements at virgin.net
Wed Apr 24 13:43:09 EDT 2002


Markus Neteler wrote:

> > > >  > If you're looking to save memory, generate stripped binaries, e.g.
> > > >  > You could also try optimising for size:
> > > > 
> > > > Both good points.
> > > 
> > > Thanks - have update that. I currently face the problem that
> > > mk/vars.mk
> > > does not get the prefix/bindir from configure. But that's
> > > eventually not yet implemented (will find a workaround).

Actually, mk/vars.mk does get these:

	prefix              = /opt
	exec_prefix         = ${prefix}
	UNIX_BIN            = /usr/local/bin

> > What use would that be?
> > 
> > The only part of the build process which should need to know the
> > prefix is the "install" target.
> 
> my ideas was to build standard GRASs and babyGRASS in the same
> directory (with shared libs). Currently babyGRASS compilation is
> overwriting everything in dist.$ARCH. I wanted to write
> to ./babyGRASS/dist.$ARCH to protect the standard compilation.
> A bit tricky perhaps.

Right, but that isn't related to prefix/bindir; those are the
installation paths. The staging paths are GISBASE (dist.<arch>) and
GRASS_BIN (bin.<arch>).

> What you suggest in the mk/README (cd ~/grass-build) is not
> clear to me. But it may be the solution for my problem.

A separate build directory is probably the right solution in this
case, as nothing should be shared. A normal GRASS build should either
be debuggable (-g), or optimised for speed (-O2). A "baby" GRASS
should be optimised for size (-Os), and not have debug info.

Note that "~/grass-build" is just an example. You can have as many
build directories as you like. The makefiles which are generated by
mk/mkmakefiles (or "make makefiles") depend only upon the Gmakefiles;
they will work for any build directory, and any platform.

Also, the alternate build mechanism doesn't write anything to the
source directory, so you don't need to clean anything between builds,
and you can run multiple builds concurrently.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list