[GRASS-dev] [GRASS GIS] #432: scripts/ Makefile bug in i18N string extraction

#432: scripts/ Makefile bug in i18N string extraction
---------------------+------------------------------------------------------
Reporter: neteler | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Keywords: | Platform: All
      Cpu: All |
---------------------+------------------------------------------------------
As far as I understand the scripts/Makefile process in GRASS 6, the "make
pot" command does not take into account that the scripts have to be
"compiled" (see g.parser part below):

{{{
# i.tasscap example: long lines broken for convenience
make[2]: Leaving directory `/home/neteler/grass64/scripts/i.tasscap'
GISRC=/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/demolocation/.grassrc64 \
GISBASE=/home/neteler/grass64/dist.x86_64-unknown-linux-gnu
PATH=/home/neteler/grass64 \
/dist.x86_64-unknown-linux-gnu/bin:$PATH \
LD_LIBRARY_PATH="/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/lib:"
\
g.parser -t i.tasscap | sed s/\"/\\\\\"/g | sed 's/.*/_("&")/' \
> ../../locale/scriptstrings/i.tasscap_to_translate.c ; true
make[1]: Leaving directory `/home/neteler/grass64/scripts/i.tasscap'
}}}

Typically "make pot" is run on a clean source code tarball, could the
procedure be changed to either trap this or improve it? I am sure that
currently many scripts/ strings are missing from the .po files
(unverified).

Markus

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/432&gt;
GRASS GIS <http://grass.osgeo.org>

#432: scripts/ Makefile bug in i18N string extraction
--------------------------+-------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by glynn):

  * type: defect => enhancement

Comment:

Replying to [ticket:432 neteler]:

> As far as I understand the scripts/Makefile process in GRASS 6, the
"make pot" command does not take into account that the scripts have to be
"compiled"

This is the case generally. Makefiles will not attempt to build
prerequisites which are outside of the directory containing the Makefile.
E.g. if you build a module and libgis hasn't been compiled, the module's
Makefile won't try to build it. You just have to build the components in
the correct order.

> Typically "make pot" is run on a clean source code tarball,

That's a mistake.

> could the procedure be changed to either trap this or improve it? I am
sure that currently many scripts/ strings are missing from the .po files
(unverified).

It would be easy enough to check for an empty scriptstrings directory. It
could either generate an error or "cd .. && make" to build GRASS.

It isn't realistic to perform partial compilation. Building the scripts
directory requires g.parser, which requires libgis; in 7.0 it also
requires lib/python, and there may be other dependencies I've overlooked.
Also, gui/wxpython does something similar for menudata.xml. r.mapcalc's
lex/yacc files contain strings which should be localised; that would
require mapcalc.tab.c and mapcalc.yy.c to be generated prior to "make
pot".

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/432#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#432: scripts/ Makefile bug in i18N string extraction
--------------------------+-------------------------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: enhancement | Status: closed
  Priority: major | Milestone: 6.4.0
Component: Default | Version: svn-releasebranch64
Resolution: wontfix | Keywords:
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by neteler):

  * status: new => closed
  * version: svn-develbranch6 => svn-releasebranch64
  * resolution: => wontfix

Comment:

Working ok. Closing.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/432#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>