[FFmpeg-cvslog] codec_names: invoke preprocessor on avcodec.h.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Oct 22 17:11:04 CEST 2011


On Sat, Oct 22, 2011 at 05:02:33PM +0200, Nicolas George wrote:
> ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Sat Oct 22 10:55:44 2011 +0200| [0e138745f79f9da6a28b39dbd321354fd1159068] | committer: Michael Niedermayer
> 
> codec_names: invoke preprocessor on avcodec.h.
> 
> This fixes failures when codec IDs are defined conditionally,
> for example when scheduling for a major bump.
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e138745f79f9da6a28b39dbd321354fd1159068
> ---
> 
>  libavcodec/Makefile       |    3 ++-
>  libavcodec/codec_names.sh |    7 +++----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index 147b37f..4941b6f 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -756,5 +756,6 @@ endif
>  CODEC_NAMES_SH := $(SRC_PATH)/$(SUBDIR)codec_names.sh
>  AVCODEC_H      := $(SRC_PATH)/$(SUBDIR)avcodec.h
>  $(SUBDIR)codec_names.h: $(CODEC_NAMES_SH) config.h $(AVCODEC_H)
> -	$(M)$(CODEC_NAMES_SH) config.h $(AVCODEC_H) $@
> +	$(CC) $(CPPFLAGS) $(CFLAGS) -E $(AVCODEC_H) | \
> +	$(CODEC_NAMES_SH) config.h $@

Is -E supported for all compilers we care about?
Otherwise I guess it should have been easier to run the names
through "uniq" (or for the use case, both sort and uniq).


More information about the ffmpeg-cvslog mailing list