[GRASS-dev] [GRASS-SVN] r62246 - grass/trunk/include/Make

Glynn Clements glynn at gclements.plus.com
Wed Oct 22 17:19:14 PDT 2014


Markus Neteler wrote:

> > I have no plans to use in the Makefiles. I added it mainly so that the
> > user can use e.g.
> >
> >         make 'OBJDIR=$(GRASS_HOME)/OBJ.$(ARCH)/$(RELDIR)' ...
> >
> > to place all[1] intermediate files in a single directory (which
> > doesn't have to be within the GRASS source tree) rather than scattered
> > throughout the source directory. This may be desirable for multiple
> > builds for a single $(ARCH) or for performing builds from a read-only
> > source tree.
> >
> > [1] Currently, the files generated by lex/yacc are placed in the
> > source directory rather than in $(OBJDIR).
> 
> Would that also address (to some extent) this request?
> 
> http://trac.osgeo.org/grass/ticket/1465
> "Out-of-place builds unsupported"

Yes.

FWIW, that approach was usually possible before (occasionally I've had
to clean up issues that prevent it); this change just lets you remove
the unnecessary $(GRASS_HOME) prefix from the subdirectories.

OTOH, it's probably still not sufficient for most of the cases where
you need an out-of-place build. The files generated by configure go
into the source tree, so you can't perform multiple concurrent builds
for different architectures because there's only one config.h,
Platform.make, etc.

Other files which go into the source tree include the files generated
by lex/yacc, the *_to_translate.c files generated for scripts, and the
pyc files generated when importing Python modules.

To get a complete list, build with the above OBJDIR= setting then use
"svn status --no-ignore" afterwards.

The normal way to implement out-of-tree builds is to run configure and
make with the build directory as the current directory and add the
source directory to VPATH. But this would require some work on the
Makefiles to get it to work.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list