diff options
Diffstat (limited to 'make')
-rwxr-xr-x | make/calcdep.pl | 5 | ||||
-rw-r--r-- | make/template/main.mk | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/make/calcdep.pl b/make/calcdep.pl index 279fdffce..f96afee33 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -20,6 +20,7 @@ BEGIN { + push @INC, $ENV{SOURCEPATH}; require 5.10.0; unless (-f 'configure') { print "Error: $0 must be run from the main source directory!\n"; @@ -32,6 +33,8 @@ use warnings FATAL => qw(all); use File::Basename qw(basename); +use make::common; + use constant { BUILDPATH => $ENV{BUILDPATH}, SOURCEPATH => $ENV{SOURCEPATH} @@ -50,7 +53,7 @@ run; exit 0; sub run() { - mkdir BUILDPATH; + create_directory(BUILDPATH, 0770) or die "Could not create build directory: $!"; chdir BUILDPATH or die "Could not open build directory: $!"; unlink 'include'; symlink "${\SOURCEPATH}/include", 'include'; diff --git a/make/template/main.mk b/make/template/main.mk index 7e22cf254..1e6ba5cd0 100644 --- a/make/template/main.mk +++ b/make/template/main.mk @@ -32,7 +32,7 @@ CXX = @CXX@ COMPILER = @COMPILER_NAME@ SYSTEM = @SYSTEM_NAME@ -BUILDPATH ?= $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/build +BUILDPATH ?= $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/build/@COMPILER_NAME@-@COMPILER_VERSION@ SOCKETENGINE = @SOCKETENGINE@ CORECXXFLAGS = -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -pipe -Iinclude -Wall -Wextra -Wfatal-errors -Wno-unused-parameter -Wshadow LDLIBS = -lstdc++ |