Skip to content
Snippets Groups Projects
Commit 7febc397 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

tools: allow building tools out of the source tree

This is convenient when using one source tree with different compilers/OSes.
For example when C++ standard library differs between versions (since most of
the time we need to build protoc).
You can keep one set of tools per environment.
parent 594f02e8
No related branches found
No related tags found
No related merge requests found
......@@ -19,12 +19,6 @@ export LC_ALL=
NEEDED=
FOUND=
if [ ! -f tools.mak ]
then
echo "You must run me in ./extras/tools !"
exit 1
fi
check_version() {
gotver=$2
gotmajor=`echo $gotver|cut -d. -f1`
......@@ -177,7 +171,10 @@ case `uname` in
;;
esac
BOOTSTRAP_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
cat > Makefile << EOF
TOOLS = $BOOTSTRAP_PATH
MAKEFLAGS += -j$CPUS
CMAKEFLAGS += --parallel=$CPUS
PREFIX=\$(abspath ./build)
......@@ -205,5 +202,5 @@ cat >> Makefile << EOF
all: $TARGETS
@echo "You are ready to build VLC and its contribs"
include tools.mak
include \$(TOOLS)/tools.mak
EOF
......@@ -2,7 +2,8 @@
#
# This file is under the same license as the vlc package.
include packages.mak
include $(TOOLS)/packages.mak
TARBALLS := $(TOOLS)
#
# common rules
......@@ -36,7 +37,7 @@ endif
download_pkg = $(call download,$(VIDEOLAN)/$(2)/$(lastword $(subst /, ,$(@)))) || \
( $(call download,$(1)) && echo "Please upload package $(lastword $(subst /, ,$(@))) to our FTP" ) \
&& grep $(@) SHA512SUMS| $(SHA512SUM)
&& grep $(@) $(TOOLS)/SHA512SUMS| $(SHA512SUM)
UNPACK = $(RM) -R $@ \
$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xvzfo $(f)) \
......@@ -91,7 +92,7 @@ cmake-$(CMAKE_VERSION).tar.gz:
cmake: cmake-$(CMAKE_VERSION).tar.gz
$(UNPACK)
$(APPLY) cmake-msys-FindPkg.patch
$(APPLY) $(TOOLS)/cmake-msys-FindPkg.patch
$(MOVE)
.buildcmake: cmake
......@@ -126,10 +127,10 @@ libtool-$(LIBTOOL_VERSION).tar.gz:
libtool: libtool-$(LIBTOOL_VERSION).tar.gz
$(UNPACK)
(cd $(UNPACK_DIR) && chmod u+w build-aux/ltmain.sh)
$(APPLY) libtool-2.4.6-bitcode.patch
$(APPLY) libtool-2.4.6-san.patch
$(APPLY) libtool-2.4.6-clang-libs.patch
$(APPLY) libtool-2.4.6-response-files.patch
$(APPLY) $(TOOLS)/libtool-2.4.6-bitcode.patch
$(APPLY) $(TOOLS)/libtool-2.4.6-san.patch
$(APPLY) $(TOOLS)/libtool-2.4.6-clang-libs.patch
$(APPLY) $(TOOLS)/libtool-2.4.6-response-files.patch
(cd $(UNPACK_DIR) && autoreconf)
$(MOVE)
......@@ -201,7 +202,7 @@ automake-$(AUTOMAKE_VERSION).tar.gz:
automake: automake-$(AUTOMAKE_VERSION).tar.gz
$(UNPACK)
$(APPLY) automake-clang.patch
$(APPLY) $(TOOLS)/automake-clang.patch
$(MOVE)
.buildautomake: automake .autoconf
......@@ -219,8 +220,8 @@ m4-$(M4_VERSION).tar.gz:
m4: m4-$(M4_VERSION).tar.gz
$(UNPACK)
$(APPLY) bison-macOS-c41f233c.patch
$(APPLY) bison-macOS-7df04f9.patch
$(APPLY) $(TOOLS)/bison-macOS-c41f233c.patch
$(APPLY) $(TOOLS)/bison-macOS-7df04f9.patch
$(MOVE)
.buildm4: m4
......@@ -272,7 +273,7 @@ ragel-$(RAGEL_VERSION).tar.gz:
ragel: ragel-$(RAGEL_VERSION).tar.gz
$(UNPACK)
$(APPLY) ragel-6.8-javacodegen.patch
$(APPLY) $(TOOLS)/ragel-6.8-javacodegen.patch
$(MOVE)
......@@ -347,8 +348,8 @@ bison-$(BISON_VERSION).tar.xz:
bison: bison-$(BISON_VERSION).tar.xz
$(UNPACK)
$(APPLY) bison-macOS-c41f233c.patch
$(APPLY) bison-macOS-7df04f9.patch
$(APPLY) $(TOOLS)/bison-macOS-c41f233c.patch
$(APPLY) $(TOOLS)/bison-macOS-7df04f9.patch
$(MOVE)
.buildbison: bison
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment