[GRASS-dev] file input for r.reclass etc

Glynn Clements glynn at gclements.plus.com
Wed Jun 27 00:32:59 EDT 2007


Michael Barton wrote:

> I recompiled all of GRASS (after a make distclean) just before you committed
> your change to r.recode. Then I just updated and compiled r.recode, without
> recompiling all the rest. Is this a problem? Do I need to recompile the
> whole enchilada again?

No.

You don't need to compile from scratch if the only files which have
changed are the source and header files in the module's directory. The
Makefile will notice that those have changed and re-compile what's
required (if any header file in the directory changes, it will
re-compile all object files).

You only need to force re-compilation (with "make clean") if there is
a change to a dependency which isn't listed as such in the module's
Makefile. This essentially means a change to the project-wide header
files, the Makefile fragments in include/Make, the configure script or
the libraries.

If a library is modified, you can just run "make" on the library's
directory, then on the directories of the modules which use it. The
modules will be re-linked if any of the libraries which they use have
changed. Running "make" from the top-level directory will handle all
of this (re-compiling libraries and re-linking whatever uses them),
without re-compiling or re-linking anything unnecessarily.

OTOH, If there are changes to project-wide header files or the
Makefile fragments, you really need to run "make clean" first, as
there is no record of whether a file depends upon any of these. 
Similarly, if the configure script changes, you need to run "make
distclean" then re-run configure.

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




More information about the grass-dev mailing list