mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-24 17:12:34 +02:00
configure: simplify get_version()
All libs have version headers now, which allows hardcoding the path.
This commit is contained in:
parent
86ab7b0f2f
commit
112971af26
20
configure
vendored
20
configure
vendored
@ -3368,22 +3368,22 @@ SAMPLES:=${samples:-\$(LIBAV_SAMPLES)}
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
get_version(){
|
get_version(){
|
||||||
name=$1
|
lcname=$1
|
||||||
file=$source_path/$2
|
name=$(toupper $lcname)
|
||||||
|
file=$source_path/$lcname/version.h
|
||||||
eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')
|
eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')
|
||||||
eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
|
eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
|
||||||
lcname=$(tolower $name)
|
|
||||||
eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
|
eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
|
||||||
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
|
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
|
||||||
}
|
}
|
||||||
|
|
||||||
get_version LIBAVCODEC libavcodec/version.h
|
get_version libavcodec
|
||||||
get_version LIBAVDEVICE libavdevice/version.h
|
get_version libavdevice
|
||||||
get_version LIBAVFILTER libavfilter/version.h
|
get_version libavfilter
|
||||||
get_version LIBAVFORMAT libavformat/version.h
|
get_version libavformat
|
||||||
get_version LIBAVRESAMPLE libavresample/version.h
|
get_version libavresample
|
||||||
get_version LIBAVUTIL libavutil/version.h
|
get_version libavutil
|
||||||
get_version LIBSWSCALE libswscale/version.h
|
get_version libswscale
|
||||||
|
|
||||||
cat > $TMPH <<EOF
|
cat > $TMPH <<EOF
|
||||||
/* Automatically generated by configure - do not modify! */
|
/* Automatically generated by configure - do not modify! */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user