forked from chriskrycho/newrustacean.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (28 loc) · 905 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
# -- Define variables. -- #
BUILD_DIR = target/doc
SRC = src/*.rs
LANDING = landing/*.html landing/*.css
RESOURCES = resources/* resources/.nojekyll
# -- Define build rules -- #
.PHONY: all clean test modules publish
default: all
clean:
rm -rf $(BUILD_DIR)
publish: all
ghp-import -n $(BUILD_DIR) -m "Update with latest changes from master."
@git push -fq https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
# Generate everything, but just leave it in the build directory.
all: test modules landing resources
test: $(SRC)
cargo test
modules: $(SRC)
cargo doc
# Fancy landing page components.
landing: $(LANDING) target_dir
cp $(LANDING) target/doc
# GitHub pages settings, favicon, RSS feed, etc. Note: the RSS feed is updated
# manually, so running `make modules` won't update it.
resources: $(RESOURCES) target_dir
cp $(RESOURCES) target/doc
target_dir:
mkdir -p $(BUILD_DIR)