forked from h2oai/h2o-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
109 lines (92 loc) · 3.27 KB
/
Makefile
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
109
#
# Standard developer directions:
#
# $ make
#
#
# Nightly build directions:
#
# Create ci/buildnumber.properties with the following entry:
# BUILD_NUMBER=n
#
# $ make
#
###########################################################################
# Figure out how to create PROJECT_VERSION variable.
###########################################################################
# 'ci' directory stands for Continuous Integration, which is where the
# version number stuff for a release is stored.
#
# ci/release.properties is a file that exists in git and is updated by
# hand on a per-branch basis. This file contains the variables
# BUILD_MAJOR_VERSION=x
# BUILD_MINOR_VERSION=y
# BUILD_INCREMENTAL_VERSION=z
#
# ci/buildnumber.properties is a file that gets created by jenkins.
# This file contains the variable
# BUILD_NUMBER=n
#
# Simply cloning a git repository won't get you a real build number.
# Only jenkins manages them.
include ci/release.properties
# Use buildnumber.properties if it exists. Otherwise, use 99999
BUILDNUMBER_PROPERTIES_FILE=$(wildcard ci/buildnumber.properties)
ifneq ($(BUILDNUMBER_PROPERTIES_FILE),)
include ci/buildnumber.properties
else
BUILD_NUMBER=99999
endif
PROJECT_VERSION ?= $(BUILD_MAJOR_VERSION).$(BUILD_MINOR_VERSION).$(BUILD_INCREMENTAL_VERSION).$(BUILD_NUMBER)
###########################################################################
default: nightly_build_stuff
nightly_build_stuff:
@echo PROJECT_VERSION is $(PROJECT_VERSION)
$(MAKE) clean PROJECT_VERSION=$(PROJECT_VERSION)
$(MAKE) build PROJECT_VERSION=$(PROJECT_VERSION)
$(MAKE) build_installer PROJECT_VERSION=$(PROJECT_VERSION)
build:
$(MAKE) -C R build PROJECT_VERSION=$(PROJECT_VERSION)
$(MAKE) build_h2o PROJECT_VERSION=$(PROJECT_VERSION)
$(MAKE) -C hadoop build PROJECT_VERSION=$(PROJECT_VERSION)
$(MAKE) -C launcher build PROJECT_VERSION=$(PROJECT_VERSION)
$(MAKE) package
build_h2o:
(export PROJECT_VERSION=$(PROJECT_VERSION); ./build.sh noclean doc)
package:
rm -fr target/h2o-$(PROJECT_VERSION)
mkdir target/h2o-$(PROJECT_VERSION)
cp -rp target/R target/h2o-$(PROJECT_VERSION)
cp -rp target/hadoop target/h2o-$(PROJECT_VERSION)
cp -p target/h2o.jar target/h2o-$(PROJECT_VERSION)
cp -p target/h2o-sources.jar target/h2o-$(PROJECT_VERSION)
cp -p packaging/README.txt target/h2o-$(PROJECT_VERSION)
sed "s/SUBST_PROJECT_VERSION/$(PROJECT_VERSION)/g" packaging/index.html > target/index.html
cp -p LICENSE.txt target/h2o-$(PROJECT_VERSION)
(cd target; zip -r h2o-$(PROJECT_VERSION).zip h2o-$(PROJECT_VERSION))
rm -fr target/h2o-$(PROJECT_VERSION)
rm -fr target/ci
cp -rp ci target
# Most people won't have the BitRock InstallBuilder software
# installed, which is OK. It will harmlessly do nothing for that
# case.
build_installer:
$(MAKE) -C installer build PROJECT_VERSION=$(PROJECT_VERSION)
test:
(export PROJECT_VERSION=$(PROJECT_VERSION); ./build.sh)
#
# Set appropriately for your data size to quickly try out H2O.
# For best results, the Java heap should be at least 4x data size.
# After starting H2O, point your browser to:
# http://localhost:54321
#
JAVA_HEAP_SIZE=-Xmx2g
run:
java $(JAVA_HEAP_SIZE) -jar target/h2o.jar
clean:
rm -fr target
./build.sh clean
$(MAKE) -C hadoop clean
$(MAKE) -C R clean
$(MAKE) -C launcher clean
$(MAKE) -C installer clean