[GRASS5] Re: [GRASSLIST:1363] Re: compiling grass57

You have to compile GRASS 5.7 with GRASS 5.3-cvs HEAD (not release
branch, not official version).

Is it a good idea to have the 5.7 'make mix' command check
src/CMD/VERSION for 5.3* ? That would stop some of the questions.

H

On Sat, 27 Sep 2003, Hamish wrote:

> You have to compile GRASS 5.7 with GRASS 5.3-cvs HEAD (not release
> branch, not official version).

Is it a good idea to have the 5.7 'make mix' command check
src/CMD/VERSION for 5.3* ? That would stop some of the questions.

Probably better for the configure script to check, and it could check for
'cvs' in the version number which should be more robust for the long term.
The following patch to configure.in seems to work:

--- configure.in.orig Fri Sep 26 16:11:46 2003
+++ configure.in Fri Sep 26 16:26:02 2003
@@ -35,8 +35,11 @@

if test -d "$with_grass50"; then
     GRASS50="$with_grass50"
+ if ! grep cvs "${GRASS50}/src/CMD/VERSION" >/dev/null 2>&1 ; then
+ AC_MSG_ERROR([*** GRASS 5.3 source directory \"$with_grass50\" does not contain CVS HEAD version.])
+ fi
else
- AC_MSG_ERROR([*** GRASS 5.0 source directory \"$with_grass50\" does not exist.])
+ AC_MSG_ERROR([*** GRASS 5.3 source directory \"$with_grass50\" does not exist.])
fi

AC_SUBST(GRASS50)

There seems to be a problem with CVS access from inside my University at
the minute (looks like another new firewall rule) so I can't commit the
change right now.

Paul

On Sat, Sep 27, 2003 at 02:52:52AM +1200, Hamish wrote:

> You have to compile GRASS 5.7 with GRASS 5.3-cvs HEAD (not release
> branch, not official version).

Is it a good idea to have the 5.7 'make mix' command check
src/CMD/VERSION for 5.3* ? That would stop some of the questions.

Were is this done (can't find it right now)? It doesn't sound
useful...

Markus

On Sat, Sep 27, 2003 at 02:52:52AM +1200, Hamish wrote:

> You have to compile GRASS 5.7 with GRASS 5.3-cvs HEAD (not release
> branch, not official version).

Is it a good idea to have the 5.7 'make mix' command check
src/CMD/VERSION for 5.3* ? That would stop some of the questions.

Sorry, I misunderstood the question. Yes, sounds good.

I was thinking how to avoid that include/version.h is generated
all the time which leads to a recompilation of libgis (which leads
to an overall recompilation when compiling in static mode)...

Patches welcome.

M.

Markus Neteler wrote:

I was thinking how to avoid that include/version.h is generated
all the time which leads to a recompilation of libgis (which leads
to an overall recompilation when compiling in static mode)...

1. version.h is generated by configure. If you re-run configure, you
probably *should* be re-compiling everything (i.e. "make clean").

2. config.h is also generated by configure, and that should be a far
more significant dependency.

3. version.h contains a data definition (which is bad practice;
headers should only contain declarations) for the variable
VERSION_STRING. AFAICT, this variable is only actually used by NVIZ
(nviz_init.c), which suggests that all other cases get the information
by other means (e.g. set_data.c relies upon src/general/init/Gmakefile
defining various macros via -D switches).

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

On Fri, 26 Sep 2003, Paul Kelly wrote:

On Sat, 27 Sep 2003, Hamish wrote:

> Is it a good idea to have the 5.7 'make mix' command check
> src/CMD/VERSION for 5.3* ? That would stop some of the questions.

Probably better for the configure script to check, and it could check for
'cvs' in the version number which should be more robust for the long term.
The following patch to configure.in seems to work:

--- configure.in.orig Fri Sep 26 16:11:46 2003
+++ configure.in Fri Sep 26 16:26:02 2003
@@ -35,8 +35,11 @@

if test -d "$with_grass50"; then
     GRASS50="$with_grass50"
+ if ! grep cvs "${GRASS50}/src/CMD/VERSION" >/dev/null 2>&1 ; then
+ AC_MSG_ERROR([*** GRASS 5.3 source directory \"$with_grass50\" does not contain CVS HEAD version.])
+ fi
else
- AC_MSG_ERROR([*** GRASS 5.0 source directory \"$with_grass50\" does not exist.])
+ AC_MSG_ERROR([*** GRASS 5.3 source directory \"$with_grass50\" does not exist.])
fi

AC_SUBST(GRASS50)

There seems to be a problem with CVS access from inside my University at
the minute (looks like another new firewall rule) so I can't commit the
change right now.

My CVS access is working again now so I have committed a similar fix to
the 5.7 configure script.

Paul