[Gdal-dev] GNUmakefile cleanups (libtool related)

Frank Warmerdam warmerdam at pobox.com
Thu Jul 10 16:38:56 EDT 2003


Alessandro Amici wrote:
> 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

Alessandro,

Go ahead and commit these changes as you need.  Just drop the list a note
indicating what you have change so we have some warning what we might encounter
in our next cvs update, and who to complain to.

Note that in a few cases, like the gtiff/libtiff/GNUmakefile the relative
path for object file dependence is different.

> 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 $< $@'?).

There is no specific reason why 'cp $< $@' was not used.

> 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).

Hopefully building without libtool will continue to work smoothly so we don't
have to regress the changes.  But do go ahead and commit them when you are
reasonable confident in them.

For the next release (which I would like to call 1.2.0) I want to move to more
normal library naming convensions when the library is installed.  If you are
willing to do some of the heavy lifting on that I would be very appreciative.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list