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

Diego Biurrun diego
Wed Nov 2 19:42:13 CET 2005


On Tue, Nov 01, 2005 at 10:35:06AM +0200, Ivan Kalvachev wrote:
> 2005/10/19, ?smail D?nmez <ismail at uludag.org.tr>:
> > On Wednesday 19 October 2005 10:50, Sam Hocevar wrote:
> > > On Wed, Oct 19, 2005, ?smail D?nmez wrote:
> > > > >    No. These -D flags are compile-time flags. DESTDIR is only specified
> > > > > for "make install" and is set to nothing during the build phase.
> > > >
> > > > No but you change lib_dir, conf_dir in config.mak which is legal to use
> > > > in code. But for now its not used at all.
> > >
> > >    Again: these variables and files are *not* changed when DESTDIR is
> > > not specified, and DESTDIR should *not* be specified when compiling (and
> > > it isn't in any of the distributions I know), so it does not affect code
> > > at all.
> > >
> > > > But if someone uses that as variable in code your patch would break.
> > >
> > >    Uh, no it wouldn't.
> >
> > Uh,ok got it. It would only break if DESTDIR is set before configuring (isn't
> > that still a bad practise? ;) ). Sorry for the misunderstanding. Well ok lets
> > apply Sam's patch :)
> 
> Sometimes we need DESTDIR to be defined during configure & build in
> order to use e.g. headers and libs from the previously build packages.
> This is usual when building an entire system, like bsd port system and
> maybe gentoo(somebody please check).
> 
> BTW what's the problem to hard code it into the install section of
> Makefile, instead of using hack that will fail on something like
> 
> ./configure
> DESTDIR=/tmp make install

You obviously haven't tried the example you just gave.  Give it a go, it
works flawlessly.

Now let's end this pointless discussion, the code in CVS is correct.  If
you have doubts, read the source, you will believe me afterwards.

Diego





More information about the ffmpeg-devel mailing list