[GRASS-dev] Re: proposal for grass extensions and addons

William Kyngesburye woklist at kyngchaos.com
Thu Sep 20 07:35:24 EDT 2007


This looks familiar from when I first noticed the makefile bits  
getting installed.  I work around most of it in my OSX modbuild setup  
by modifying grass.make and platform.make.

It would be nice to get it cleaned up and working - no need for my  
OSX hack.

A big problem I see is that INST_NOW.  That's just what I need to  
avoid for the OSX app build - installing (or building) into the  
binary distribution.  I avoid that in my modbuild by having a local/ 
external copy of the makefile bits in a folder layout like the  
source, so modules get built into the local distdir.

On Sep 20, 2007, at 4:36 AM, Glynn Clements wrote:

> At present, using it is probably a bit more complex than it needs to
> be. The *.make files still contain some references to the source
> directory, which need to be overridden. Specifically, Platform.make
> has:
>
> 	GRASS_HOME          = /usr/local/src/grass/cvs
> 	RUN_GISBASE         = /usr/local/src/grass/cvs/dist.i686-pc-linux-gnu
>
> RUN_GISBASE is used for the dummy session for running GRASS commands
> during the build process, for generating the HTML files (Html.make)
> and getting strings to translate from scripts (Script.make). In both
> cases, it's used like:
>
> 	GISRC=$(RUN_GISBASE)/demolocation/.grassrc${GRASS_VERSION_MAJOR}$ 
> {GRASS_VERSION_MINOR} \
> 	GISBASE=$(RUN_GISBASE) \
>
> Note that the demolocation directory *isn't* installed.
>
> GRASS_HOME is used in a number of places; Grass.make has:
>
> 	ARCH_DISTDIR    = $(GRASS_HOME)/dist.$(ARCH)
> 	ARCH_BINDIR     = $(GRASS_HOME)/bin.$(ARCH)
> 	GRASS_INCDIR    = $(GRASS_HOME)/include
> 	GRASS_LIBDIR    = $(GRASS_HOME)/lib
>
> 	...
>
> 	ifdef INST_NOW
> 	ARCH_DISTDIR = $(INST_DIR)
> 	ARCH_BINDIR = $(UNIX_BIN)
> 	endif
>
> While Dir.make has:
>
> 	$(MAKE) -C $$subdir || echo $(CURDIR)/$$subdir >> $(GRASS_HOME)/ 
> error.log; \
>
> and Script.make has:
>
> 	$(BIN)/$(PGM).bat: $(GRASS_HOME)/scripts/windows_launch.bat
> 		sed -e "s#SCRIPT_NAME#$(PGM)#" $(GRASS_HOME)/scripts/ 
> windows_launch.bat > $@
>
> If you forget about Script.make and Html.make for now, you will
> probably need to use something like:
>
> 	make ... GRASS_HOME=. INST_NOW=y MODULE_TOPDIR=/usr/local/ 
> grass-6.3.cvs
>
> The other variables are less important.
>
> ARCH_BINDIR is only used for the grass63[.bat] script.
>
> GRASS_INCDIR is erroneously used for dependencies in a small number of
> Makefiles (the actual -I switches refer to ARCH_INCDIR, which is
> dist.<arch>/include).
>
> GRASS_LIBDIR is only used to find a couple of DBMI headers using:
>
> 	-I$(GRASS_LIBDIR)/db/dbmi_driver
>
> As for fixes:
>
> GRASS_INCDIR and GRASS_LIBDIR can probably be eliminated relatively
> easily.
>
> RUN_GISBASE should be split into RUN_GISBASE and RUN_GISRC.
>
> The demolocation directory should be installed, along with a grassrc
> file which refers to it.
>
> There should be a specific ERRORLOG variable for error.log.
>
> INST_NOW=y should set RUN_GISBASE and RUN_GISRC to point to the
> installed versions, and ERRORLOG to "./error.log".
>
> -- 
> Glynn Clements <glynn at gclements.plus.com>

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled  
with hyena offal?
Second Pogril: I don't know.  Why IS life like sticking your head in  
a bucket filled with hyena offal?
First Pogril: I don't know either.  Wretched, isn't it?

-HitchHiker's Guide to the Galaxy





More information about the grass-dev mailing list