[GRASS5] r.wavelet

Glynn Clements glynn at gclements.plus.com
Fri Jul 22 01:54:23 EDT 2005


Andrea Antonello wrote:

> >    I tried to compile r.wavelet, with the make file you provided.
> > What does the include head.mk and tail.mk means?
> >
> > Anyway I endup with some error. Error is
> >            "Makefile:13: *** missing separator.  Stop."
> > (I dont have idea about makefiles)
> > Can you send me the complete make file.
> 
> Glynn had warned us :)
> 
> > [snip]
> >
> > For 5.x, you should write a Gmakefile, and let the "make makefiles"
> > stage generate the makefile, rather than trying to write the makefile
> > by hand.

> I never used the "make makefiles" part. How to define the "makefiles" target?
> Can someone help me?

It's defined in the top-level Makefile (generated from mk/Makefile.in
when you run configure):

makefiles:
	@echo "making makefiles ..."
	-find ${SRCDIR} -name Gmakefile -print | \
		sed -e 's#^\(.*\)/Gmakefile#\1#' | \
		while read dir ; do \
			${MAKE} $$dir/makefile >/dev/null ; \
		done

To build an individual makefile, it uses the rule:

%/makefile: %/Gmakefile
	sed -f ${SRCDIR}/mk/genmake.sed < $< > $@

Alternatively, you can use the mk/mkmakefiles script (in case you need
to do it when configure hasn't been run).

Note that the generated makefiles need to be able to include the
makefile fragments (head.mk etc) from the source and build
directories. The top-level Makefile uses the following command for
building each directory (it expects the current directory to be the
top-level build directory, not the source directory):

	mkdir -p $$dir ; \
	${MAKE} -I${DSTDIR}/mk -I${SRCDIR}/mk -C ${SRCDIR}/$$dir -f makefile || \
		echo "Compilation error in module: $$dir" >> ${ERROR_LOG} ; \

All in all, it's a lot easier to put your code into the GRASS source
tree then use the gmake53 script to build additional directories.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list