[GRASS-user] Makefile for v.strahler&co

Annalisa Minelli annagrass6 at gmail.com
Fri Jul 25 15:11:20 EDT 2008


Dear all,
I'm trying to write a working Makefile for v.strahler, r.strahler.sh,
r.broscoe.sh and v.mainchannel, a Makefile that can simultaneously compile C
and Shell modules... and, after some attempt, I found this version:


MODULE_TOPDIR = ../..

PGM = v.mainchannel r.strahler.sh r.broscoe.sh v.strahler

LIBES        = $(DISPLAYLIB) $(RASTERLIB) $(VECTLIB) $(GRAPHLIB) $(DBMILIB)
$(GISLIB)
DEPENDENCIES = $(DISPLAYDEP) $(RASTERDEP) $(VECTDEP) $(GISDEP)
EXTRA_INC = $(VECT_INC)
EXTRA_CFLAGS = $(VECT_CFLAGS)

include $(MODULE_TOPDIR)/include/Make/Module.make
include $(MODULE_TOPDIR)/include/Make/Script.make

default: script


so I do:
- "make clean" in the v.strahler directory
- "make" in the same directory
and I obtain this error:

root at annalisa-laptop:/home/annalisa/grass_dev64/vector/v.strahler# make
../../include/Make/Module.make:14: warning: overriding commands for target `
r.strahler.sh'
../../include/Make/Html.make:40: warning: ignoring old commands for target `
r.strahler.sh'
../../include/Make/Module.make:14: warning: overriding commands for target `
r.broscoe.sh'
../../include/Make/Html.make:40: warning: ignoring old commands for target `
r.broscoe.sh'
../../include/Make/Module.make:20: warning: overriding commands for target `
r.strahler.sh'
../../include/Make/Module.make:14: warning: ignoring old commands for target
`r.strahler.sh'
../../include/Make/Module.make:20: warning: overriding commands for target `
r.broscoe.sh'
../../include/Make/Module.make:14: warning: ignoring old commands for target
`r.broscoe.sh'
../../include/Make/Module.make:20: warning: overriding commands for target
`v.strahler'
../../include/Make/Module.make:14: warning: ignoring old commands for target
`v.strahler'
../../include/Make/Grass.make:376: warning: overriding commands for target
`first'
../../include/Make/Grass.make:376: warning: ignoring old commands for target
`first'
../../include/Make/Grass.make:392: warning: overriding commands for target
`inst_now'
../../include/Make/Grass.make:392: warning: ignoring old commands for target
`inst_now'
../../include/Make/Grass.make:400: warning: overriding commands for target
`/home/annalisa/grass_dev64/bin.i686-pc-linux-gnu'
../../include/Make/Grass.make:400: warning: ignoring old commands for target
`/home/annalisa/grass_dev64/bin.i686-pc-linux-gnu'
../../include/Make/Grass.make:403: warning: overriding commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/include/grass'
../../include/Make/Grass.make:403: warning: ignoring old commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/include/grass'
../../include/Make/Grass.make:406: warning: overriding commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/lib'
../../include/Make/Grass.make:406: warning: ignoring old commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/lib'
../../include/Make/Grass.make:409: warning: overriding commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/bin'
../../include/Make/Grass.make:409: warning: ignoring old commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/bin'
../../include/Make/Grass.make:412: warning: overriding commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/etc'
../../include/Make/Grass.make:412: warning: ignoring old commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/etc'
../../include/Make/Grass.make:415: warning: overriding commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/driver'
../../include/Make/Grass.make:415: warning: ignoring old commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/driver'
../../include/Make/Grass.make:418: warning: overriding commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/driver/db'
../../include/Make/Grass.make:418: warning: ignoring old commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/driver/db'
../../include/Make/Grass.make:421: warning: overriding commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/fonts'
../../include/Make/Grass.make:421: warning: ignoring old commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/fonts'
../../include/Make/Rules.make:28: warning: overriding commands for target
`OBJ.i686-pc-linux-gnu'
../../include/Make/Rules.make:28: warning: ignoring old commands for target
`OBJ.i686-pc-linux-gnu'
../../include/Make/Rules.make:72: warning: overriding commands for target
`clean'
../../include/Make/Rules.make:72: warning: ignoring old commands for target
`clean'
../../include/Make/Html.make:40: warning: overriding commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/docs/html/v.mainchannel'
../../include/Make/Html.make:40: warning: ignoring old commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/docs/html/v.mainchannel'
../../include/Make/Html.make:40: warning: overriding commands for target `
r.strahler.sh'
../../include/Make/Module.make:20: warning: ignoring old commands for target
`r.strahler.sh'
../../include/Make/Html.make:40: warning: overriding commands for target `
r.broscoe.sh'
../../include/Make/Module.make:20: warning: ignoring old commands for target
`r.broscoe.sh'
../../include/Make/Html.make:40: warning: overriding commands for target
`v.strahler.html'
../../include/Make/Html.make:40: warning: ignoring old commands for target
`v.strahler.html'
../../include/Make/Html.make:45: warning: overriding commands for target
`htmlcmd'
../../include/Make/Html.make:45: warning: ignoring old commands for target
`htmlcmd'
../../include/Make/Html.make:49: warning: overriding commands for target
`htmlscript'
../../include/Make/Html.make:49: warning: ignoring old commands for target
`htmlscript'
../../include/Make/Html.make:53: warning: overriding commands for target
`htmletc'
../../include/Make/Html.make:53: warning: ignoring old commands for target
`htmletc'
../../include/Make/Html.make:57: warning: overriding commands for target
`htmldir'
../../include/Make/Html.make:57: warning: ignoring old commands for target
`htmldir'
../../include/Make/Html.make:61: warning: overriding commands for target
`htmlmulti'
../../include/Make/Html.make:61: warning: ignoring old commands for target
`htmlmulti'
../../include/Make/Script.make:21: warning: overriding commands for target `
r.strahler.sh'
../../include/Make/Html.make:40: warning: ignoring old commands for target `
r.strahler.sh'
../../include/Make/Script.make:21: warning: overriding commands for target `
r.broscoe.sh'
../../include/Make/Html.make:40: warning: ignoring old commands for target `
r.broscoe.sh'
../../include/Make/Script.make:21: warning: overriding commands for target
`v.strahler'
../../include/Make/Module.make:20: warning: ignoring old commands for target
`v.strahler'
../../include/Make/Script.make:26: warning: overriding commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/bin/v.mainchannel'
../../include/Make/Module.make:14: warning: ignoring old commands for target
`/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/bin/v.mainchannel'
../../include/Make/Script.make:26: warning: overriding commands for target `
r.strahler.sh'
../../include/Make/Script.make:21: warning: ignoring old commands for target
`r.strahler.sh'
../../include/Make/Script.make:26: warning: overriding commands for target `
r.broscoe.sh'
../../include/Make/Script.make:21: warning: ignoring old commands for target
`r.broscoe.sh'
../../include/Make/Script.make:41: warning: overriding commands for target `
r.strahler.sh'
../../include/Make/Script.make:26: warning: ignoring old commands for target
`r.strahler.sh'
../../include/Make/Script.make:41: warning: overriding commands for target `
r.broscoe.sh'
../../include/Make/Script.make:26: warning: ignoring old commands for target
`r.broscoe.sh'
make: Circular r.strahler.sh <- r.strahler.sh dependency dropped.
make: Circular r.broscoe.sh <- r.strahler.sh dependency dropped.
make: Circular r.broscoe.sh <- r.broscoe.sh dependency dropped.
make: Circular v.strahler <- r.strahler.sh dependency dropped.
make: Circular v.strahler <- r.broscoe.sh dependency dropped.
make: Circular v.strahler <- v.strahler dependency dropped.
test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu
gcc -I/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/include  -g -O2
-I/usr/include/gdal    -DPACKAGE=\""grassmods"\"
-I/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/include -o
OBJ.i686-pc-linux-gnu/forest2tree.o -c forest2tree.c
gcc -I/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/include  -g -O2
-I/usr/include/gdal    -DPACKAGE=\""grassmods"\"
-I/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/include -o
OBJ.i686-pc-linux-gnu/helper.o -c helper.c
gcc -I/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/include  -g -O2
-I/usr/include/gdal    -DPACKAGE=\""grassmods"\"
-I/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/include -o
OBJ.i686-pc-linux-gnu/main.o -c main.c
gcc -I/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/include  -g -O2
-I/usr/include/gdal    -DPACKAGE=\""grassmods"\"
-I/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/include -o
OBJ.i686-pc-linux-gnu/strahler.o -c strahler.c
gcc -I/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/include  -g -O2
-I/usr/include/gdal    -DPACKAGE=\""grassmods"\"
-I/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/include -o
OBJ.i686-pc-linux-gnu/write.o -c write.c
if [ ! -d /home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/scripts ]; then
mkdir -p /home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/scripts; fi
/usr/bin/install -c  v.mainchannel r.strahler.sh r.broscoe.sh v.strahler
/home/annalisa/grass_dev64/dist.i686-pc-linux-gnu/scripts/v.mainchannel
r.strahler.sh r.broscoe.sh v.strahler
/usr/bin/install: target `v.strahler' is not a directory
make: *** [v.strahler] Error 1

but then, if I do "make install" into the main GRASS directory, compiling
gives me no errors and everything works fine... (all modules are at their
place and everything works in GRASS, documentation too)...
but how can I solve this? is the form of the Makefile uncorrect?

many thanks

Annalisa

ps: I'm sorry but I'm not very expert in writing-code...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20080725/c9eb22fb/attachment-0001.html


More information about the grass-user mailing list