mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 07:20:45 +00:00
build: Move build-system-related helper files to a separate subdirectory
This unclutters the top-level directory and groups related files together.
This commit is contained in:
parent
f9edc734e0
commit
11a9320de5
3
.gitignore
vendored
3
.gitignore
vendored
@ -23,7 +23,8 @@
|
||||
/avplay
|
||||
/avprobe
|
||||
/avversion.h
|
||||
/config.*
|
||||
/config.asm
|
||||
/config.h
|
||||
/coverage.info
|
||||
/lcov/
|
||||
/mapfile
|
||||
|
19
Makefile
19
Makefile
@ -1,4 +1,4 @@
|
||||
include config.mak
|
||||
include avbuild/config.mak
|
||||
|
||||
vpath %.c $(SRC_PATH)
|
||||
vpath %.m $(SRC_PATH)
|
||||
@ -110,7 +110,7 @@ SKIPHEADERS = cmdutils_common_opts.h \
|
||||
all: all-yes
|
||||
|
||||
include $(SRC_PATH)/tools/Makefile
|
||||
include $(SRC_PATH)/common.mak
|
||||
include $(SRC_PATH)/avbuild/common.mak
|
||||
|
||||
FF_EXTRALIBS := $(FFEXTRALIBS)
|
||||
FF_DEP_LIBS := $(DEP_LIBS)
|
||||
@ -129,8 +129,8 @@ CONFIGURABLE_COMPONENTS = \
|
||||
$(SRC_PATH)/libavcodec/bitstream_filters.c \
|
||||
$(SRC_PATH)/libavformat/protocols.c \
|
||||
|
||||
config.h: .config
|
||||
.config: $(CONFIGURABLE_COMPONENTS)
|
||||
config.h: avbuild/.config
|
||||
avbuild/.config: $(CONFIGURABLE_COMPONENTS)
|
||||
@-tput bold 2>/dev/null
|
||||
@-printf '\nWARNING: $(?) newer than config.h, rerun configure\n\n'
|
||||
@-tput sgr0 2>/dev/null
|
||||
@ -152,7 +152,7 @@ SUBDIR := $(1)/
|
||||
include $(SRC_PATH)/$(1)/Makefile
|
||||
-include $(SRC_PATH)/$(1)/$(ARCH)/Makefile
|
||||
-include $(SRC_PATH)/$(1)/$(INTRINSICS)/Makefile
|
||||
include $(SRC_PATH)/library.mak
|
||||
include $(SRC_PATH)/avbuild/library.mak
|
||||
endef
|
||||
|
||||
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
|
||||
@ -173,10 +173,10 @@ $(foreach P,$(PROGS),$(eval $(call DOPROG,$(P:$(EXESUF)=))))
|
||||
$(PROGS): %$(EXESUF): %.o $(FF_DEP_LIBS)
|
||||
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
|
||||
|
||||
VERSION_SH = $(SRC_PATH)/version.sh
|
||||
VERSION_SH = $(SRC_PATH)/avbuild/version.sh
|
||||
GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
|
||||
|
||||
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
|
||||
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) avbuild/config.mak
|
||||
.version: M=@
|
||||
|
||||
cmdutils.o libavutil/utils.o: avversion.h
|
||||
@ -221,8 +221,9 @@ clean::
|
||||
|
||||
distclean::
|
||||
$(RM) $(DISTCLEANSUFFIXES)
|
||||
$(RM) config.* .config libavutil/avconfig.h .version avversion.h \
|
||||
mapfile libavcodec/bsf_list.c libavformat/protocol_list.c
|
||||
$(RM) .version avversion.h config.asm config.h mapfile \
|
||||
avbuild/.config avbuild/config.* libavutil/avconfig.h \
|
||||
libavcodec/bsf_list.c libavformat/protocol_list.c
|
||||
|
||||
config:
|
||||
$(SRC_PATH)/configure $(value LIBAV_CONFIGURATION)
|
||||
|
4
avbuild/.gitignore
vendored
Normal file
4
avbuild/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/.config
|
||||
/config.fate
|
||||
/config.log
|
||||
/config.mak
|
@ -2,7 +2,7 @@
|
||||
# common bits used by all libraries
|
||||
#
|
||||
|
||||
include $(SRC_PATH)/arch.mak
|
||||
include $(SRC_PATH)/avbuild/arch.mak
|
||||
|
||||
OBJS += $(OBJS-yes)
|
||||
FFLIBS := $($(NAME)_FFLIBS) $(FFLIBS-yes) $(FFLIBS)
|
@ -1,4 +1,4 @@
|
||||
include $(SRC_PATH)/common.mak
|
||||
include $(SRC_PATH)/avbuild/common.mak
|
||||
|
||||
LIBVERSION := $(lib$(NAME)_VERSION)
|
||||
LIBMAJOR := $(lib$(NAME)_VERSION_MAJOR)
|
23
configure
vendored
23
configure
vendored
@ -77,7 +77,7 @@ Help options:
|
||||
--list-filters show all available filters
|
||||
|
||||
Standard options:
|
||||
--logfile=FILE log tests and output to FILE [config.log]
|
||||
--logfile=FILE log tests and output to FILE [avbuild/config.log]
|
||||
--disable-logging do not log configure debug information
|
||||
--prefix=PREFIX install in PREFIX [$prefix_default]
|
||||
--bindir=DIR install binaries in DIR [PREFIX/bin]
|
||||
@ -2495,7 +2495,7 @@ texi2html_deps="doc"
|
||||
|
||||
# default parameters
|
||||
|
||||
logfile="config.log"
|
||||
logfile="avbuild/config.log"
|
||||
|
||||
# installation paths
|
||||
prefix_default="/usr/local"
|
||||
@ -2808,6 +2808,7 @@ disable_components(){
|
||||
|
||||
map 'disable_components $v' $LIBRARY_LIST
|
||||
|
||||
mkdir -p avbuild
|
||||
echo "# $0 $LIBAV_CONFIGURATION" > $logfile
|
||||
set >> $logfile
|
||||
|
||||
@ -4123,7 +4124,7 @@ esc(){
|
||||
echo "$*" | sed 's/%/%25/g;s/:/%3a/g'
|
||||
}
|
||||
|
||||
echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $LIBAV_CONFIGURATION)" >config.fate
|
||||
echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $LIBAV_CONFIGURATION)" > avbuild/config.fate
|
||||
|
||||
check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable_weak pic
|
||||
|
||||
@ -5210,9 +5211,9 @@ fi # test "$quiet" != "yes"
|
||||
|
||||
test -e Makefile || echo "include $source_path/Makefile" > Makefile
|
||||
|
||||
config_files="$TMPH config.mak"
|
||||
config_files="$TMPH avbuild/config.mak"
|
||||
|
||||
cat > config.mak <<EOF
|
||||
cat > avbuild/config.mak <<EOF
|
||||
# Automatically generated by configure - do not modify!
|
||||
LIBAV_CONFIGURATION=$LIBAV_CONFIGURATION
|
||||
prefix=$prefix
|
||||
@ -5323,18 +5324,18 @@ get_version(){
|
||||
file=$source_path/$lcname/version.h
|
||||
eval $(awk "/#define ${name}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file")
|
||||
eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
|
||||
eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
|
||||
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
|
||||
eval echo "${lcname}_VERSION_MINOR=\$${name}_VERSION_MINOR" >> config.mak
|
||||
eval echo "${lcname}_VERSION=\$${name}_VERSION" >> avbuild/config.mak
|
||||
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> avbuild/config.mak
|
||||
eval echo "${lcname}_VERSION_MINOR=\$${name}_VERSION_MINOR" >> avbuild/config.mak
|
||||
}
|
||||
|
||||
map 'get_version $v' $LIBRARY_LIST
|
||||
|
||||
map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> config.mak' $LIBRARY_LIST
|
||||
map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> avbuild/config.mak' $LIBRARY_LIST
|
||||
|
||||
print_program_extralibs(){
|
||||
eval "program_extralibs=\$${1}_extralibs"
|
||||
eval echo "EXTRALIBS-${1}=${program_extralibs}" >> config.mak
|
||||
eval echo "EXTRALIBS-${1}=${program_extralibs}" >> avbuild/config.mak
|
||||
}
|
||||
|
||||
map 'print_program_extralibs $v' $PROGRAM_LIST
|
||||
@ -5373,7 +5374,7 @@ echo "#endif /* LIBAV_CONFIG_H */" >> $TMPH
|
||||
|
||||
# Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
|
||||
cp_if_changed $TMPH config.h
|
||||
touch .config
|
||||
touch avbuild/.config
|
||||
|
||||
enabled yasm && cp_if_changed $TMPASM config.asm
|
||||
|
||||
|
@ -83,7 +83,7 @@ clean(){
|
||||
report(){
|
||||
date=$(date -u +%Y%m%d%H%M%S)
|
||||
echo "fate:1:${date}:${slot}:${version}:$1:$2:${branch}:${comment}" >report
|
||||
cat ${build}/config.fate ${build}/tests/data/fate/*.rep >>report 2>/dev/null
|
||||
cat ${build}/avbuild/config.fate ${build}/tests/data/fate/*.rep >> report 2> /dev/null
|
||||
test -n "$fate_recv" && $tar report *.log | gzip | $fate_recv
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ test -d "$src" && update || checkout || die "Error fetching source"
|
||||
|
||||
cd ${workdir}
|
||||
|
||||
version=$(${src}/version.sh ${src})
|
||||
version=$(${src}/avbuild/version.sh ${src})
|
||||
test "$version" = "$(cat version-$slot 2>/dev/null)" && exit 0
|
||||
echo ${version} >version-$slot
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user