[GRASS5] Re: 5.1: --html-description to parser added

Roger Bivand Roger.Bivand at nhh.no
Wed Feb 5 02:26:11 EST 2003


On Tue, 4 Feb 2003, Glynn Clements wrote:

> 
> Markus Neteler wrote:
> 
> > > Derived from the --interface-description there is now
> > > --html-description
> > > available in the 5.1 parser (CVS).
> > 
> > A related question to this:
> > 
> > I would like to add a 'html' target to the 5.1 Makefiles.
> > Prerequisite:
> >  - a file 'description.html' will contain further description, notes,
> >    author etc, stored in the directory of module source code
> > 
> > Makefile 'html' target idea:
> >  - generate first part of the man page on-the-fly with --html-description
> >  - append 'description.html'
> >  - write all as file 'module.html' into HTML target directory
> > 
> > Problem:
> > As G_gisinit() is used in every module, I cannot directly run
> > in the Makefile:
> > 
> > html:
> >         $(GISBASE)/etc/bin/cmd/$(PGM) --html-description <something>
> > 	<add description.html>
> > 	...
> > 
> > unless there is a fake GRASS session.
> 
> ... and you *aren't* cross-compiling.
> 
> > Is there a better way than faking a GRASS session (hope so!)?
> 
> Ultimately most of G_gisinit() ought to be moved to G_parser(); but
> that would require that everything actually used G_parser(), which
> isn't the case at present.

The R/GRASS interface calls G_gisinit(), but doesn't need to parse 
anything, however little of what G_gisinit() does is needed explicitly - 
doesn't it mostly initialize static variables that other functions assume 
are initialized?

Roger

> 
> There are some other problems. E.g. some modules call G_get_window(),
> R_open_driver() etc and initialise the defaults based upon data from
> the current region or the monitor. This is (arguably) OK if the user
> is running "g.foo help" interactively, but it means that the defaults
> in the HTML file will reflect the session which was used to generate
> it.
> 
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no




More information about the grass-dev mailing list