-
Notifications
You must be signed in to change notification settings - Fork 54
/
Makefile
executable file
·115 lines (92 loc) · 4.67 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
110
111
112
113
114
115
#####################################################################
#A scalable and high-performance platform for R.
#Copyright (C) [2013] Hewlett-Packard Development Company, L.P.
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2 of the License, or (at
#your option) any later version.
#This program is distributed in the hope that it will be useful, but
#WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#General Public License for more details. You should have received a
#copy of the GNU General Public License along with this program; if
#not, write to the Free Software Foundation, Inc., 59 Temple Place,
#Suite 330, Boston, MA 02111-1307 USA
#####################################################################
# Top level Makefile for Distributed R
## === Build targets
.PHONY: test docs manual tutorial faq
## === Build targets
install:
R CMD INSTALL platform/executor
R CMD INSTALL platform/master
install_algorithms:
R CMD INSTALL algorithms/HPdutility
R CMD INSTALL algorithms/HPdregression
R CMD INSTALL algorithms/HPdcluster
R CMD INSTALL algorithms/HPdclassifier
R CMD INSTALL algorithms/HPdgraph
R CMD INSTALL algorithms/HPdata
uninstall:
R CMD REMOVE distributedR
R CMD REMOVE Executor
R CMD REMOVE HPdregression
R CMD REMOVE HPdcluster
R CMD REMOVE HPdclassifier
R CMD REMOVE HPdgraph
R CMD REMOVE HPdata
R CMD REMOVE HPdutility
clean:
cd platform/master/src; make -f Makevars clean; cd ../../../
dist-clean:
cd platform/master/src; make -f Makevars clean-third-party; cd ../../../
## === Test targets
TEST_OUTPUT_FILES=$(PWD)/test_platform.out
test:
$(MAKE) test_platform
test_platform:
echo "library(distributedR); library(testthat); sink(paste(getwd(),'/test_platform.out',sep=''), type='output'); distributedR_start(); test_package('distributedR'); distributedR_shutdown()" | R --vanilla --slave --no-save
@printf "\n----- Test Report -----\n\n"
@cat $(PWD)/test_platform.out
test_clean:
rm -rf ${TEST_OUTPUT_FILES}
## === Targets to generate documentation
DOC_DIR = $(PWD)/doc
DOC_DIR_PLATFORM = $(DOC_DIR)/platform
DOC_DIR_ALGORITHMS = $(DOC_DIR)/algorithms
MAN_OUTPUT = $(PWD)/doc/platform/Distributed-R-Manual.pdf
MAN_DIR = $(PWD)/platform/master/man
MAN_FILES = $(MAN_DIR)/package.Rd $(MAN_DIR)/start.Rd $(MAN_DIR)/shutdown.Rd $(MAN_DIR)/status.Rd $(MAN_DIR)/darray.Rd $(MAN_DIR)/dframe.Rd $(MAN_DIR)/dlist.Rd $(MAN_DIR)/as.darray.Rd $(MAN_DIR)/as.dframe.Rd $(MAN_DIR)/is.darray.Rd $(MAN_DIR)/is.dframe.Rd $(MAN_DIR)/is.dlist.Rd $(MAN_DIR)/as.factor.dframe.Rd $(MAN_DIR)/factor.dframe.Rd $(MAN_DIR)/unfactor.dframe.Rd $(MAN_DIR)/levels.dframe.Rd $(MAN_DIR)/npartitions.Rd $(MAN_DIR)/partitionsize.Rd $(MAN_DIR)/getpartition.Rd $(MAN_DIR)/clone.Rd $(MAN_DIR)/foreach.Rd $(MAN_DIR)/splits.Rd $(MAN_DIR)/update.Rd
TUTORIAL_DIR = $(PWD)/platform/master/vignettes
TUTORIAL_FILE = Tutorial
TUTORIAL_DATA_FILE = Data
FAQ_FILE = FAQ
docs:
mkdir -p $(DOC_DIR_PLATFORM)
$(MAKE) manual tutorial faq
mkdir -p $(DOC_DIR_ALGORITHMS)
$(MAKE) algorithm_docs
manual:
-${R_HOME}/bin/R CMD Rd2pdf --no-preview --batch --force --title="Distributed R Manual" --output=$(MAN_OUTPUT) $(MAN_FILES)
#Tutorial requires Presto and R 'igraph' installed.
tutorial:
cd $(TUTORIAL_DIR); ${R_HOME}/bin/R CMD Sweave $(TUTORIAL_FILE).Rnw; \
pdflatex $(TUTORIAL_FILE).tex; \
rm $(TUTORIAL_FILE).out $(TUTORIAL_FILE).log $(TUTORIAL_FILE).aux $(TUTORIAL_FILE).tex $(TUTORIAL_DATA_FILE)?
mv $(TUTORIAL_DIR)/$(TUTORIAL_FILE).pdf $(DOC_DIR_PLATFORM)/Distributed-R-UserGuide.pdf
faq:
cd $(TUTORIAL_DIR); \
pdflatex $(FAQ_FILE).tex; \
rm $(FAQ_FILE).log $(FAQ_FILE).aux
mv $(TUTORIAL_DIR)/$(FAQ_FILE).pdf $(DOC_DIR_PLATFORM)/Distributed-R-FAQ.pdf
algorithm_docs:
mkdir -p $(DOC_DIR_ALGORITHMS)/HPdregression
R CMD Rd2pdf --no-preview --force --output=$(DOC_DIR_ALGORITHMS)/HPdregression/HPdregression-Manual.pdf $(PWD)/algorithms/HPdregression
mkdir -p $(DOC_DIR_ALGORITHMS)/HPdcluster
R CMD Rd2pdf --no-preview --force --output=$(DOC_DIR_ALGORITHMS)/HPdcluster/HPdcluster-Manual.pdf $(PWD)/algorithms/HPdcluster
mkdir -p $(DOC_DIR_ALGORITHMS)/HPdclassifier
R CMD Rd2pdf --no-preview --force --output=$(DOC_DIR_ALGORITHMS)/HPdclassifier/HPdclassifier-Manual.pdf $(PWD)/algorithms/HPdclassifier
mkdir -p $(DOC_DIR_ALGORITHMS)/HPdgraph
R CMD Rd2pdf --no-preview --force --output=$(DOC_DIR_ALGORITHMS)/HPdgraph/HPdgraph-Manual.pdf $(PWD)/algorithms/HPdgraph
mkdir -p $(DOC_DIR_ALGORITHMS)/HPdata
R CMD Rd2pdf --no-preview --force --output=$(DOC_DIR_ALGORITHMS)/HPdata/HPdata-Manual.pdf $(PWD)/algorithms/HPdata