1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

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@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Nicolas George 2011-10-22 10:55:44 +02:00 committed by Michael Niedermayer
parent 9ab5e64897
commit 0e138745f7
2 changed files with 5 additions and 5 deletions

View File

@ -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 $@
$(SUBDIR)utils.o: $(SUBDIR)codec_names.h

View File

@ -21,8 +21,7 @@
set -e
config="$1"
codecs="$2"
out="$3"
out="$2"
test -n "$out"
outval=""
@ -63,7 +62,7 @@ parse_enum_codecid () {
while read line; do
case "$line" in
"};") break;;
*CODEC_ID_FIRST*///*dummy*) ;;
*CODEC_ID_FIRST*=*) ;;
CODEC_ID_*) define_codecid ${line%%[=,]*};;
esac
done
@ -78,7 +77,7 @@ parse_avcodec_h () {
}
parse_config_h < "$config"
parse_avcodec_h < "$codecs"
parse_avcodec_h # use stdin
sed -e '/case.*:/!y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' \
-e 's/extern avcodec /extern AVCodec /' > "$out" <<EOF
$outval