[GRASS5] Re: [bug #1382] (grass) r.mapcalc3 compilation error

On Sat, Oct 26, 2002 at 09:52:11PM +0200, Glynn Clements via RT wrote:

Request Tracker wrote:

> Subject: r.mapcalc3 compilation error
>

[...]

It appears that you are trying to build from within the source
directory; I have no idea whether that works.

Yes, that's right. I have modified the mk/* things for that (unsubmitted)
and it was working for several month.

> I am using
> CC = gcc
> FC = g77
> LEX = flex
> YACC = bison -y
> PERL = /usr/bin/perl
> MAKE = make
>
> It seems to be a problem with yacc/bison, which does not generate
> `syntax_error' from the mapcalc.y file. Unfortunaltely I have no
> idea how to solve this.

What does the bison command look like?

I have to check that at home (where the computer is).

Was the build performed from clean, or were there old files lying
around? Note that:

1. For the "normal" build mechanism, you have to use
"make maintainer-clean" to remove the files which are generated by
lex/yacc; "make distclean" won't work (presumably, the idea is that
source tarballs include the generated C files, so that users don't
need lex/yacc).

Aha. I only deleted the *.o files.

2. For the new build mechanism, the "make clean" rule is bogus. It is
designed for use with a separate build directory, so you don't need
"make clean"; just "rm -rf" the entire build directory once you're
finished with it (obviously, you don't do this if the build directory
happens to be the source directory).

Yes, I only deleted the *.o files as I still don't understand
how to build into an extra directory :slight_smile:

More soon,

Markus