aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-02-02 13:35:09 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-02-02 14:01:43 +0300
commita4a3ed12195be401672f1418d8cd909e46b2e028 (patch)
tree41d9c3fee45cf3ce594353c08671e7bbb99d6773
parentMakefile: better $(ls) on Linux (diff)
downloadcmake-common-a4a3ed12195be401672f1418d8cd909e46b2e028.tar.gz
cmake-common-a4a3ed12195be401672f1418d8cd909e46b2e028.zip
Makefile: get rid of TRAVIS_BUILD_DIR where unnecessary
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 64d9463..99d4692 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ endif
ifeq ($(windows),1)
# Make might pick up sh.exe if it's available:
SHELL := cmd
+.SHELLFLAGS := /c
else
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
@@ -51,8 +52,9 @@ x64_args = -A x64
x86_args = -A Win32
install_prefix = C:/install
else
-x64_args := -D "CMAKE_TOOLCHAIN_FILE=$$TRAVIS_BUILD_DIR/cmake/toolchains/gcc-x64.cmake"
-x86_args := -D "CMAKE_TOOLCHAIN_FILE=$$TRAVIS_BUILD_DIR/cmake/toolchains/gcc-x86.cmake"
+makefile_dir := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+x64_args := -D "CMAKE_TOOLCHAIN_FILE=$(makefile_dir)/cmake/toolchains/gcc-x64.cmake"
+x86_args := -D "CMAKE_TOOLCHAIN_FILE=$(makefile_dir)/cmake/toolchains/gcc-x86.cmake"
install_prefix := $$HOME/install
endif