Linking in revised modules

Darrell McCauley mccauley at ecn.purdue.edu
Mon Aug 10 06:51:37 EDT 1992


>Another beginner's question, I'm afraid. We have GRASS as a production system,
>serving multiple users. I didn't install it, although I have read the relevant
>docs. I'm wanting to tinker with a couple of modules, but the systems manager

just copy the entire directory of what you want to tinker with. For example,
cp -r $GISBASE/src/raster/r.los mydirectory

Edit the Gmakefile so that the binary gets a different name (and
directory), then tinker away (compile with gmake4.0). For example, the
Gmakefile should have a line that looks like:

$(BIN_MAIN_CMD)/$(PGM): $(LIST) $(GISLIB) $(DISPLAYLIB) $(SEGMENTLIB)
        $(CC) $(LDFLAGS) -o $@ $(LIST) $(DISPLAYLIB) $(GISLIB) $(SEGMENTLIB) 

change this to read 

$(PGM): $(LIST) $(GISLIB) $(DISPLAYLIB) $(SEGMENTLIB)
        $(CC) $(LDFLAGS) -o $@ $(LIST) $(DISPLAYLIB) $(GISLIB) $(SEGMENTLIB) 

Also, change the line that defines PGM to avoid all confusion.  Unless
you add a feature that requires another library, gmake4.0 should work
fine for compiling. gmake4.0 should be accessible just like the grass4.0
script. If not, complain to your sysadmin.

>is naturally concerned about data protection. He has basically insisted that I
>take a copy and recompile. This is an easy solution, but expensive on disk

I don't see how this is an issue unless he's wanting to keep a virgin copy
of the grass source. If he doesn't want you to touch *data* (as opposed
to code), it should be protected.

>space. It seems to me that in principle I ought to be able to use the link
>script to substitute the necessary modules and then give the user an alternate
>command to invoke the revised system. Can someone please confirm whether this
>is possible and maybe flag some of the anticipated problems?

--Darrell McCauley, Purdue University



More information about the grass-dev mailing list