-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMake.validate
108 lines (86 loc) · 3.94 KB
/
Make.validate
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Sanity checks for make variables.
define n # newline + error prefix formatting
***
endef
ifneq ($(NVALIDATE),1)
# Validate PREFIX.
ifndef PREFIX
$(error Internal error: PREFIX is not defined)
endif
ifneq ($(shell test -d $(PREFIX) -o \! -e $(PREFIX); echo $$?),0)
$(error PREFIX "$(PREFIX)" exists but is not a directory)
endif
PREFIX := $(abspath $(PREFIX))
ifndef PAKCS_HOME
$(error PAKCS_HOME is not defined)
endif
ifeq ($(shell [ -x "$(PAKCS)" ]; echo $$?),1)
$(error Not an executable: PAKCS=$(PAKCS))
endif
ifndef PYTHON_PACKAGE_NAME
$(error PYTHON_PACKAGE_NAME must be defined))
endif
ifndef PYTHON_EXECUTABLE
$(error PYTHON_EXECUTABLE must be defined))
endif
ifndef PYTHON_INCLUDE_PATH
$(error PYTHON_INCLUDE_PATH must be defined))
endif
ifndef PYTHON_LIBRARY_PATH
$(error PYTHON_LIBRARY_PATH must be defined))
endif
ifndef PYTHON_LIBRARY
$(error PYTHON_LIBRARY must be defined))
endif
ifeq ($(shell [ -e $(CC) ]; echo $$?),1)
$(error C compiler $(CC) not found)
endif
ifeq ($(shell [ -e $(CXX) ]; echo $$?),1)
$(error C++ compiler $(CXX) not found)
endif
# ifeq ($(shell [ -d $(MPS_HOME) ]; echo $$?),1)
# $(error Not a directory: MPS_HOME=$(MPS_HOME). Please check your MPS installation.)
# endif
# ifeq ($(shell [ -d $(LLVM_INCLUDE_PATH) ]; echo $$?),1)
# $(error Not a directory: LLVM_INCLUDE_PATH=$(LLVM_INCLUDE_PATH). Please check your LLVM installation.)
# endif
# ifeq ($(shell [ -d $(LLVM_C_INCLUDE_PATH) ]; echo $$?),1)
# $(error Not a directory: LLVM_C_INCLUDE_PATH=$(LLVM_C_INCLUDE_PATH). Please check your LLVM installation.)
# endif
# ifeq ($(shell [ -d $(LLVM_LIBRARY_PATH) ]; echo $$?),1)
# $(error Not a directory: LLVM_LIBRARY_PATH=$(LLVM_LIBRARY_PATH). Please check your LLVM installation.)
# endif
# ifeq ($(shell [ -x $(LLVM)-config ]; echo $$?),1)
# $(error Not an executable file: $(LLVM)-config. Please check your LLVM installation.)
# endif
ifeq ($(shell [ -d $(PYTHON_INCLUDE_PATH) ]; echo $$?),1)
$(error Not a directory: PYTHON_INCLUDE_PATH=$(PYTHON_INCLUDE_PATH). Please check your Python installation.)
endif
ifeq ($(shell [ -f $(PYTHON_EXECUTABLE) ] && [ -x $(PYTHON_EXECUTABLE) ]; echo $$?),1)
$(error Not an executable file: PYTHON_EXECUTABLE=$(PYTHON_EXECUTABLE). Please check your Python installation.)
endif
ifeq ($(shell [ -f $(ICURRY) ] && [ -x $(ICURRY) ]; echo $$?),1)
$(error Not an executable file: ICURRY=$(ICURRY)$nPlease check your installation.)
endif
# ifeq ($(shell [ -f $(ICURRY2JSON) ] && [ -x $(ICURRY2JSON) ]; echo $$?),1)
# $(error Not an executable file: ICURRY2JSON=$(ICURRY2JSON)$nPlease check your installation.)
# endif
ifeq ($(shell [ -d $(PYTHON_LIBRARY_PATH) ]; echo $$?),1)
$(error Not a directory: PYTHON_LIBRARY_PATH=$(PYTHON_LIBRARY_PATH).)
endif
ifeq ($(shell [ -e $(PYTHON_LIBRARY_PATH)/$(PYTHON_LIBRARY_NAME) ]; echo $$?),1)
$(error Python library not found at $(PYTHON_LIBRARY_PATH)/$(PYTHON_LIBRARY_NAME)$nPYTHON_LIBRARY_PATH=$(PYTHON_LIBRARY_PATH)$nPYTHON_LIBRARY_NAME=$(PYTHON_LIBRARY_NAME))
endif
# ifeq ($(shell [ -d $(BOOST_HOME) ]; echo $$?),1)
# $(error Not a directory: BOOST_HOME=$(BOOST_HOME). Please check your Boost installation.)
# endif
# ifeq ($(shell [ -d $(BOOST_INCLUDE_PATH) ]; echo $$?),1)
# $(error Not a directory: BOOST_INCLUDE_PATH=$(BOOST_INCLUDE_PATH). Please check your Boost installation.)
# endif
# ifeq ($(shell [ -d $(BOOST_LIBRARY_PATH) ]; echo $$?),1)
# $(error Not a directory: BOOST_LIBRARY_PATH=$(BOOST_LIBRARY_PATH). Please check your Boost installation.)
# endif
# ifeq ($(shell [ -e $(BOOST_LIBRARY_PATH)/lib$(BOOST_PYTHON_LIBRARY).so ]; echo $$?),1)
# $(error Boost.Python library not found at $(BOOST_LIBRARY_PATH)/lib$(BOOST_PYTHON_LIBRARY).so$nBOOST_LIBRARY_PATH=$(BOOST_LIBRARY_PATH)$nBOOST_PYTHON_LIBRARY=$(BOOST_PYTHON_LIBRARY))
# endif
endif