-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathMakefile.in
875 lines (773 loc) · 40 KB
/
Makefile.in
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
# Copyright 2007-2018 Zuse Institute Berlin
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ERLC = @ERLC@
ERL = @ERL@
DIALYZER = @ERLANG_ROOT_DIR@/bin/dialyzer
ERL_LIB_DIR = @ERLANG_LIB_DIR@
CD = cd
MAKE = make
PYTHON2=@PYTHON2@
PYTHON3=@PYTHON3@
PYTHON3_2TO3=@PYTHON3_2TO3@
VERSION=@PACKAGE_VERSION@
OTP_ERLANG_VERSION=1.6.1
COMMONS_CLI_VERSION=1.2
SESSIONKEY:=$(shell cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-z' | fold -w 32 | head -n 1)
.PHONY: all bench bench-ssl bench-ssl-strict bench-ssl-strict-bad compile test test-vts cpp cpp-clean cpp-test java java-test java-bench java-* datanucleus datanucleus-test ycsb coverity python python-compile python-clean python-test python-bench python-doc-html python-doc-pdf python3 python3-convert python3-compile python3-clean python3-test python3-bench ruby-test interop-test dist-clean clean erlang-clean tags tags-clean docs dialyzer dialyzer-col rrd-init install install-all install-erlang install-java install-docs install-java-doc install-python-doc-html install-python-doc-pdf install-ruby install-python install-python3 test-clean nifs %_SUITE
APP_NAME = @PACKAGE_TARNAME@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
bindir = @bindir@
sysconfdir = @sysconfdir@
localstatedir = @localstatedir@
# /bin
BINDIR = $(DESTDIR)@bindir@
# /sbin
SBINDIR = $(DESTDIR)@sbindir@
# /usr/include
INCLUDEDIR = $(DESTDIR)@includedir@
# /usr/lib[64]
LIBDIR = $(DESTDIR)@libdir@
# /etc/scalaris/
ETCDIR = $(DESTDIR)@sysconfdir@/scalaris
# /etc/init.d/
INITDIR = $(DESTDIR)@sysconfdir@/init.d
# /etc/conf.d
SYSTEMD_CONFDIR = $(DESTDIR)@sysconfdir@/conf.d
# /usr/lib/systemd/system
SYSTEMD_UNITDIR = $(DESTDIR)@SYSTEMD_UNITDIR@
# /lib/scalaris/
SCALARISDIR = $(DESTDIR)${prefix}/lib/scalaris
# /lib/scalaris/ebin
BEAMDIR = $(SCALARISDIR)/ebin
# /lib/scalaris/docroot
DOCROOTDIR=$(SCALARISDIR)/docroot
# /share/doc/scalaris
DOCDIR=$(DESTDIR)@docdir@
# /share/java
JAVADIR=$(DESTDIR)@datarootdir@/java
# /var/log/scalaris
LOGDIR=$(DESTDIR)@localstatedir@/log/scalaris
# /var/run
RUNDIR=$(DESTDIR)@localstatedir@/run
# /usr/lib/ruby/site_ruby/1.8
RUBYSITELIBDIR=$(DESTDIR)@RUBYSITELIBDIR@
# /usr/lib/python2.7/site-packages
PYTHON2SITELIBDIR=$(DESTDIR)@PYTHON2SITELIBDIR@
# /usr/lib/python3.1/site-packages
PYTHON3SITELIBDIR=$(DESTDIR)@PYTHON3SITELIBDIR@
# paths of source files for make doc
SOURCEPATHS_ERL=src/* src/*/* include/* test/* contrib/log4erl/src/* contrib/yaws/src/*
# paths to contrib ebins that will be added to erlangs code path when
# executing a test related make target
CONTRIB_EBIN_PATHS = `pwd`/contrib/yaws/ebin `pwd`/contrib/log4erl/ebin `pwd`/contrib/dotto/ebin
# libraries needed to build a plt suitable for the dialyzer target
# (only add them if they are available (via wildcard call which
# results in nothing when no match exists))
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/common_test-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/compiler-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/crypto-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/debugger-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/edoc-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/erlang_js-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/erts-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/et-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/gs-*/ebin)
# currently not compatible:
# DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/hanoidb-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/hipe-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/inets-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/kernel-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/mnesia-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/observer-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/os_mon-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/public_key-*/ebin/)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/runtime_tools-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/sasl-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/snmp-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/ssh-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/ssl-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/stdlib-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/syntax_tools-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/test_server-*/ebin/)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/toke-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/tools-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/webtool-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/wx-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard $(ERL_LIB_DIR)/xmerl-*/ebin)
DIALYZER_PLT_LIBS += $(wildcard contrib/log4erl/ebin)
DIALYZER_PLT_LIBS += $(wildcard contrib/yaws/ebin)
DIALYZER_PLT_LIBS += $(wildcard contrib/dotto/ebin)
DIALYZER_PLT_LIBS += $(wildcard @BITCASK_LIBS@/ebin)
#DIALYZER_PLT_LIBS=$(DIALYZER_PLT_LIBS) $(ERL_LIB_DIR)/gs-*/contribs/ebin $(ERL_LIB_DIR)/wx-*/examples/*
DIALYZER_FLAGS ?=
SCALARIS_CT_PREFIX ?= ct
SCALARIS_CT_NAME = $(SCALARIS_CT_PREFIX)@`hostname -s`
# for java-test, java-bench and datanucleus-test:
SCALARIS_UNITTEST_PORT ?= 14194
SCALARIS_UNITTEST_YAWS_PORT ?= 8000
SCALARIS_JTEST_NAME ?= jtest_boot
NIFS_SRC_CPP=$(wildcard src/nifs/*.cpp)
NIFS_SO=$(subst src/nifs,priv,$(NIFS_SRC_CPP:.cpp=.so))
all: Makefile nifs compile tags
#all: compile dialyzer java test docs
#cp priv/xbin/*beam bin/
compile: .Emakefile contrib/log4erl/src/log4erl_parser.erl contrib/log4erl/src/log4erl_lex.erl
@$(ERL) -pa contrib/yaws -pa ebin -noinput +B -eval 'case make:all() of up_to_date -> halt(0); error -> halt(1) end.'
.Emakefile: Emakefile
$(MAKE) erlang-clean
touch $@
contrib/log4erl/src/log4erl_parser.erl: contrib/log4erl/src/log4erl_parser.yrl
cd contrib/log4erl/src && $(ERLC) log4erl_parser.yrl
contrib/log4erl/src/log4erl_lex.erl: contrib/log4erl/src/log4erl_lex.xrl
cd contrib/log4erl/src && $(ERL) -noinput -noshell -s leex file log4erl_lex.xrl -s init stop
test-all: all_TESTS java-test python-test ruby-test interop-test datanucleus-test
test: default_TESTS
test-skipped: skipped_TESTS
test-repeated: repeated_TESTS
test-ssl: ssl_TESTS
SUITES := $(patsubst test/%.erl,%,$(wildcard test/*_SUITE.erl))
${SUITES}: compile
# use non standard ports to run a single SUITE so it can be executed
# in parallel to a full test suite run or a locally running default
# scalaris session.
SCALARIS_UNITTEST_PORT=14193 SCALARIS_UNITTEST_YAWS_PORT=7999 @ERL@ -noshell -noinput @ERLANG_ERLANGJS_FLAGS@ @ERLANG_HANOIDB_FLAGS@ @ERLANG_TOKE_FLAGS@ @ERLANG_BITCASK_FLAGS@ -pa `pwd`/ebin `pwd`/test $(CONTRIB_EBIN_PATHS) -eval "runner:run_suite(\"test/$@\"), halt(0)" | tee ct_$@.log ; \
! grep -E "TEST COMPLETE, [0-9]+ ok, [1-9]+ failed" ct_$@.log
# define targets for single test cases of the form <test-suite>:<test-case>:
define TEST_CASE_TARGET
# test group
$(1)\:%_GROUP: compile
# use non standard ports to run a single SUITE's test case so it can be executed
# in parallel to a full test suite run or a locally running default
# scalaris session.
SCALARIS_UNITTEST_PORT=14193 SCALARIS_UNITTEST_YAWS_PORT=7999 @ERL@ -noshell -noinput -pa `pwd`/ebin `pwd`/test $(CONTRIB_EBIN_PATHS) -eval "runner:run_suite_group(\"$(1)\", \"$$*\"), halt(0)" | tee ct_$(1).$$*_GROUP.log ; \
! grep -E "TEST COMPLETE, [0-9]+ ok, [1-9]+ failed" ct_$(1).$$*_GROUP.log
# single test case
$(1)\:%: compile
SCALARIS_UNITTEST_PORT=14193 SCALARIS_UNITTEST_YAWS_PORT=7999 @ERL@ -noshell -noinput -pa `pwd`/ebin `pwd`/test $(CONTRIB_EBIN_PATHS) -eval "runner:run_suite_case(\"$(1)\", \"$$*\"), halt(0)" | tee ct_$(1).$$*.log ; \
! grep -E "TEST COMPLETE, [0-9]+ ok, [1-9]+ failed" ct_$(1).$$*.log
endef
$(foreach SUITE,$(SUITES),$(eval $(call TEST_CASE_TARGET,$(SUITE))))
%_SUITE-with-cover: compile
@RUN_TEST@ $(UNITTESTARGS) -name $(SCALARIS_CT_NAME)_$@ @ERLANG_ERLANGJS_FLAGS@ @ERLANG_HANOIDB_FLAGS@ @ERLANG_TOKE_FLAGS@ @ERLANG_BITCASK_FLAGS@ -pa `pwd`/ebin `pwd`/test `pwd`-$(CONTRIB_EBIN_PATHS) -suite $*_SUITE -cover test/scalaris.coverspec -ct_hooks scalaris_cth -noshell | tee ct_$@.log ; \
! grep -E "TEST COMPLETE, [0-9]+ ok, [1-9]+ failed" ct_$@.log
%_TESTS: compile
@ERL@ -noshell -noinput @ERLANG_ERLANGJS_FLAGS@ @ERLANG_HANOIDB_FLAGS@ @ERLANG_TOKE_FLAGS@ @ERLANG_BITCASK_FLAGS@ -pa `pwd`/ebin `pwd`/test $(CONTRIB_EBIN_PATHS) -eval "runner:run_spec(\"test/$@.cfg\"), halt(0)" | tee ct_$@.log ; \
! grep -E "TEST COMPLETE, [0-9]+ ok, [1-9]+ failed" ct_$@.log
test-vts: compile
@RUN_TEST@ @ERLANG_ERLANGJS_FLAGS@ @ERLANG_HANOIDB_FLAGS@ @ERLANG_TOKE_FLAGS@ @ERLANG_BITCASK_FLAGS@ -pa `pwd`/ebin `pwd`/test $(CONTRIB_EBIN_PATHS) -dir . -cover test/scalaris.coverspec -vts -browser @BROWSER@ -ct_hooks scalaris_cth
test-clean:
-rm -rf ct_run.*@* ct.log ct-skipped.log ct_*_TESTS.log ct_*_SUITE.log ct_*_SUITE.*.log index.html all_runs.html variables-*@* ct_log_cache ct_default.css \
result_increment_10_1000.txt result_increment_1_10000.txt \
result_read_10_10000.txt result_read_1_100000.txt \
data/ct*@*
bench: compile
./bin/setup-ring.sh --ring-size 4 --session-key $(SESSIONKEY) start
./bin/jsonclient -p $(SCALARIS_UNITTEST_YAWS_PORT) benchmark
./bin/setup-ring.sh --ring-size 4 --session-key $(SESSIONKEY) stop
bench-ssl: compile
./bin/setup-ring.sh --ring-size 4 --session-key $(SESSIONKEY) --ssl start
./bin/jsonclient -s -p $(SCALARIS_UNITTEST_YAWS_PORT) benchmark
./bin/setup-ring.sh --ring-size 4 --session-key $(SESSIONKEY) --ssl stop
bench-ssl-strict: compile
./bin/setup-ring.sh --ring-size 4 --session-key $(SESSIONKEY) --ssl-strict start
./bin/jsonclient -s -p $(SCALARIS_UNITTEST_YAWS_PORT) benchmark
./bin/setup-ring.sh --ring-size 4 --session-key $(SESSIONKEY) --ssl-strict stop
bench-ssl-strict-bad: compile
( ./bin/setup-ring-for-benchmarks.sh --ssl-strict --bad-nodes 2 --ring-size 4 --node-prefix ebench_node start && \
echo "running bench:increment(10, 500)..." && \
$(ERL) -setcookie "chocolate chip cookie" -name bench_ctl -pa ebin/ -noinput -eval "rpc:call('ebench_node1@`hostname -f`', bench, increment, [10, 500]), halt(0)." && \
echo "running bench:quorum_read(10, 5000)..." && \
$(ERL) -setcookie "chocolate chip cookie" -name bench_ctl -pa ebin/ -noinput -eval "rpc:call('ebench_node1@`hostname -f`', bench, quorum_read, [10, 5000]), halt(0)." ) ; \
FAILED=$$? ; \
./bin/setup-ring-for-benchmarks.sh --ssl-strict --bad-nodes 2 --ring-size 4 --node-prefix ebench_node stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 log/ebench_*@"`hostname -f`"/* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
cpp:
(cd cpp-api && make)
cpp-clean:
(cd cpp-api && make clean)
cpp-test: compile cpp
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-n "$(SCALARIS_JTEST_NAME)" -m -t first start ; \
( ./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" dbg-check-ring 1 30 && \
( cd cpp-api && make cpp-test ) ) ; \
FAILED=$$? ; \
./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 "log/$(SCALARIS_JTEST_NAME)@`hostname -f`/"* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
java:
ant -buildfile java-api/build.xml jar tools.test.compile scalaris.test.compile
java-test: compile java
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-c "chocolate chip cookie" \
-n "$(SCALARIS_JTEST_NAME)" -m -t first start ; \
( ./bin/scalarisctl -c "chocolate chip cookie" -n "$(SCALARIS_JTEST_NAME)" dbg-check-ring 1 30 && \
ant -Dscalaris.node="$(SCALARIS_JTEST_NAME)" -buildfile java-api/build.xml test ) ; \
FAILED=$$? ; \
./bin/scalarisctl -c "chocolate chip cookie" -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 "log/$(SCALARIS_JTEST_NAME)@`hostname -f`/"* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
java-bench: compile java
( ./bin/setup-ring-for-benchmarks.sh --ring-size 4 --node-prefix jbench_node start && \
SCALARIS_JAPI_NODE="jbench_node1 jbench_node2 jbench_node3 jbench_node4" ./java-api/scalaris --noconfig -b $(SCALARIS_BENCHMARKS) ) ; \
FAILED=$$? ; \
./bin/setup-ring-for-benchmarks.sh --ring-size 4 --node-prefix jbench_node stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 log/jbench_*@"`hostname -f`"/* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
java-%:
ant -buildfile java-api/build.xml $*
datanucleus:
mvn -DskipGit -f java-api/pom.xml clean install
mvn -DskipGit -f contrib/datanucleus/scalaris-datanucleus-store/pom.xml clean install
mvn -f contrib/datanucleus/scalaris-datanucleus-store-test/pom.xml test -DskipTests
datanucleus-test: compile datanucleus
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-c "chocolate chip cookie" \
-n "$(SCALARIS_JTEST_NAME)" -m -t first start ; \
( ./bin/scalarisctl -c "chocolate chip cookie" -n "$(SCALARIS_JTEST_NAME)" dbg-check-ring 1 30 && \
mvn -Dscalaris.node="$(SCALARIS_JTEST_NAME)" -f contrib/datanucleus/scalaris-datanucleus-store-test/pom.xml test ) ; \
FAILED=$$? ; \
./bin/scalarisctl -c "chocolate chip cookie" -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 "log/$(SCALARIS_JTEST_NAME)@`hostname -f`/"* ; \
echo "####################" ; \
echo "Java messages (last 150 per log file):" ; \
echo "####################" ; \
tail -n 150 "contrib/datanucleus/scalaris-datanucleus-store-test/target/surefire-reports/"*.txt ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
ycsb:
mvn -f contrib/ycsb/pom.xml clean install
coverity: java datanucleus cpp
mvn -f contrib/ycsb/scalaris/pom.xml clean install
python: python-compile
python-compile:
$(PYTHON2) -mcompileall python-api
$(PYTHON2) -O -mcompileall python-api
python-clean:
rm -f python-api/*.pyc
rm -f python-api/*.pyo
python-test: compile python
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-n "$(SCALARIS_JTEST_NAME)" -m -t first start ; \
( ./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" dbg-check-ring 1 30 && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" $(PYTHON2) python-api/scalaris_test.py -v ) ; \
FAILED=$$? ; \
./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 "log/$(SCALARIS_JTEST_NAME)@`hostname -f`/"* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
python-bench: compile python
( ./bin/setup-ring-for-benchmarks.sh --ring-size 4 start --node-prefix pbench_node && \
SCALARIS_JSON_URLS="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT) http://localhost:$$(($(SCALARIS_UNITTEST_YAWS_PORT)+1)) http://localhost:$$(($(SCALARIS_UNITTEST_YAWS_PORT)+2)) http://localhost:$$(($(SCALARIS_UNITTEST_YAWS_PORT)+3))" $(PYTHON2) python-api/scalaris_bench.py $(SCALARIS_BENCHMARKS) ) ; \
FAILED=$$? ; \
./bin/setup-ring-for-benchmarks.sh --ring-size 4 --node-prefix pbench_node stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 log/pbench_*@"`hostname -f`"/* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
python-doc-html:
cd python-api ; epydoc --config=epydoc.html.cfg ; FAILED=$$? ; cd .. ; \
if [ $$FAILED -ne 0 ]; then false ; else true ; fi
python-doc-pdf:
cd python-api ; epydoc --config=epydoc.pdf.cfg ; FAILED=$$? ; cd .. ; \
if [ $$FAILED -ne 0 ]; then false ; else true ; fi
python3: @ENABLEPYTHON3@
python3-not-found:
@echo "cannot create the Python3 API - python 3.x or 2to3 not found"
@false
python3-convert: python3-clean
if [ ! -d python3-api ]; then \
mkdir -p python3-api ; \
fi
cp python-api/*.py python3-api/
cd python3-api && $(PYTHON3_2TO3) -f all -f buffer -w -n . >/dev/null
python3-compile: python3-convert
$(PYTHON3) -mcompileall python3-api
$(PYTHON3) -O -mcompileall python3-api
python3-clean:
if [ -d python3-api ]; then \
rm -f python3-api/*.py ; \
rm -f python3-api/*.pyc ; \
rm -f python3-api/*.pyo ; \
if [ -d python3-api/__pycache__ ]; then \
rm -f python3-api/__pycache__/*.py ; \
rm -f python3-api/__pycache__/*.pyc ; \
rm -f python3-api/__pycache__/*.pyo ; \
rmdir --ignore-fail-on-non-empty python3-api/__pycache__ ; \
fi ; \
rmdir --ignore-fail-on-non-empty python3-api/ ; \
fi
python3-test: compile python3
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-n "$(SCALARIS_JTEST_NAME)" -m -t first start ; \
( ./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" dbg-check-ring 1 30 && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" $(PYTHON3) python3-api/scalaris_test.py -v ) ; \
FAILED=$$? ; \
./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 "log/$(SCALARIS_JTEST_NAME)@`hostname -f`/"* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
python3-bench: compile python3
( ./bin/setup-ring-for-benchmarks.sh --ring-size 4 --node-prefix p3bench_node start && \
SCALARIS_JSON_URLS="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT) http://localhost:$$(($(SCALARIS_UNITTEST_YAWS_PORT)+1)) http://localhost:$$(($(SCALARIS_UNITTEST_YAWS_PORT)+2)) http://localhost:$$(($(SCALARIS_UNITTEST_YAWS_PORT)+3))" $(PYTHON3) python3-api/scalaris_bench.py $(SCALARIS_BENCHMARKS) ) ; \
FAILED=$$? ; \
./bin/setup-ring-for-benchmarks.sh --ring-size 4 --node-prefix p3bench_node stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 log/p3bench_*@"`hostname -f`"/* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
ruby-test: compile
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-n "$(SCALARIS_JTEST_NAME)" -m -t first start ; \
( ./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" dbg-check-ring 1 30 && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" ruby-api/scalaris_test.rb -v ) ; \
FAILED=$$? ; \
./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 "log/$(SCALARIS_JTEST_NAME)@`hostname -f`/"* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
interop-test: compile java java-scalaris.test.compile python
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-c "chocolate chip cookie" \
-n "$(SCALARIS_JTEST_NAME)" -m -t first start ; \
( ./bin/scalarisctl -c "chocolate chip cookie" -n "$(SCALARIS_JTEST_NAME)" dbg-check-ring 1 30 && \
java -cp "java-api/scalaris.jar:java-api/lib/jakarta-commons-cli-1.2.jar:java-api/lib/OtpErlang-$(OTP_ERLANG_VERSION).jar:java-api/classes" -Dscalaris.node="$(SCALARIS_JTEST_NAME)" de.zib.scalaris.InterOpTest -write interop_test > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.java_write.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.java_write.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" $(PYTHON2) python-api/scalaris_interop_test.py write interop_test > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_write.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_write.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" ruby-api/scalaris_interop_test.rb write interop_test > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.ruby_write.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.ruby_write.stderr.log && \
java -cp "java-api/scalaris.jar:java-api/lib/jakarta-commons-cli-1.2.jar:java-api/lib/OtpErlang-$(OTP_ERLANG_VERSION).jar:java-api/classes" -Dscalaris.node="$(SCALARIS_JTEST_NAME)" de.zib.scalaris.InterOpTest -read interop_test java > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.java_read_java.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.java_read_java.stderr.log && \
java -cp "java-api/scalaris.jar:java-api/lib/jakarta-commons-cli-1.2.jar:java-api/lib/OtpErlang-$(OTP_ERLANG_VERSION).jar:java-api/classes" -Dscalaris.node="$(SCALARIS_JTEST_NAME)" de.zib.scalaris.InterOpTest -read interop_test json_python > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.java_read_python.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.java_read_python.stderr.log && \
java -cp "java-api/scalaris.jar:java-api/lib/jakarta-commons-cli-1.2.jar:java-api/lib/OtpErlang-$(OTP_ERLANG_VERSION).jar:java-api/classes" -Dscalaris.node="$(SCALARIS_JTEST_NAME)" de.zib.scalaris.InterOpTest -read interop_test json_ruby > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.java_read_ruby.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.java_read_ruby.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" $(PYTHON2) python-api/scalaris_interop_test.py read interop_test java > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_read_java.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_read_java.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" $(PYTHON2) python-api/scalaris_interop_test.py read interop_test json_python > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_read_python.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_read_python.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" $(PYTHON2) python-api/scalaris_interop_test.py read interop_test json_ruby > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_read_ruby.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_read_ruby.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" ruby-api/scalaris_interop_test.rb read interop_test java > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.ruby_read_java.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.ruby_read_java.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" ruby-api/scalaris_interop_test.rb read interop_test json_python > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.ruby_read_python.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.ruby_read_python.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" ruby-api/scalaris_interop_test.rb read interop_test json_ruby > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.ruby_read_ruby.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.ruby_read_ruby.stderr.log ) ; \
FAILED=$$? ; \
./bin/scalarisctl -c "chocolate chip cookie" -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
cat "log/$(SCALARIS_JTEST_NAME)@`hostname -f`/"interop.*write*.stderr.log ; \
cat "log/$(SCALARIS_JTEST_NAME)@`hostname -f`/"interop.*read*.stderr.log ; \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 "log/$(SCALARIS_JTEST_NAME)@`hostname -f`/"{*.auth,report.log,scalaris_error_logger,scalaris_log4erl.txt} ; \
echo "####################" ; \
false ; \
else \
echo "all tests successful" ; \
true ; \
fi
# only test whether python2 and python3 read/write the same values - the rest is checked by interop-test
interop3-test: interop-test python3
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-n "$(SCALARIS_JTEST_NAME)" -m -t first start ; \
( ./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" dbg-check-ring 1 30 && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" $(PYTHON2) python-api/scalaris_interop_test.py write interop_test > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_write.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_write.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" $(PYTHON3) python3-api/scalaris_interop_test.py write interop_test3 > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python3_write.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python3_write.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" $(PYTHON2) python-api/scalaris_interop_test.py read interop_test json_python > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_read_python.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_read_python.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" $(PYTHON2) python-api/scalaris_interop_test.py read interop_test3 json_python > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_read_python3.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python_read_python3.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" $(PYTHON3) python3-api/scalaris_interop_test.py read interop_test json_python > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python3_read_python.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python3_read_python.stderr.log && \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" $(PYTHON3) python3-api/scalaris_interop_test.py read interop_test3 json_python > log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python3_read_python3.log 2> log/$(SCALARIS_JTEST_NAME)@`hostname -f`/interop.python3_read_python3.stderr.log ) ; \
FAILED=$$? ; \
./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
cat "log/$(SCALARIS_JTEST_NAME)@`hostname -f`/"interop.*write*.stderr.log ; \
cat "log/$(SCALARIS_JTEST_NAME)@`hostname -f`/"interop.*read*.stderr.log ; \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 "log/$(SCALARIS_JTEST_NAME)@`hostname -f`/"{*.auth,report.log,scalaris_error_logger,scalaris_log4erl.txt} ; \
echo "####################" ; \
false ; \
else \
echo "all tests successful" ; \
true ; \
fi
# delete all generated files (including test results and logs)
dist-clean: clean test-clean log-clean
log-clean:
-rm -rf log/*
# delete all generated files except test results and logs
clean: erlang-clean nifs-clean tags-clean cpp-clean java-clean python-clean python3-clean
# delete all files related to our erlang sources
erlang-clean:
-rm -f .make-doc
-rm -f bin/*.beam
-rm -f ebin/*.beam
-rm -f src/*.beam
-rm -f src/comm_layer/*.beam
-rm -f contrib/yaws/ebin/*.beam
-rm -f contrib/log4erl/ebin/*.beam
-rm -f contrib/log4erl/src/log4erl_lex.erl
-rm -f contrib/log4erl/src/log4erl_parser.erl
-rm -f contrib/dotto/ebin/*
-rm -f test/*.beam
-rm -f doc/*.html
-rm -f doc/*.css
-rm -rf doc/edoc-info
-rm -f docroot/graphs/*.png
-rm -f TAGS TAGS.contrib
tags-clean:
-rm -f TAGS TAGS.root TAGS.contrib
tags: TAGS.root TAGS.contrib
@$(ERL) -noinput -noshell -eval 'tags:subdirs(["src", "include", "test"]), halt(0).' ; true
@cat TAGS.contrib TAGS.root >> TAGS ; true
TAGS.contrib:
@echo "making TAGS.contrib"
@$(ERL) -noinput -noshell -eval 'tags:subdir("contrib", [{outfile, "TAGS.contrib"}]), halt(0).' ; true
TAGS.root:
@echo "making TAGS.root"
@$(ERL) -noinput -noshell -eval 'tags:root([{outfile, "TAGS.root"}]), halt(0).' ; true
doc: .make-doc
.make-doc: $(SOURCEPATHS_ERL)
$(ERL) -noshell -run edoc_run application "'$(APP_NAME)'" \
'"."' '[{def, {vsn, "$(VERSION)"}}, no_packages, {preprocess, true}, {includes, ["include", "contrib/yaws/include", "contrib/log4erl/include"]}, {sort_functions, false}, {pretty_printer, erl_pp}, {macros, [@EDOCMACROS@]}]'
@touch .make-doc
docs: doc java-doc
dialyzer: compile
$(DIALYZER) @DIALYZER_FLAGS@ $(DIALYZER_FLAGS) -Wunmatched_returns -Wunknown -I include/ -I contrib/yaws/include/ -I contrib/log4erl/include/ --src -c src src/*/ src/*/*/ test --no_native --statistics
dialyzer-col:
$(MAKE) dialyzer | sed -f contrib/dialyzer-col.sed
plt: compile
$(DIALYZER) --plt_info > /dev/null ; \
EXISTSFAILED=$$? ; \
$(DIALYZER) --check_plt > /dev/null ; \
CHECKFAILED=$$? ; \
if [ $$EXISTSFAILED -ne 0 ]; then \
echo "building plt" ; \
$(DIALYZER) --build_plt $(DIALYZER_PLT_LIBS) ; \
elif [ $$CHECKFAILED -ne 0 ]; then \
echo "rebuilding outdated plt" ; \
$(DIALYZER) --build_plt $(DIALYZER_PLT_LIBS) ; \
else \
echo "adding Scalaris modules to plt" ; \
$(DIALYZER) --add_to_plt $(DIALYZER_PLT_LIBS) ; \
fi
rrd-init:
@echo This target is deprecated
nifs: $(NIFS_SO)
nifs-clean:
-rm -f $(NIFS_SO)
priv/%.so: src/nifs/%.cpp Makefile
@CXX@ @NIFFLAGS@ -I@ERLANG_ROOT_DIR@/erts-@ERLANG_LIB_VER_erts@/include @CXXFLAGS@ -fPIC -o $@ $<
install-doc: doc
install -d $(DOCDIR)
install -m 644 -t $(DOCDIR) \
AUTHORS README.md LICENSE ChangeLog
install -m 644 user-dev-guide/main.pdf $(DOCDIR)/user-dev-guide.pdf
install -d $(DOCDIR)/erlang
install -m 644 -t $(DOCDIR)/erlang \
doc/*.html \
doc/*.png
install -d $(DOCROOTDIR)
ln -sf @docdir@/erlang $(DOCROOTDIR)/doc
install-java-doc: java-doc
for dir in `find java-api/doc -type d`; do \
install -d "$(DOCDIR)/java-api$${dir#java-api/doc}" ; \
for file in `find "$$dir" -maxdepth 1 -type f`; do \
install -m 644 -t "$(DOCDIR)/java-api$${dir#java-api/doc}" "$${file}" ; \
done ; \
done
install-python-doc-html: python-doc-html
install -d $(DOCDIR)/python-api
install -d $(DOCDIR)/python-api/html
install -m 644 -t $(DOCDIR)/python-api/html \
python-api/doc/html/*
install-python-doc-pdf: python-doc-pdf
install -d $(DOCDIR)/python-api
install -d $(DOCDIR)/python-api/pdf
install -m 644 -t $(DOCDIR)/python-api/pdf \
python-api/doc/pdf/*.pdf
install-docs: install-doc install-java-doc
contrib/init.d/scalaris-first-monitor: contrib/init.d/scalaris-monitor
sed -e 's|initd.conf|initd-first.conf|g' \
-e 's|Provides: scalaris-monitor|Provides: scalaris-first-monitor|g' \
$${srcdir}$< > $@
install-java: java contrib/init.d/scalaris-first-monitor
install -d $(JAVADIR)/scalaris
install -d $(JAVADIR)/scalaris/lib
install -m 644 -t $(JAVADIR)/scalaris \
java-api/scalaris.jar
install -m 644 -t $(JAVADIR)/scalaris/lib \
java-api/lib/OtpErlang-$(OTP_ERLANG_VERSION).jar
install -m 644 -t $(JAVADIR)/scalaris/lib \
java-api/lib/jakarta-commons-cli-$(COMMONS_CLI_VERSION).jar
install -d $(ETCDIR)
install -m 644 java-api/scalaris-java.conf \
$(ETCDIR)/scalaris-java.conf
install -m 644 -t $(ETCDIR) \
java-api/scalaris-java.conf.sample
install -m 644 -t $(ETCDIR) \
java-api/scalaris.properties
install -d $(BINDIR)
install -m 755 -t $(BINDIR) \
java-api/scalaris
install -d $(INITDIR)
install -m 744 -t $(INITDIR) \
contrib/init.d/scalaris-monitor \
contrib/init.d/scalaris-first-monitor
contrib/init.d/scalaris-first: contrib/init.d/scalaris
sed -e 's|initd.conf|initd-first.conf|g' \
-e 's|Provides: scalaris|Provides: scalaris-first|g' \
$${srcdir}$< > $@
install-initd: contrib/init.d/scalaris-first
install -d $(ETCDIR)
install -m 644 -t $(ETCDIR) \
contrib/init.d/initd.conf \
contrib/init.d/initd-first.conf
install -d $(INITDIR)
install -m 744 -t $(INITDIR) \
contrib/init.d/scalaris \
contrib/init.d/scalaris-first
install -d $(SBINDIR)
ln -sf @sysconfdir@/init.d/scalaris $(SBINDIR)/rcscalaris
contrib/systemd/scalaris.service: contrib/systemd/scalaris.service.in Makefile
sed -e 's|@bindir[@]|$(bindir)|g' \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|Description=Scalaris node|Description=Scalaris management server and first node|g' \
$${srcdir}$@.in > $@
contrib/systemd/scalaris-first.service: contrib/systemd/scalaris.service
sed -e 's|conf.d/scalaris|conf.d/scalaris-first|g' \
$${srcdir}$< > $@
install-systemd: contrib/systemd/scalaris.service contrib/systemd/scalaris-first.service
install -d $(SYSTEMD_CONFDIR)
install -m 644 contrib/systemd/scalaris.conf \
$(SYSTEMD_CONFDIR)/scalaris
install -m 644 contrib/systemd/scalaris-first.conf \
$(SYSTEMD_CONFDIR)/scalaris-first
install -d $(SYSTEMD_UNITDIR)
install -m 644 -t $(SYSTEMD_UNITDIR) \
contrib/systemd/scalaris.service \
contrib/systemd/scalaris-first.service
install-erlang: compile @INSTALL_INIT@
install -d $(BEAMDIR)
install -m 644 -t $(BEAMDIR) \
ebin/*.beam
install -d $(ETCDIR)
install -m 644 -t $(ETCDIR) \
bin/scalarisctl.conf \
bin/scalaris.cfg \
bin/scalaris.local.cfg.example
if [ -f bin/scalaris.local.cfg ]; then \
install -m 644 -t $(ETCDIR) \
bin/scalaris.local.cfg; \
else \
touch $(ETCDIR)/scalaris.local.cfg ; \
fi
install -d $(DOCROOTDIR) \
$(DOCROOTDIR)/api \
$(DOCROOTDIR)/flot \
$(DOCROOTDIR)/icons \
$(DOCROOTDIR)/images/default \
$(DOCROOTDIR)/images/default/dd \
$(DOCROOTDIR)/images/default/panel \
$(DOCROOTDIR)/images/default/tree \
$(DOCROOTDIR)/images/default/grid \
$(DOCROOTDIR)/tablesort/blue
install -m 644 -t $(DOCROOTDIR) \
docroot/*.yaws \
docroot/*.css \
docroot/*.js \
docroot/*.gif \
docroot/*.ico
install -m 644 -t $(DOCROOTDIR)/api \
docroot/api/*
install -m 644 -t $(DOCROOTDIR)/flot \
docroot/flot/*
install -m 644 -t $(DOCROOTDIR)/icons \
docroot/icons/*.gif
install -m 644 -t $(DOCROOTDIR)/images/default/dd \
docroot/images/default/dd/*.gif
install -m 644 -t $(DOCROOTDIR)/images/default/panel \
docroot/images/default/panel/*.gif
install -m 644 -t $(DOCROOTDIR)/images/default/panel \
docroot/images/default/panel/*.png
install -m 644 -t $(DOCROOTDIR)/images/default/tree \
docroot/images/default/tree/*.gif
install -m 644 -t $(DOCROOTDIR)/images/default/grid \
docroot/images/default/grid/*.gif
install -m 644 -t $(DOCROOTDIR)/images/default/grid \
docroot/images/default/grid/*.png
install -m 644 -t $(DOCROOTDIR)/tablesort \
docroot/tablesort/*.js
install -m 644 -t $(DOCROOTDIR)/tablesort/blue \
docroot/tablesort/blue/*.gif
install -m 644 -t $(DOCROOTDIR)/tablesort/blue \
docroot/tablesort/blue/*.css
install -d $(SCALARISDIR)/contrib/yaws/ebin
install -d $(SCALARISDIR)/contrib/yaws/include
install -m 644 -t $(SCALARISDIR)/contrib/yaws/ebin \
contrib/yaws/ebin/*.beam
install -m 644 -t $(SCALARISDIR)/contrib/yaws/include \
contrib/yaws/include/yaws_api.hrl
install -d $(SCALARISDIR)/contrib/log4erl/ebin
install -m 644 -t $(SCALARISDIR)/contrib/log4erl/ebin \
contrib/log4erl/ebin/*.beam
install -d $(LOGDIR)
install -d $(RUNDIR)
install -d $(BINDIR)
install -m 755 -t $(BINDIR) \
bin/scalarisctl
install-cpp: cpp
install -d $(INCLUDEDIR)/scalaris
for dir in `find cpp-api/include -type d`; do \
install -d "$(INCLUDEDIR)/scalaris$${dir#cpp-api/include}" ; \
for file in `find "$$dir" -maxdepth 1 -type f`; do \
install -m 644 -t "$(INCLUDEDIR)/scalaris$${dir#cpp-api/include}" "$${file}" ; \
done ; \
done
install -d $(LIBDIR)
install -m 644 -t $(LIBDIR) cpp-api/libscalaris.a
install-ruby:
install -d $(RUBYSITELIBDIR)
install -m 644 -t $(RUBYSITELIBDIR) ruby-api/scalaris.rb
install -m 755 -t $(RUBYSITELIBDIR) ruby-api/scalaris_client.rb
install -d $(BINDIR)
install -m 755 ruby-api/scalaris $(BINDIR)/scalaris-ruby
install-python: python
install -d $(PYTHON2SITELIBDIR)
install -m 644 -p -t $(PYTHON2SITELIBDIR) python-api/scalaris.py*
install -m 644 -p -t $(PYTHON2SITELIBDIR) python-api/scalaris_bench.py*
install -m 755 -p -t $(PYTHON2SITELIBDIR) python-api/scalaris_client.py*
install -d $(BINDIR)
install -m 755 -p python-api/scalaris $(BINDIR)/scalaris-python
install-python3: python3
install -d $(PYTHON3SITELIBDIR)
install -m 644 -p -t $(PYTHON3SITELIBDIR) python3-api/scalaris.py*
install -m 644 -p -t $(PYTHON3SITELIBDIR) python3-api/scalaris_bench.py*
install -m 755 -p -t $(PYTHON3SITELIBDIR) python3-api/scalaris_client.py*
if [ -d python3-api/__pycache__ ]; then \
install -d $(PYTHON3SITELIBDIR)/__pycache__ ; \
install -m 644 -p -t $(PYTHON3SITELIBDIR)/__pycache__ \
python3-api/__pycache__/scalaris.*.py*; \
install -m 644 -p -t $(PYTHON3SITELIBDIR)/__pycache__ \
python3-api/__pycache__/scalaris_bench.*.py*; \
fi
install -d $(BINDIR)
install -m 755 -p python3-api/scalaris $(BINDIR)/scalaris-python3
install: install-erlang
install-all: install-erlang install-java install-docs @ENABLERUBYINSTALL@ @ENABLEPYTHON2INSTALL@ @ENABLEPYTHON3INSTALL@
Makefile: Makefile.in
@echo
@echo "Makefile is outdated. Please run './configure'."
@if [ -f ./config.status ]; then \
if [ "" != "`./config.status --config`" ]; then \
echo "For the parameters you used last time you may call"; \
echo "'./configure `./config.status --config|sed -e "s/'//g"`'."; \
fi fi
@echo
@exit 1