forked from greenplum-db/gpdb-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.global
66 lines (50 loc) · 1.98 KB
/
Makefile.global
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Set the shell
SHELL=/bin/bash
# Determine the default target architecture on this machine, if override not set
ifeq "$(BLD_ARCH)" ""
export BLD_ARCH:=$(shell $(BLD_TOP)/releng/set_bld_arch.sh)
endif
# include thirdparty infrastructure which depends on WHERE_THE...
BLD_WHERE_THE_LIBRARY_THINGS_ARE=LD_LIBRARY_PATH
include $(BLD_TOP)/Makefile.thirdparty
# get current working directory with symlinks maintained
HERE:=$(shell pwd -L)
# override MPP_ARCH values on BLD_ARCH's not native to the build server (e.g., 32-bit builds on 64-bit OSes)
ifneq "$($(BLD_ARCH)_MPP_ARCH)" ""
export MPP_ARCH=$($(BLD_ARCH)_MPP_ARCH)
endif
ifneq "$($(BLD_ARCH)_CXX)" ""
export CXX=$($(BLD_ARCH)_CXX)
endif
export BLD_PATH_FIXED=true
export BLD_LD_LIBRARY_PATH_FIXED=true
##
## Control if PATH and LD_LIBRARY_PATH|DYLD_LIBRARY_PATH values are displayed.
##
ifeq "$(ENABLE_MAKE_WARNING)" "true"
$(warning PATH=$(PATH))
$(warning $(BLD_WHERE_THE_LIBRARY_THINGS_ARE)=$($(BLD_WHERE_THE_LIBRARY_THINGS_ARE)))
endif
# disable our gcc wrapper
export NO_M64=1
# 32-bit/64-bit compiler/linker flag settings
rhel6_x86_64_BLD_CFLAGS=-m64 -gdwarf-2 -gstrict-dwarf
rhel7_x86_64_BLD_CFLAGS=-m64
BLD_CFLAGS=$($(BLD_ARCH)_BLD_CFLAGS)
BLD_LDFLAGS=$($(BLD_ARCH)_BLD_LDFLAGS)
BLD_BITS:=$(strip $(findstring 32,$(BLD_ARCH)) $(findstring 64,$(BLD_ARCH)))
ifeq "$(BLD_ARCH)" ""
$(error Unable to determine value for BLD_ARCH! You may set this on the command line.)
endif
ifeq "$(BLD_BITS)" ""
$(error Unable to determine value for BLD_BITS! You may set this on the command line.)
endif
GREP=grep
TAR=tar
AWK=awk
# Functions for use in this and including makefiles
# function: check_pipe_for_errors
# purpose: detect cases where a member of a pipe sequence fails; make normally only checks the last command in the pipe
ifeq "$(origin check_pipe_for_errors)" "undefined"
check_pipe_for_errors=; if [ x`echo $${PIPESTATUS[*]} | sed -e s,0,,g | sed -e s,\ ,,g` != x ]; then echo "`date` -- ERROR: failure detected in piped operation"; exit 1; fi
endif