-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (56 loc) · 1.63 KB
/
Copy pathMakefile
File metadata and controls
78 lines (56 loc) · 1.63 KB
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
.PHONY: default compile all check clean distclean dev
default: compile
bin/nanoc view
compile: .deps
bin/nanoc compile
all: clean compile check
check: .deps
bin/nanoc check internal_links external_links stale
-bin/nanoc check css html
clean:
rm -rf output/
distclean: clean
rm -rf tmp/ .bundle bin vendor
dev:
bin/nanoc live
.PHONY: .deps bundler-env install-bundle install-bundle-devel install-bundle-ci
# default installation
.deps:
@[ -e .bundle ] || $(MAKE) install-bundle
@[ -e node_modules ] || $(MAKE) install-yarn
# gems
define bundle_install_with_stubs
bundle install
@echo "Making gems available"
bundle binstubs --force nanoc
endef
bundler-env:
@echo "Configuring bundler environment"
bundle config set --local clean true
bundle config set --local path vendor/bundle
install-bundle: bundler-env
@echo "Installing only main gems, cleaning old gems"
@bundle config set --local without development,test
$(bundle_install_with_stubs)
install-bundle-devel: bundler-env
@echo "Installing all gems, cleaning old gems"
@bundle config unset --local without
$(bundle_install_with_stubs)
install-bundle-ci: bundler-env
@echo "Installing main and testing gems, cleaning old gems"
@bundle config set --local deployment true
@bundle config set --local without development
$(bundle_install_with_stubs)
# nodes
.PHONY: install-yarn install-yarn-devel
install-yarn:
yarn install
yarn build
install-yarn-devel:
yarn install
yarn build:dev
# meta
.PHONY: install install-devel install-ci
install: install-bundle install-yarn
install-devel: install-bundle-devel install-yarn-devel
install-ci: install-bundle-ci install-yarn