[GRASS5] Re: r.terraflow

Glynn Clements glynn.clements at virgin.net
Fri Jan 10 05:19:47 EST 2003


Markus Neteler wrote:

> does anyone have an advice for Laura? She is polishing the new
> r.terraflow which is written in C++.
> Please cc to her, she is not on the 'grass5' list.
> 
> Thanks
> 
> On Thu, Jan 09, 2003 at 03:57:19PM -0500, Laura I. Toma wrote:
> > 
> > about renaming the .C files to .cc ==> it doesn't work. there is something
> > wrong in one of the GRASS scripts, and make.rules comes out like this:
> > 
> > 
> > CC = g++
> > OBJ = $(OBJARCH)/main.o
> > SOURCES = main.cc
> > $(OBJARCH)/main.o:	main.cc $(HEADERS)
> > $(GISLIB):	#
> > $(DEPGISLIB):	#
> > $(OBJARCH)/main.o: main.c
> > 	$(CC) $(CFLAGS) -c main.c -o $@
> >                                ^^^
> >                                !!!
> > 
> > Notice that in the last line main.cc became main.c; as a result i get
> > an error:
> > 
> > make: *** No rule to make target `main.c', needed by `OBJ.i686-pc-linux-gnu/main.o'.  Stop.

At a minimum, the following section of src/CMD/generic/gmake.sh would
need to be extended to allow for creating a .o file from a .cc file.

	    while read file
	    do
		if test -f $file.f
		then
		    echo '$(OBJARCH)/'${file}.o: ${file}.f
	#	    echo '	rm -f $@'
	#	    echo '	$(FC) $(FFLAGS) -c' ${file}.f
	#	    echo '	mv' ${file}.o '$@'
	# new version MN:
		    echo '	$(FC) $(FFLAGS) -c' ${file}.f -o '$@'
		else
		    echo '$(OBJARCH)/'${file}.o: ${file}.c
	#	    echo '	rm -f $@'
	#	    echo '	$(CC) $(CFLAGS) -c' ${file}.c
	#	    echo '	mv' ${file}.o '$@'
	# new version MN:
		    echo '	$(CC) $(CFLAGS) -c' ${file}.c -o '$@'
		fi
	    done

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list