>> Author: hamish
>> Date: 2011-11-06 13:02:08 -0800 (Sun, 06 Nov 2011)
>> New Revision: 49122
>>
>> Modified:
>>
grass/branches/develbranch_6/include/Make/Man.make
>> Log:
>> MODULE_TOPDIR refers to the source code dir, not
>> the installed ARCH_DISTDIR. see the first line of the main
>> Makefile.
Martin:
> why??? BTW, this commit breaks g.extension for installing scripts,
> again...
yeah but the change before it most probably just broke *all* man page
building for a regular fresh full build(!)... (I didn't try, but it is
wrong, so "probably"..)
/home/martin/grassdata/zod2011/landamar1/.tmp/pierre/2593.0/dist.i686/man/man1/g.region.point.1
1
sh: 0: Can't open
/usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/tools/g.html2man/g.html2man
make[2]: ***
...
Can you explain your commit a little bit more?
ok, most probably I could better put in some code comments too to make it
clearer what's going on / supposed to happen--
It was all working when I fixed this all up for Ubuntu a few weeks ago; I
will recheck- maybe I had a left-over script which allowed it to work*.
But I am confident in r49122, if something is needed it is elsewhere.
(i.e. a slight adjustment in the main Makefile)
to explain:
[ see also https://trac.osgeo.org/grass/ticket/1180#comment:5 ]
commit log:
>> MODULE_TOPDIR refers to the source code dir, not
>> the installed ARCH_DISTDIR. see the first line of the main
>> Makefile.
that speaks for itself; include/Make/Man.make calls g.html2man relative
to MODULE_TOPDIR (ie source code location) not ARCH_DISTDIR (installed
build file location). the prior change had it trying to execute the
g.html2man _directory_ in the source code, not the program itself.
executing a directory doesn't work..
g.extension overrides MODULE_TOPDIR, which is why it seemed to work for
you.
in the source tree the g.html2man script is located in
tools/g.html2man/g.html2man
this is the one that SOURCE/include/Make/Man.make calls, but in the past
it was never installed in the dist.i686-pc-linux-gnu/ dir at all, so
wouldn't work for end-users with a grass-dev package installed but no
full source tree.
so as of r43748,r43749 g.html2man now gets installed into the build dir
at:
$GISBASE/tools/g.html2man
and the main Makefile edits the *install dir's* Man.make file to point it
to the altered location.
https://trac.osgeo.org/grass/changeset/43748/grass/branches/develbranch_6/Makefile
https://trac.osgeo.org/grass/changeset/43749/grass/branches/develbranch_6/Makefile
a user self-compiling outside of the source tree would run like:
src/g.addon.module$ make MODULE_TOPDIR=/path/to/grass/source/code
so in the case that it was pointed to the install dir, not the source dir,
and the $GISBASE/include/Make/ dir was installed too, it would still auto-
magically work if pointed to either source dir or install dir.
more recently this got broken by r46241, then you fixed it in r46357. (that
was 6 months ago)
summary:
source code
-----------
executable is in $src/tools/g.html2man/g.html2man
and $src/include/Make/Man.make points to above location.
installed dir ($GISBASE)
-------------
executable is in $GISBASE/tools/g.html2man
and $GISBASE/include/Make/Man.make points to above location because of
a sed hack in the main Makefile at 'make install' time*.
[*] deb/ubu pkg doesn't 'make install' so takes care of that manually
(actually there I have it installing to tools/g.html2man/g.html2man, which
would explain why it worked for my pkg build tests there in the last few
weeks)
pre-install dir ($src/dist.x86_64-unknown-linux-gnu/)
---------------
executable is in both $src/tools/g.html2man/g.html2man and
$GISBASE/tools/g.html2man
both copies of include/Make/Man.make point to tools/g.html2man/g.html2man,
usually that's ok, but because g.extension forces MODULE_TOPDIR to $GISBASE
it was looking in the wrong place. (see below)
got it?
If g.extension can't find g.html2man, then something else has gone wrong
and will need investigation. where/when/how does it break for you?
GRASS run from the dist.x86/ dir? If so I think I see the problem:
g.extension overrides MODULE_TOPDIR there to = "$GISBASE", which has not
yet had its Man.make hacked; maybe that hack should happen at build time
(to the *dist.x86/ copy* of Man.make, not the source code copy) when the
script is installed to $GISBASE/tools/, instead of running the sed hack
at 'make install' time.. [n.b. 'sed -i' is not portable to MacOSX]
regards,
Hamish