forked from SIGSTACKFAULT/science2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (21 loc) · 798 Bytes
/
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
.PHONY: xyzzy clean misc css tabs common
##### Actual targets for using
build: tabs misc css common build/index.php
clean:
rm -rf build/*
##### Intermediate targets; all phony
misc: build/404.html build/.htaccess
tabs: build/tab/upgrades/ build/tab/achievements/
common: build/common/ build/common/header.css build/common/header.php build/common/head.php build/common/common.js build/common/resources.js
##### Actual targets that do stuff
# Pattern rule for making a tab folder.
build/tab/%/: build/tab/%/ build/tab/%/index.php build/tab/%/style.css
# Pattern rule for building .css from .less
build/%.css: src/%.less
lessc $< $@
# Pattern rule for mkdir-ing folders
build/%/:
mkdir -p $@
# Pattern rule for cp-ing from src/ to build/
build/%: src/% $(@D)/
cp $< $@