[GRASS5] Compiling my source
glynn at gclements.plus.com
Mon Nov 15 12:40:39 EST 2004
Damiano Triglione wrote:
> while I don't have any problem compiling Grass 5.4.0 sources, when it's the
> turn to compile my little module there are some strange error messages that
> I never encountered in Grass 4.x and 5.0b.
> Let's make an example: I am in a directory where there are all my .c and .h
> files, along with the Gmakefile. With older grass 5.0 when I type gmake5
> everything goes ok. But with grass5.4 when I type gmake54 I have the
> bash: gmake54: command not found
> So I realize that the command is in the build directory, so I type
> and now I have:
> make: Entering directory '/home/damiano/mysrc/rr044'
> make: *** no rule to make target 'dir'. Stop.
> make: Leaving directory '/home/damiano/mysrc/rr044'
> I cannot understand why it does not accept the Gmakefile present in rr044/
The gmake54 script which is present when you use --disable-gmake
(which is the default for 5.4.0) doesn't use Gmakefiles. It uses the
makefiles which are built by "make makefiles" (which is the first step
in the build process).
Essentially, it won't work with anything which is outside of the GRASS
source tree. If you want to build add-on modules, you can either:
a) use "configure --enable-gmake ...", to use the old build system,
b) place your source code inside the GRASS source tree (then,
"make makefiles" will automatically build a makefile from your
c) write your own Makefile which doesn't rely upon the GRASS build
system, and just run "make".
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev