-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·69 lines (60 loc) · 2.04 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
# Makefile for Doxygen
WORKSPACE ?= .
PROJECTPATH ?= /var/lib/jenkins/jobs
WEBPATH ?= /srv/sites/butler/docs
DOXYGEN_FILE ?= ./Doxyfile.cfg
OUTPUT_DIR ?= $(WORKSPACE)
SOURCES ?= sources
DESTDIR ?=
PREFIX ?= /usr/local/share
MANDIR ?= $(DESTDIR)$(PREFIX)/man
DOXYPYPY_PATH ?= /usr/local/bin
all: getgit fixmain docs web
#########################
# get the source via butler
#########################
.PHONY: get
get:
PROJECTPATH=$(PROJECTPATH) SOURCES=$(SOURCES) $(WORKSPACE)/getproject syndicate-core syndicate-ug-tools syndicate-dataset-manager https://github.com/syndicate-storage/syndicate-storage.github.io
#########################
# get the source via github
#########################
.PHONY: getgit
getgit:
PROJECTPATH=$(PROJECTPATH) SOURCES=$(SOURCES) $(WORKSPACE)/getproject https://github.com/syndicate-storage/syndicate-core https://github.com/syndicate-storage/syndicate-ug-tools https://github.com/syndicate-storage/syndicate-storage.github.io https://github.com/syndicate-storage/syndicate-dataset-manager
#########################
# fix the header info for the main page, remove "layout" and "title" from markup
#########################
.PHONY: fixmain
fixmain:
sed '/---/,/---/d' $(SOURCES)/syndicate-storage.github.io/index.md > $(SOURCES)/index.md
rm -rf $(SOURCES)/syndicate-storage.github.io
mkdir $(SOURCES)/syndicate-storage.github.io
mv $(SOURCES)/index.md $(SOURCES)/syndicate-storage.github.io
#########################
# generate documentation
#########################
.PHONY: docs
docs:
DOXYGEN_FILE=$(DOXYGEN_FILE) DOXYPYPY_PATH=$(DOXYPYPY_PATH) $(WORKSPACE)/makedocs
#########################
# copy generated html to web path
#########################
.PHONY: web
web:
rm -rf $(WEBPATH)/*
cp -r html/* $(WEBPATH)
#########################
# install man pages, run this as root
#########################
.PHONY: installman
installman:
MANDIR=$(MANDIR) $(WORKSPACE)/installman
#########################
# clean up
#########################
.PHONY: clean
clean:
rm -rf $(WORKSPACE)/html
rm -rf $(WORKSPACE)/man
rm -rf $(WORKSPACE)/$(SOURCES)