Makefile 2.6 KB
Newer Older
Mikaël Salson's avatar
Mikaël Salson committed
1

Mathieu Giraud's avatar
Mathieu Giraud committed
2
VIDJIL_ALGO_SRC = algo/
3
VIDJIL_BROWSER_SRC = browser/
Mathieu Giraud's avatar
Mathieu Giraud committed
4 5
VIDJIL_SERVER_SRC = server/

6 7
TEE = python tools/tee.py -v

8 9 10 11 12
all:
	$(MAKE) germline
	$(MAKE) algo
	$(MAKE) demo

13 14 15
algo:
	$(MAKE) -C algo

16 17
test_browser: unit_browser functional_browser

18 19
test_server: unit_server

20
test_tools_if_python:
21
	@((python tools/check_python_version.py && $(MAKE) test_tools) || (python tools/check_python_version.py || echo "!!! Bad python version, we skip tools tests..."))
22

23
test_tools:
Mikaël Salson's avatar
Mikaël Salson committed
24
	$(MAKE) -C tools/tests
25

26
shouldvdj_generate:
27
	@echo
28
	rm -rf data/gen
29
	mkdir -p data/gen
30
	cd germline ; python generate-recombinations.py --random-deletions 8,4:3,1:5,3 --random-insertions 5,4 -e .01
31 32


33
### Browser tests
34

35
unit_browser:
Mikaël Salson's avatar
Mikaël Salson committed
36
	$(MAKE) -C browser/test unit
37 38

functional_browser:
Mikaël Salson's avatar
Mikaël Salson committed
39
	$(MAKE) -C browser/test functional
40 41

headless_browser:
Mikaël Salson's avatar
Mikaël Salson committed
42
	$(MAKE) -C browser/test headless
43

44
unit_server:
Mikaël Salson's avatar
Mikaël Salson committed
45
	$(MAKE) -C server/ unit
46

47 48
###

Mathieu Giraud's avatar
Mathieu Giraud committed
49 50 51
data:
	$(MAKE) -C algo/tests/data

52
demo germline browser server: %:
Mikaël Salson's avatar
Mikaël Salson committed
53
	$(MAKE) -C $@
Mikaël Salson's avatar
Mikaël Salson committed
54 55

cleanall: clean
Mathieu Giraud's avatar
Mathieu Giraud committed
56
	$(MAKE) -C algo/tests/data $^
Mikaël Salson's avatar
Mikaël Salson committed
57 58 59
	$(MAKE) -C germline $^
	$(MAKE) -C $(VIDJIL_ALGO_SRC) cleanall
	$(MAKE) -C server cleanall
Mikaël Salson's avatar
Mikaël Salson committed
60

Mathieu Giraud's avatar
Mathieu Giraud committed
61
.PHONY: all test should clean cleanall distrib data demo germline unit_coverage should_coverage coverage data germline browser server doc algo
Mikaël Salson's avatar
Mikaël Salson committed
62

63

Mikaël Salson's avatar
Mikaël Salson committed
64

65 66 67 68 69 70
# Browser
RELEASE_JS = $(VIDJIL_BROWSER_SRC)/js/release.js
RELEASE_BROWSER_ARCHIVE = vidjil-browser-$(RELEASE_TAG).tgz
DIST_BROWSER_DIR=vidjil-browser-$(RELEASE_TAG)
TEST_FILES_BROWSER= Makefile $(VIDJIL_BROWSER_SRC)/test/Makefile $(wildcard $(VIDJIL_BROWSER_SRC)/test/*.rb) $(wildcard $(VIDJIL_BROWSER_SRC)/test/QUnit/*)  $(wildcard $(VIDJIL_BROWSER_SRC)/test/QUnit/testFiles/*.js)
RELEASE_FILES_BROWSER=$(TEST_FILES_BROWSER) $(wildcard $(VIDJIL_BROWSER_SRC)/*.html) $(wildcard $(VIDJIL_BROWSER_SRC)/js/*.js) $(wildcard $(VIDJIL_BROWSER_SRC)/js/lib/*.js) $(wildcard $(VIDJIL_BROWSER_SRC)/css/*.css) 
Mikaël Salson's avatar
Mikaël Salson committed
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
release_browser:
	$(info ==== Browser Release $(RELEASE_TAG) ====)

	# Tag the release
	if test "$(RELEASE_TAG)" != "notag"; then \
		git tag -f release-$(RELEASE_TAG); \
		echo 'RELEASE_TAG = "$(RELEASE_TAG)"' > $(RELEASE_JS); \
	fi

	mkdir -p release 
	rm -rf release/$(RELEASE_BROWSER_ARCHIVE) release/$(DIST_BROWSER_DIR)
	mkdir -p release/$(DIST_BROWSER_DIR)
	for file in  $(RELEASE_FILES_BROWSER); do\
		dir=release/$(DIST_BROWSER_DIR)/`dirname "$$file"`;	\
		mkdir -p $$dir;	\
		cp "$$file" $$dir;	\
	done
	cd release && tar cvzf  $(RELEASE_BROWSER_ARCHIVE) $(DIST_BROWSER_DIR) \
	&& rm -rf $(DIST_BROWSER_DIR)

	# Untag the source
	rm -f $(RELEASE_JS) ; touch $(RELEASE_JS)

	# Check archive
	cd release && tar xvfz $(RELEASE_BROWSER_ARCHIVE)
Mikaël Salson's avatar
Mikaël Salson committed
98
	cd release/$(DIST_BROWSER_DIR) && $(MAKE) unit_browser
99 100


Mikaël Salson's avatar
Mikaël Salson committed
101