-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
46 lines (35 loc) · 1.13 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
PHP = php
PLESSC = $(PHP) vendor/mishal-iless/bin/iless
JLESSC = $(shell which lessc)
CODECEPT_VENDOR = $(shell which composer/bin/codecept)
CODECEPT = $(shell which codecept)
STYLES = public/assets/stylesheets
JAVA = $(shell which java)
ifneq ($(wildcard $(JLESSC)),)
LESSC = $(JLESSC) -sm=on
else
LESSC = $(PLESSC) -sm=on
endif
ifneq ($(wildcard $(CODECEPT_VENDOR)),)
RUN_TESTS = $(CODECEPT_VENDOR) run unit
else ifneq ($(wildcard $(CODECEPT)),)
RUN_TESTS = $(CODECEPT) run unit
else
RUN_TESTS = phpunit -c tests/phpunit.xml
endif
build: less squeeze
squeeze: less force_update
php cli/squeeze.php
doc: force_update
doxygen Doxyfile
test: force_update
$(RUN_TESTS)
# recipe to compile all .less files to CSS
less: $(STYLES)/style.css $(STYLES)/statusgroups.css $(STYLES)/studip-jquery-ui.css
$(STYLES)/style.css: $(wildcard $(STYLES)/less/*.less)
$(STYLES)/studip-jquery-ui.css: $(wildcard $(STYLES)/less/jquery-ui/*.less)
$(STYLES)/statusgroups.css: $(STYLES)/vendor/jquery-nestable.css
%.css: %.less $(STYLES)/mixins.less $(wildcard $(STYLES)/mixins/*.less)
$(LESSC) $< $@
# dummy target to force update of "doc" target
force_update: