[Ffmpeg-devel] [PATCH] Add DESTDIR support to Makefiles

Diego Biurrun diego
Tue Oct 18 13:12:05 CEST 2005


On Tue, Oct 18, 2005 at 12:55:56PM +0200, Diego Biurrun wrote:
> On Tue, Oct 18, 2005 at 11:31:22AM +0300, ?smail D?nmez wrote:
> > On Monday 17 October 2005 10:53, Fran?ois Revol wrote:
> > > > smail D?nmez wrote:
> > > > >
> > > > > Following patch adds DESTDIR support so you can do :
> > > > >
> > > > > make install # Normal install to /
> > > > > make DESTDIR=/home/cartman/ffmpeg install # Install
> > > > > under /home/cartman/ffmpeg/usr etc
> > > > >
> > > > > DESTDIR is a must for packaging. Also note that this patch doesn't
> > > > > affect any functionality so it works as expected.
> > > > >
> > > > > Please comment/review/apply :)
> > > >
> > > > 	Isn't this the kind of thing that usually belongs in the configure
> > > > script?
> > >
> > > No, it's one of the few really handy real features of autoconf based
> > > things (those done right, many fail to support that), so that you can
> > > install where you want, while configuring elsewhere.
> > > Very useful when used in a bigger project.
> > 
> > So can we please apply this patch or tell me if there is anything wrong with 
> > it with respect to whitespace or something?
> 
> Samuel Hocevar achieves the same effect with the following (much
> simpler) patch in his Debian packages.
> 
> Sam, what do you say?  I'm tempted to apply your patch.

... and here is the patch ...

Diego
-------------- next part --------------
--- ffmpeg-0.cvs20050918.orig/configure
+++ ffmpeg-0.cvs20050918/configure
@@ -1228,11 +1243,11 @@
 echo "/* Automatically generated by configure - do not modify */" > $TMPH
 echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH
 
-echo "prefix=$prefix" >> config.mak
-echo "libdir=$libdir" >> config.mak
-echo "bindir=$bindir" >> config.mak
-echo "mandir=$mandir" >> config.mak
+echo "prefix=\$(DESTDIR)$prefix" >> config.mak
+echo "libdir=\$(DESTDIR)$libdir" >> config.mak
+echo "bindir=\$(DESTDIR)$bindir" >> config.mak
+echo "mandir=\$(DESTDIR)$mandir" >> config.mak
 echo "MAKE=$make" >> config.mak
 echo "CC=$cc" >> config.mak
 echo "AR=$ar" >> config.mak



More information about the ffmpeg-devel mailing list