[FFmpeg-devel] [PATCH] build: don't print brief make messages for empty variables

Ingo Brückl ib at wupperonline.de
Thu Oct 24 02:13:26 CEST 2013


Michael Niedermayer wrote on Thu, 24 Oct 2013 01:07:21 +0200:

> On Wed, Oct 23, 2013 at 02:24:45PM +0200, Ingo Brückl wrote:
>> This won't give false information to the user in case a variable isn't
>> defined (although this isn't the case yet), and - more important - it
>> will allow proper checking for variables as in commit e52567c2954f627d.
>> ---
>>  common.mak |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/common.mak b/common.mak
>> index 6479b08..ccc3b55 100644
>> --- a/common.mak
>> +++ b/common.mak
>> @@ -16,7 +16,7 @@ SILENT = DEPCC DEPHOSTCC DEPAS DEPYASM RANLIB RM
>>  MSG    = $@
>>  M      = @$(call ECHO,$(TAG),$@);
>>  $(foreach VAR,$(BRIEF), \
>> -    $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
>> +    $(if $($(VAR)),$(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR)))))

> this doesnt seem to work or i misunderstand its use

> when i remove STRIP=.., from config.mak and run make then instead
> of strip it actually runs ffmpeg

Well, you are right. There seems to be a discrepancy between

 library.mak, line 25

  $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
  	$(DEPYASM) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
  	$(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $<
  	-@ $(if $(STRIP), $(STRIP) -wN '..@*' $@)

and

  Makefile, line 55:

  $(PROGS): %$(EXESUF): %_g$(EXESUF)
  	$(CP) $< $@
  	$(STRIP) $@

whether STRIP must be defined or not. From the recipe in library.mak it
seemed that it doesn't have to, but the recipe in Makefile requires it.
(Even if STRIP were not defined, $(STRIP) always expands to something,
rendering the condition pointless.)

The reason for the patch was a build of FFmpeg as part of MPlayer where
STRIP currently isn't defined and a strange build error occurs.

Ingo


More information about the ffmpeg-devel mailing list