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

Ivan Kalvachev ikalvachev
Tue Nov 1 09:35:06 CET 2005

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

DESTDIR=/tmp make install

We shouldn't put landmines that will blow if somebody steps out of the
causal way.

Anyway destdir was in my todo, gonna take a closer look.

Best Regards
  Ivan Kalvachev

More information about the ffmpeg-devel mailing list