[GRASS-dev] make install targets?

Markus Neteler neteler at osgeo.org
Sun Jul 5 10:44:26 EDT 2009


On Sun, Jul 5, 2009 at 4:17 PM, Glynn Clements<glynn at gclements.plus.com> wrote:
> Markus Neteler wrote:
>
>> >> >>> Realistically, this should wait for 6.4/7.x, when the build system
>> >> >>> will get cleaned up to make it easier to build modules against an
>> >> >>> installed version of GRASS.
>> >> >>
>> >> >> I would still appreciate a generic "make install" - is that now feasible?
>> >>
>> >> I have added a
>> >> make install
>> >> target to 6.4.0svn and 6.5svn. No idea how to do it for 7.
>>
>> Any hope to get that fixed in GRASS 7?
>> I don't understand its Makefile system sufficiently.
>
> The mechanism used in 6.5 can be copied almost verbatim to 7.0, but it
> isn't particularly robust; there are a lot of special cases which
> don't get accounted for.

Yes: it was moreover a proof of concept, sort of 80:20 solution.
In 7 it needs to be improved.

> One obvious improvement would be to replace the "install" targets in
> the *.make files with more specific targets, e.g. "install_cmd",
> "install_shlib", etc, and have the generic "install" target invoke
> that. This would allow individual Makefiles to extend the install
> target without having to clone the existing target.
>
> Or the install targets could use double-colon rules; if multiple such
> rules name the same target, making that target will execute the
> commands for all of the rules (in no particular order). Normal
> (single-colon) rules use the commands from the last rule. The main
> downside with this approach is that individual Makefiles can only add
> commands to the installation rule, not remove them.
>
> Either way, any Makefile whose "default" rule isn't simply
> "default: cmd", "default: lib", etc will need a custom "install"
> target to install the additional files.

I.e. the "multi" targets and maybe more.

>> >> It doesn't yet work for multi-targets such as r.mapcalc/r3.mapcalc but
>> >> it also doesn't interfere. So at least GRASS Addons can now be
>> >> installed easily with
>> >>
>> >> make MODULE_TOPDIR=$HOME/grass64/
>> >> make MODULE_TOPDIR=$HOME/grass64/ install
>> >
>> > Wouldn't it be simpler to just point ARCH_DISTDIR at the installed
>> > version?
>>
>> Still no clue how to do that.
>
>        make ARCH_DISTDIR=/usr/local/grass-7.0svn
>
> The main issue here is that it won't use the files in dist.<arch>, but
> will re-create them, e.g. modules and libraries will be re-linked,
> HTML files will be re-generated, etc.

You mean also for GRASS 6?

Markus


More information about the grass-dev mailing list