build: Move build-system-related helper files to a separate subdirectory
authorDiego Biurrun <diego@biurrun.de>
Tue, 26 Mar 2013 00:11:11 +0000 (01:11 +0100)
committerDiego Biurrun <diego@biurrun.de>
Thu, 22 Dec 2016 10:07:50 +0000 (11:07 +0100)
This unclutters the top-level directory and groups related files together.

.gitignore
Makefile
avbuild/.gitignore [new file with mode: 0644]
avbuild/arch.mak [moved from arch.mak with 100% similarity]
avbuild/common.mak [moved from common.mak with 98% similarity]
avbuild/library.mak [moved from library.mak with 98% similarity]
avbuild/version.sh [moved from version.sh with 100% similarity]
configure
tests/fate.sh

index e71246c..f6d97b0 100644 (file)
@@ -23,7 +23,8 @@
 /avplay
 /avprobe
 /avversion.h
-/config.*
+/config.asm
+/config.h
 /coverage.info
 /lcov/
 /mapfile
index d4c2b8e..c9fa162 100644 (file)
--- a/Makefile
+++ b/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)
diff --git a/avbuild/.gitignore b/avbuild/.gitignore
new file mode 100644 (file)
index 0000000..693b7aa
--- /dev/null
@@ -0,0 +1,4 @@
+/.config
+/config.fate
+/config.log
+/config.mak
similarity index 100%
rename from arch.mak
rename to avbuild/arch.mak
similarity index 98%
rename from common.mak
rename to avbuild/common.mak
index 70ebd4b..9676294 100644 (file)
@@ -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)
similarity index 98%
rename from library.mak
rename to avbuild/library.mak
index bf1853f..9215a93 100644 (file)
@@ -1,4 +1,4 @@
-include $(SRC_PATH)/common.mak
+include $(SRC_PATH)/avbuild/common.mak
 
 LIBVERSION := $(lib$(NAME)_VERSION)
 LIBMAJOR   := $(lib$(NAME)_VERSION_MAJOR)
similarity index 100%
rename from version.sh
rename to avbuild/version.sh
index d30d384..bcc5f6e 100755 (executable)
--- a/configure
+++ b/configure
@@ -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
 
index f7ca891..4608d2d 100755 (executable)
@@ -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