mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'
* commit '11a9320de54759340531177c9f2b1e31e6112cc2': build: Move build-system-related helper files to a separate subdirectory "ffbuild" directory name is used instead of "avbuild". Merged-by: Clément Bœsch <u@pkh.me>
This commit is contained in:
commit
3f17751eeb
3
.gitignore
vendored
3
.gitignore
vendored
@ -27,7 +27,8 @@
|
|||||||
/ffplay
|
/ffplay
|
||||||
/ffprobe
|
/ffprobe
|
||||||
/ffserver
|
/ffserver
|
||||||
/config.*
|
/config.asm
|
||||||
|
/config.h
|
||||||
/coverage.info
|
/coverage.info
|
||||||
/avversion.h
|
/avversion.h
|
||||||
/lcov/
|
/lcov/
|
||||||
|
19
Makefile
19
Makefile
@ -1,5 +1,5 @@
|
|||||||
MAIN_MAKEFILE=1
|
MAIN_MAKEFILE=1
|
||||||
include config.mak
|
include ffbuild/config.mak
|
||||||
|
|
||||||
vpath %.c $(SRC_PATH)
|
vpath %.c $(SRC_PATH)
|
||||||
vpath %.cpp $(SRC_PATH)
|
vpath %.cpp $(SRC_PATH)
|
||||||
@ -66,7 +66,7 @@ SKIPHEADERS = cmdutils_common_opts.h \
|
|||||||
all: all-yes
|
all: all-yes
|
||||||
|
|
||||||
include $(SRC_PATH)/tools/Makefile
|
include $(SRC_PATH)/tools/Makefile
|
||||||
include $(SRC_PATH)/common.mak
|
include $(SRC_PATH)/ffbuild/common.mak
|
||||||
|
|
||||||
FF_EXTRALIBS := $(FFEXTRALIBS)
|
FF_EXTRALIBS := $(FFEXTRALIBS)
|
||||||
FF_DEP_LIBS := $(DEP_LIBS)
|
FF_DEP_LIBS := $(DEP_LIBS)
|
||||||
@ -91,8 +91,8 @@ CONFIGURABLE_COMPONENTS = \
|
|||||||
$(SRC_PATH)/libavcodec/bitstream_filters.c \
|
$(SRC_PATH)/libavcodec/bitstream_filters.c \
|
||||||
$(SRC_PATH)/libavformat/protocols.c \
|
$(SRC_PATH)/libavformat/protocols.c \
|
||||||
|
|
||||||
config.h: .config
|
config.h: ffbuild/.config
|
||||||
.config: $(CONFIGURABLE_COMPONENTS)
|
ffbuild/.config: $(CONFIGURABLE_COMPONENTS)
|
||||||
@-tput bold 2>/dev/null
|
@-tput bold 2>/dev/null
|
||||||
@-printf '\nWARNING: $(?) newer than config.h, rerun configure\n\n'
|
@-printf '\nWARNING: $(?) newer than config.h, rerun configure\n\n'
|
||||||
@-tput sgr0 2>/dev/null
|
@-tput sgr0 2>/dev/null
|
||||||
@ -115,7 +115,7 @@ SUBDIR := $(1)/
|
|||||||
include $(SRC_PATH)/$(1)/Makefile
|
include $(SRC_PATH)/$(1)/Makefile
|
||||||
-include $(SRC_PATH)/$(1)/$(ARCH)/Makefile
|
-include $(SRC_PATH)/$(1)/$(ARCH)/Makefile
|
||||||
-include $(SRC_PATH)/$(1)/$(INTRINSICS)/Makefile
|
-include $(SRC_PATH)/$(1)/$(INTRINSICS)/Makefile
|
||||||
include $(SRC_PATH)/library.mak
|
include $(SRC_PATH)/ffbuild/library.mak
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
|
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
|
||||||
@ -142,10 +142,10 @@ $(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
|
|||||||
%$(PROGSSUF)_g$(EXESUF): %.o $(FF_DEP_LIBS)
|
%$(PROGSSUF)_g$(EXESUF): %.o $(FF_DEP_LIBS)
|
||||||
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
|
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
|
||||||
|
|
||||||
VERSION_SH = $(SRC_PATH)/version.sh
|
VERSION_SH = $(SRC_PATH)/ffbuild/version.sh
|
||||||
GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
|
GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
|
||||||
|
|
||||||
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
|
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) ffbuild/config.mak
|
||||||
.version: M=@
|
.version: M=@
|
||||||
|
|
||||||
libavutil/ffversion.h .version:
|
libavutil/ffversion.h .version:
|
||||||
@ -194,7 +194,10 @@ clean::
|
|||||||
|
|
||||||
distclean::
|
distclean::
|
||||||
$(RM) $(DISTCLEANSUFFIXES)
|
$(RM) $(DISTCLEANSUFFIXES)
|
||||||
$(RM) config.* .config libavutil/avconfig.h .version mapfile avversion.h version.h libavutil/ffversion.h libavcodec/codec_names.h libavcodec/bsf_list.c libavformat/protocol_list.c
|
$(RM) .version avversion.h config.asm config.h mapfile \
|
||||||
|
ffbuild/.config ffbuild/config.* libavutil/avconfig.h \
|
||||||
|
version.h libavutil/ffversion.h libavcodec/codec_names.h \
|
||||||
|
libavcodec/bsf_list.c libavformat/protocol_list.c
|
||||||
ifeq ($(SRC_LINK),src)
|
ifeq ($(SRC_LINK),src)
|
||||||
$(RM) src
|
$(RM) src
|
||||||
endif
|
endif
|
||||||
|
25
configure
vendored
25
configure
vendored
@ -77,7 +77,7 @@ Help options:
|
|||||||
--list-filters show all available filters
|
--list-filters show all available filters
|
||||||
|
|
||||||
Standard options:
|
Standard options:
|
||||||
--logfile=FILE log tests and output to FILE [config.log]
|
--logfile=FILE log tests and output to FILE [ffbuild/config.log]
|
||||||
--disable-logging do not log configure debug information
|
--disable-logging do not log configure debug information
|
||||||
--fatal-warnings fail if any configure warning is generated
|
--fatal-warnings fail if any configure warning is generated
|
||||||
--prefix=PREFIX install in PREFIX [$prefix_default]
|
--prefix=PREFIX install in PREFIX [$prefix_default]
|
||||||
@ -3224,7 +3224,7 @@ doc_deps_any="manpages htmlpages podpages txtpages"
|
|||||||
|
|
||||||
# default parameters
|
# default parameters
|
||||||
|
|
||||||
logfile="config.log"
|
logfile="ffbuild/config.log"
|
||||||
|
|
||||||
# installation paths
|
# installation paths
|
||||||
prefix_default="/usr/local"
|
prefix_default="/usr/local"
|
||||||
@ -3581,6 +3581,7 @@ disable_components(){
|
|||||||
|
|
||||||
map 'disable_components $v' $LIBRARY_LIST
|
map 'disable_components $v' $LIBRARY_LIST
|
||||||
|
|
||||||
|
mkdir -p ffbuild
|
||||||
echo "# $0 $FFMPEG_CONFIGURATION" > $logfile
|
echo "# $0 $FFMPEG_CONFIGURATION" > $logfile
|
||||||
set >> $logfile
|
set >> $logfile
|
||||||
|
|
||||||
@ -5152,7 +5153,7 @@ esc(){
|
|||||||
echo "$*" | sed 's/%/%25/g;s/:/%3a/g'
|
echo "$*" | sed 's/%/%25/g;s/:/%3a/g'
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $FFMPEG_CONFIGURATION)" >config.fate
|
echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $FFMPEG_CONFIGURATION)" > ffbuild/config.fate
|
||||||
|
|
||||||
check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable_weak pic
|
check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable_weak pic
|
||||||
|
|
||||||
@ -6619,9 +6620,9 @@ test -e Makefile || echo "include $source_path/Makefile" > Makefile
|
|||||||
|
|
||||||
enabled stripping || strip="echo skipping strip"
|
enabled stripping || strip="echo skipping strip"
|
||||||
|
|
||||||
config_files="$TMPH config.mak doc/config.texi"
|
config_files="$TMPH ffbuild/config.mak doc/config.texi"
|
||||||
|
|
||||||
cat > config.mak <<EOF
|
cat > ffbuild/config.mak <<EOF
|
||||||
# Automatically generated by configure - do not modify!
|
# Automatically generated by configure - do not modify!
|
||||||
ifndef FFMPEG_CONFIG_MAK
|
ifndef FFMPEG_CONFIG_MAK
|
||||||
FFMPEG_CONFIG_MAK=1
|
FFMPEG_CONFIG_MAK=1
|
||||||
@ -6755,18 +6756,18 @@ get_version(){
|
|||||||
eval $(awk "/#define ${name}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file")
|
eval $(awk "/#define ${name}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file")
|
||||||
enabled raise_major && eval ${name}_VERSION_MAJOR=$((${name}_VERSION_MAJOR+100))
|
enabled raise_major && eval ${name}_VERSION_MAJOR=$((${name}_VERSION_MAJOR+100))
|
||||||
eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
|
eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
|
||||||
eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
|
eval echo "${lcname}_VERSION=\$${name}_VERSION" >> ffbuild/config.mak
|
||||||
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
|
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> ffbuild/config.mak
|
||||||
eval echo "${lcname}_VERSION_MINOR=\$${name}_VERSION_MINOR" >> config.mak
|
eval echo "${lcname}_VERSION_MINOR=\$${name}_VERSION_MINOR" >> ffbuild/config.mak
|
||||||
}
|
}
|
||||||
|
|
||||||
map 'get_version $v' $LIBRARY_LIST
|
map 'get_version $v' $LIBRARY_LIST
|
||||||
|
|
||||||
map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> config.mak' $LIBRARY_LIST
|
map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> ffbuild/config.mak' $LIBRARY_LIST
|
||||||
|
|
||||||
print_program_extralibs(){
|
print_program_extralibs(){
|
||||||
eval "program_extralibs=\$${1}_extralibs"
|
eval "program_extralibs=\$${1}_extralibs"
|
||||||
eval echo "EXTRALIBS-${1}=${program_extralibs}" >> config.mak
|
eval echo "EXTRALIBS-${1}=${program_extralibs}" >> ffbuild/config.mak
|
||||||
}
|
}
|
||||||
|
|
||||||
map 'print_program_extralibs $v' $PROGRAM_LIST
|
map 'print_program_extralibs $v' $PROGRAM_LIST
|
||||||
@ -6816,11 +6817,11 @@ print_config CONFIG_ "$config_files" $CONFIG_LIST \
|
|||||||
$ALL_COMPONENTS \
|
$ALL_COMPONENTS \
|
||||||
|
|
||||||
echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
|
echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
|
||||||
echo "endif # FFMPEG_CONFIG_MAK" >> config.mak
|
echo "endif # FFMPEG_CONFIG_MAK" >> ffbuild/config.mak
|
||||||
|
|
||||||
# Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
|
# Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
|
||||||
cp_if_changed $TMPH config.h
|
cp_if_changed $TMPH config.h
|
||||||
touch .config
|
touch ffbuild/.config
|
||||||
|
|
||||||
enabled yasm && cp_if_changed $TMPASM config.asm
|
enabled yasm && cp_if_changed $TMPASM config.asm
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ $(DOC_EXAMPLES:%$(EXESUF)=%.o): | doc/examples
|
|||||||
OBJDIRS += doc/examples
|
OBJDIRS += doc/examples
|
||||||
|
|
||||||
DOXY_INPUT = $(INSTHEADERS) $(DOC_EXAMPLES:%$(EXESUF)=%.c) $(LIB_EXAMPLES:%$(EXESUF)=%.c)
|
DOXY_INPUT = $(INSTHEADERS) $(DOC_EXAMPLES:%$(EXESUF)=%.c) $(LIB_EXAMPLES:%$(EXESUF)=%.c)
|
||||||
DOXY_INPUT_DEPS = $(addprefix $(SRC_PATH)/, $(DOXY_INPUT)) config.mak
|
DOXY_INPUT_DEPS = $(addprefix $(SRC_PATH)/, $(DOXY_INPUT)) ffbuild/config.mak
|
||||||
|
|
||||||
doc/doxy/html: TAG = DOXY
|
doc/doxy/html: TAG = DOXY
|
||||||
doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(SRC_PATH)/doc/doxy-wrapper.sh $(DOXY_INPUT_DEPS)
|
doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(SRC_PATH)/doc/doxy-wrapper.sh $(DOXY_INPUT_DEPS)
|
||||||
|
@ -38,14 +38,14 @@ the build system and the C:
|
|||||||
|
|
||||||
--- after running configure ---
|
--- after running configure ---
|
||||||
|
|
||||||
$ grep FOOBAR config.mak
|
$ grep FOOBAR ffbuild/config.mak
|
||||||
CONFIG_FOOBAR_FILTER=yes
|
CONFIG_FOOBAR_FILTER=yes
|
||||||
$ grep FOOBAR config.h
|
$ grep FOOBAR config.h
|
||||||
#define CONFIG_FOOBAR_FILTER 1
|
#define CONFIG_FOOBAR_FILTER 1
|
||||||
|
|
||||||
CONFIG_FOOBAR_FILTER=yes from the config.mak is later used to enable the filter in
|
CONFIG_FOOBAR_FILTER=yes from the ffbuild/config.mak is later used to enable
|
||||||
libavfilter/Makefile and CONFIG_FOOBAR_FILTER=1 from the config.h will be used
|
the filter in libavfilter/Makefile and CONFIG_FOOBAR_FILTER=1 from the config.h
|
||||||
for registering the filter in libavfilter/allfilters.c.
|
will be used for registering the filter in libavfilter/allfilters.c.
|
||||||
|
|
||||||
Filter code layout
|
Filter code layout
|
||||||
==================
|
==================
|
||||||
|
4
ffbuild/.gitignore
vendored
Normal file
4
ffbuild/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/.config
|
||||||
|
/config.fate
|
||||||
|
/config.log
|
||||||
|
/config.mak
|
@ -103,7 +103,7 @@ COMPILE_HOSTC = $(call COMPILE,HOSTCC)
|
|||||||
$(OBJS):
|
$(OBJS):
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(SRC_PATH)/arch.mak
|
include $(SRC_PATH)/ffbuild/arch.mak
|
||||||
|
|
||||||
OBJS += $(OBJS-yes)
|
OBJS += $(OBJS-yes)
|
||||||
SLIBOBJS += $(SLIBOBJS-yes)
|
SLIBOBJS += $(SLIBOBJS-yes)
|
@ -1,4 +1,4 @@
|
|||||||
include $(SRC_PATH)/common.mak
|
include $(SRC_PATH)/ffbuild/common.mak
|
||||||
|
|
||||||
LIBVERSION := $(lib$(NAME)_VERSION)
|
LIBVERSION := $(lib$(NAME)_VERSION)
|
||||||
LIBMAJOR := $(lib$(NAME)_VERSION_MAJOR)
|
LIBMAJOR := $(lib$(NAME)_VERSION_MAJOR)
|
@ -1,4 +1,4 @@
|
|||||||
include $(SUBDIR)../config.mak
|
include $(SUBDIR)../ffbuild/config.mak
|
||||||
|
|
||||||
NAME = avcodec
|
NAME = avcodec
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
include $(SUBDIR)../config.mak
|
include $(SUBDIR)../ffbuild/config.mak
|
||||||
|
|
||||||
NAME = avdevice
|
NAME = avdevice
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
include $(SUBDIR)../config.mak
|
include $(SUBDIR)../ffbuild/config.mak
|
||||||
|
|
||||||
NAME = avfilter
|
NAME = avfilter
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
include $(SUBDIR)../config.mak
|
include $(SUBDIR)../ffbuild/config.mak
|
||||||
|
|
||||||
NAME = avformat
|
NAME = avformat
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
include $(SUBDIR)../config.mak
|
include $(SUBDIR)../ffbuild/config.mak
|
||||||
|
|
||||||
NAME = avutil
|
NAME = avutil
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
include $(SUBDIR)../config.mak
|
include $(SUBDIR)../ffbuild/config.mak
|
||||||
|
|
||||||
NAME = postproc
|
NAME = postproc
|
||||||
FFLIBS = avutil
|
FFLIBS = avutil
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
include $(SUBDIR)../config.mak
|
include $(SUBDIR)../ffbuild/config.mak
|
||||||
|
|
||||||
NAME = swresample
|
NAME = swresample
|
||||||
FFLIBS = avutil
|
FFLIBS = avutil
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
include $(SUBDIR)../config.mak
|
include $(SUBDIR)../ffbuild/config.mak
|
||||||
|
|
||||||
NAME = swscale
|
NAME = swscale
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ clean(){
|
|||||||
report(){
|
report(){
|
||||||
date=$(date -u +%Y%m%d%H%M%S)
|
date=$(date -u +%Y%m%d%H%M%S)
|
||||||
echo "fate:1:${date}:${slot}:${version}:$1:$2:${branch}:${comment}" >report
|
echo "fate:1:${date}:${slot}:${version}:$1:$2:${branch}:${comment}" >report
|
||||||
cat ${build}/config.fate >>report
|
cat ${build}/ffbuild/config.fate >>report
|
||||||
cat ${build}/tests/data/fate/*.rep >>report 2>/dev/null || for i in ${build}/tests/data/fate/*.rep ; do cat "$i" >>report 2>/dev/null; done
|
cat ${build}/tests/data/fate/*.rep >>report 2>/dev/null || for i in ${build}/tests/data/fate/*.rep ; do cat "$i" >>report 2>/dev/null; done
|
||||||
test -n "$fate_recv" && $tar report *.log | gzip | $fate_recv
|
test -n "$fate_recv" && $tar report *.log | gzip | $fate_recv
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ test -d "$src" && update || checkout || die "Error fetching source"
|
|||||||
|
|
||||||
cd ${workdir}
|
cd ${workdir}
|
||||||
|
|
||||||
version=$(${src}/version.sh ${src})
|
version=$(${src}/ffbuild/version.sh ${src})
|
||||||
test "$version" = "$(cat version-$slot 2>/dev/null)" && exit 0
|
test "$version" = "$(cat version-$slot 2>/dev/null)" && exit 0
|
||||||
echo ${version} >version-$slot
|
echo ${version} >version-$slot
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user