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

Hi Glynn,

can you please comment on 62246 or add documentation for it? Commit message does not tell much, it is not (yet?) used anywhere and I don’t understand the relation to %reldir% [1].

Thanks,
Vaclav

[1] http://www.gnu.org/software/automake/manual/html_node/Include.html

···

On Sun, Oct 12, 2014 at 8:15 AM, <svn_grass@osgeo.org> wrote:

Author: glynn
Date: 2014-10-12 05:15:11 -0700 (Sun, 12 Oct 2014)
New Revision: 62246

Modified:
grass/trunk/include/Make/Grass.make
Log:
Add RELDIR

Modified: grass/trunk/include/Make/Grass.make

— grass/trunk/include/Make/Grass.make 2014-10-12 12:08:22 UTC (rev 62245)
+++ grass/trunk/include/Make/Grass.make 2014-10-12 12:15:11 UTC (rev 62246)
@@ -19,6 +19,8 @@

#########################################################################

+RELDIR := $(subst $(GRASS_HOME)/,$(CURDIR))
+

GRASS global directories and constants

platform specific dirs

ARCH_DISTDIR = $(GRASS_HOME)/dist.$(ARCH)


grass-commit mailing list
grass-commit@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-commit

Vaclav Petras wrote:

can you please comment on 62246 or add documentation for it? Commit message
does not tell much,

$(RELDIR) is simply the current directory relative to the root of the
GRASS source tree.

it is not (yet?) used anywhere

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).

and I don't understand the relation to %reldir% [1].

No relation.

[1] http://www.gnu.org/software/automake/manual/html_node/Include.html

That refers to automake, which we don't use.

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

On Tue, Oct 21, 2014 at 4:08 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Vaclav Petras wrote:

can you please comment on 62246 or add documentation for it? Commit message
does not tell much,

$(RELDIR) is simply the current directory relative to the root of the
GRASS source tree.

it is not (yet?) used anywhere

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"

?

Markus

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@gclements.plus.com>