[GRASS5] End-of-compilation message

Paul Kelly paul-grass at stjohnspoint.co.uk
Thu Oct 10 15:04:40 EDT 2002


On Mon, 7 Oct 2002, Glynn Clements wrote:

>
> Paul Kelly wrote:
>
> > Perhaps the message 'Compiled successfully' should only appear if there
> > are no errors in the error.log file, otherwise its contents should be
> > output to the screen to warn the user?
>
> OK, I've removed the word "successfully", so it now says:
>
> 	GRASS GIS source code compiled.
>
> I'm open to suggestions as to how to handle errors. One option is to
> just run:
>
> 	grep 'Compilation error' error.log
>

What about something like this (as an alternative for the last part of
src/CMD/generic/POST_INSTALL.sh)?

echo ""
echo "GRASS GIS source code compiled."
echo ""
if grep 'Compilation error' error.log; then
  echo ""
  echo "* Any errors may be reported via the webpage:"
  echo "    http://grass.itc.it/bugtracking/bugreport.html"
  echo "  Please include the actual compiler error messages for the above module(s).
  echo ""
fi
echo "* Install GRASS with (possibly as root)"
echo "    make install"

This should give output as follows
Case 1) Totally Successful
==============

GRASS GIS source code compiled.

* Install GRASS with (possibly as root)
    make install
==============

Case 2) Some Errors
==============

GRASS GIS source code compiled.

Compilation error in module: src/misc/m.in.ntf (ignored)
Compilation error in module: src.contrib/GMSL/g3d (ignored)
Compilation error in module: src/sites/s.surf.krig (ignored)

* Any errors may be reported via the webpage:
    http://grass.itc.it/bugtracking/bugreport.html
  Please include the actual compiler error messages for the above module(s).

* Install GRASS with (possibly as root)
    make install
==============

I suppose it will work as long as grep only returns true when it finds matches
(the behaviour on the system I am using). But the message about reporting
errors is maybe generic enough that it won't confuse people if it appears when
it shouldn't. If we are very confident about this the 'successfully'
message could be put back in if the grep fails, just to give the user a
greater sense of achievement perhaps.

Paul

> which should dump any error messages to the same place as the
> completion messages, i.e. the user's terminal, unless they've
> redirected stdout (which they probably should; if there *are* any
> errors, we often need to see the actual error messages).
>
> --
> Glynn Clements <glynn.clements at virgin.net>
>
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5
>




More information about the grass-dev mailing list