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

Diego Biurrun diego
Wed Nov 9 00:37:20 CET 2005


On Sat, Nov 05, 2005 at 03:36:05PM +0200, Ivan Kalvachev wrote:
> 2005/11/2, Diego Biurrun <diego at biurrun.de>:
> > On Tue, Nov 01, 2005 at 10:35:06AM +0200, Ivan Kalvachev wrote:
> > >
> > > 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.
> 
> +echo "libdir=\$(DESTDIR)$libdir" >> config.mak
> -------------
> ifeq ($(CONFIG_DARWIN),yes)
> SHFLAGS += -Wl,-install_name,$(libdir)/$(SLIBNAME),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION)
> endif
> endif
> -------------
>   $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
> -------------
> 
> Yeh, I'm sure you had checked that -install_name ignores the
> directory. But that makes me wonder, why not only ffmpeg but also
> other projects like to pass full path name ...

Here are the relevant parts of the man pages on Mac OS X 10.3:

man gcc:

  -install_name
    This options are available for Darwin linker.
    Darwin linker man page describes them in detail.

man ld:

  -dylib_install_name name
    For dynamic shared library files, specifies the name of the file
    the  library  will be installed in for programs that use it.  If
    this is not specified, the name specified in the -o name option
    will   be   used.    This  option  is  used  as  the libtool(1)
    -install_name name option when its -dynamic option is specified.

man libtool:

  -install_name name
    For a dynamic shared library this specifies the  file name the
    library  will be installed in for programs that use it. If this
    is not specified the name specified by the -o output option will
    be used.

So none of what you claim is supported by the man pages.  Oh, and by the
way, I _have_ tested DESTDIR support on Mac OS X 10.3.  Surprise, it
works flawlessly.

Can we now please finally drop the subject?

Diego





More information about the ffmpeg-devel mailing list