[MPlayer-users] Cross-compilation

Eric Nelson eric.nelson at boundarydevices.com
Wed Aug 15 15:08:19 CEST 2007


Dominik 'Rathann' Mierzejewski wrote:
> On Tuesday, 14 August 2007 at 20:28, Eric Nelson wrote:
>> Dominik 'Rathann' Mierzejewski wrote:
>>> On Tuesday, 14 August 2007 at 15:30, Eric Nelson wrote:
>>>> Hello, all.
>>>>
>>>> The patch below allows override of the DESTDIR symbol when doing
>>>> "make install". This is useful when creating a filesystem for an
>>>> embedded target.
>>>>
>>>> Eric Nelson
>>>> Boundary Devices
>>>>
>>>> --- mplayer.orig/configure	2007-08-13 18:16:26.000000000 -0700
>>>> +++ mplayer/configure	2007-08-13 18:18:47.000000000 -0700
>>>> @@ -7432,7 +7432,7 @@
>>>>  LANG = C
>>>>  MAN_LANG = $MAN_LANG
>>>>  TARGET_OS = $system_name
>>>> -DESTDIR =
>>>> +DESTDIR ?=
>>>>  prefix = \$(DESTDIR)$_prefix
>>>>  BINDIR = \$(DESTDIR)$_bindir
>>>>  DATADIR = \$(DESTDIR)$_datadir
>>> I don't think this is necessary. Overriding DESTDIR during make install
>>> works just fine without this patch. In fact, it's been working for years.
>>>
>> I must be missing something then. Without the question mark, I get the
>> results below (i.e. "Permission denied" trying to copy files to
>> /usr/local/bin).
>>
>> Can you post an example?
>>
>> Thanks in advance,
>>
>>
>> Eric
>>
>> ~/tmp/userland/build/MPlayer-1.0rc1$ DESTDIR=/home/ericn/userland/install make install
> 
> Ah, you're doing this the wrong way. To override Makefile variables you put
> them as make parameters, like this:
> 
> ~/tmp/userland/build/MPlayer-1.0rc1$ make DESTDIR=/home/ericn/userland/install install
> 
Thanks, Rathann.

And of course, the answer was in the first sentence of the section in
the make manual:
	http://www.gnu.org/software/make/manual/make.html#Overriding

"An argument that contains `=' specifies the value of a variable: `v=x' sets the value of
the variable v to x. If you specify a value in this way, all ordinary assignments of the
same variable in the makefile are ignored; we say they have been overridden by the command
line argument."

Regards,


Eric



More information about the MPlayer-users mailing list