[Gdal-dev] GNUmakefile cleanups (libtool related)

Alessandro Amici alexamici at tiscali.it
Thu Jul 10 15:52:34 EDT 2003


Frank,

i investigated a bit more the possibility of using libtool in the gdal build 
and i think i can counter most of the comments you raised in your last email 
on the subject. in the meantime, i managed to actually build (a seemingly 
correct) libgdal.so with libtool. unfortunately the current incarnation of 
the patch is ugly enough to be embarrassing ;).

part of the integration problem is due to the duplication of makefile snippets 
that move object file around (thus breaking the libtool build).
i.e. inside frmts/ we have 37 instances of:

../o/%.o:	%.o
	cp $*.o ../o

that need to be changed to something like:

../o/%.o:	%.o
	cp $*.o ../o
	-cp $*.lo ../o


IMHO makefile code duplication is a problem independently of the use of 
libtool, so i started looking into the possibility of a substantial makefile 
cleanup, that will be a 'must' for trying integrating libtool, but is a good 
thing in itself. note that, since all GNUmakefile's already include 
GDALmake.opt it is very easy to cut most of the redundancy just moving the 
rules inside GDALmake.opt (or by creating a new GNUmakefile.lib included by 
GDALmakefile.opt). attached is an example implementation.

if you judge overloading GDALmake.opt with a small library of common rules is 
ok, i volunteer to work on that and on some other possible makefile cleanups 
that i spotted (BTW: any specific reason for using 'cp $*.o ../o' instead of 
just 'cp $< $@'?).

as soon as the build system is libtool-friendly enough, i'll also submit the 
libtool patch for review (hopefully it will add the libtool build as a 
configure option without affecting the gdal-native build).

cheers,
alessandro
-------------- next part --------------
A non-text attachment was scrubbed...
Name: frmts-o.diff
Type: text/x-diff
Size: 12700 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20030710/95ca4aec/frmts-o.bin


More information about the Gdal-dev mailing list