forked from jadonk/bone101
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (46 loc) · 1.71 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
47
48
49
50
51
52
DESTDIR:=
PREFIX:=/usr/local
CLOUD9_DIR:=/var/lib/cloud9
JEKYLL:=$(shell which jekyll)
HTMLPROOFER:=$(shell which htmlproofer)
NPM:=$(shell which npm)
all: ./bone101
./bone101: Makefile _config.yml
ifdef JEKYLL
$(JEKYLL) build -d ./bone101
else
$(error jekyll not installed)
endif
ifdef NPM
mkdir -p node_modules
cd node_modules
$(NPM) install --unsafe-perm=true --progress=false --loglevel=error async@2.0.0-rc.6
$(NPM) install --unsafe-perm=true --progress=false --loglevel=error sensortag@1.2.2
cd ..
else
@echo npm not found
endif
clean:
rm -rf ./bone101
rm -rf ./node_modules
test:
ifdef HTMLPROOFER
$(HTMLPROOFER) "./bone101" --disable-external --alt-ignore "/.*/" --only-4xx --url-ignore "/#.*/" --url-swap "/bone101:" --file-ignore "/Support/bone101/UI/","/Support/bonecard/create/"
else
@echo htmlproofer not found
endif
install: ./bone101
install -m 0755 -d $(DESTDIR)$(PREFIX)/share/bone101
cp -dr --preserve=mode,timestamp ./bone101/* $(DESTDIR)$(PREFIX)/share/bone101/
install -m 0755 -d $(DESTDIR)$(CLOUD9_DIR)
install -m 0755 -d $(DESTDIR)$(CLOUD9_DIR)/.c9
cp -dr --preserve=mode,timestamp ./.c9/* $(DESTDIR)$(CLOUD9_DIR)/.c9
install -m 0755 -d $(DESTDIR)$(CLOUD9_DIR)/examples
cp -dr --preserve=mode,timestamp ./examples/* $(DESTDIR)$(CLOUD9_DIR)/examples
cp -dr --preserve=mode,timestamp ./LICENSE $(DESTDIR)$(CLOUD9_DIR)
cp -dr --preserve=mode,timestamp ./README.md $(DESTDIR)$(CLOUD9_DIR)
install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
cp --preserve=mode,timestamp bone101.desktop $(DESTDIR)$(PREFIX)/share/applications/
install -m 0755 -d $(DESTDIR)/usr/local/lib/node_modules
cp -dr --preserve=mode,timestamp node_modules/* $(DESTDIR)/usr/local/lib/node_modules/
.PHONY: clean test install