-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (53 loc) · 1.49 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#
# Simple Makefile for conviently testing, building and deploying experiment.
#
PROJECT = Fmt
VERSION = $(shell grep -m 1 'Version\* = ' $(PROJECT).Mod | cut -d\" -f 2)
BRANCH = $(shell git branch | grep '* ' | cut -d\ -f 2)
PREFIX = $(HOME)
OS = $(shell uname)
MACHINE = $(shell uname -m)
PLATFORM = $(MACHINE)_$(OS)
EXT =
ifeq ($(OS), Windows)
EXT = .exe
endif
PROJECT_LIST =
build: .FORCE
./build.bash
install: .FORCE
./install.bash --prefix=$(PREFIX)
obncdocs: .FORCE
./build.bash docs
website: obncdocs page.tmpl README.md nav.md INSTALL.md LICENSE css/site.css
python3 mk_website.py
test:
./test.bash
cleanweb:
if [ -f index.html ]; then rm *.html; fi
clean: .FORCE
if [ -d dist ]; then rm -fR dist; fi
./build.bash clean
distribute_docs:
mkdir -p dist/$(PROJECT)-$(VERSION)
cp -v README.md dist/$(PROJECT)-$(VERSION)/
cp -v LICENSE dist/$(PROJECT)-$(VERSION)/
cp -v INSTALL.md dist/$(PROJECT)-$(VERSION)/
dist/$(PLATFORM)-$(VERSION): distribute_docs
mkdir -p dist/$(PROJECT)-$(VERSION)
cp *.Mod dist/$(PROJECT)-$(VERSION)/
cp *.bash dist/$(PROJECT)-$(VERSION)/
cp -r obncdoc dist/$(PROJECT)-$(VERSION)/
cd dist && zip -r $(PROJECT)-$(VERSION).zip $(PROJECT)-$(VERSION)/*
update_version:
python3 update_version.py --yes
release: clean website dist/$(PLATFORM)-$(VERSION)
status:
git status
save:
if [ "$(msg)" != "" ]; then git commit -am "$(msg)"; else git commit -am "Quick Save"; fi
git push origin $(BRANCH)
publish:
python3 mk_website.py
bash publish.bash
.FORCE: