[GRASS-dev] make install targets?
glynn at gclements.plus.com
Sun Jul 5 17:49:52 EDT 2009
Markus Neteler wrote:
> > 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.
Makefiles which rely upon one of the *.make files to do most of the
work aren't really significant. The main issue is that many libraries
and modules have support files which get installed, usually under
$(ARCH_DISTDIR)/etc. Each such Makefile will need a custom install
target which installs those files from $(ARCH_DISTDIR) to $(INST_DIR).
The actual installation rule can be generalised to something like:
-test -d $(dir $@) || $(MKDIR) $(dir $@)
if [ -x $< ] ; then $(INSTALL) $< $@ ; else $(INSTALL_DATA) $< $@ ; fi
But the module still needs to specify which files need to be installed
by the install target. This might be as simple as defining an
EXTRA_FILES variable, but it still has to be done in each Makefile.
> >> > 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?
I don't know how well setting ARCH_DISTDIR it will work in GRASS 6.
I recently made a large number of changes to the Makefiles to separate
ARCH_DISTDIR, GISBASE, and RUN_GISBASE. The aim was to allow building
individual directories using an installed version, rather than having
to build the entire source tree, having GISBASE and MODULE_TOPDIR
pointing to e.g. /usr/local/grass-7.0.svn but with ARCH_DISTDIR
pointing to $srcdir/dist.$ARCH. But the reverse should also work.
Essentially, GISBASE is used to find existing files (libraries,
headers, etc) while ARCH_DISTDIR determines where new files are
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev