-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
65 lines (56 loc) · 2.24 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
.PHONY : default get_irods doxygen mkdocs clean
SHELL = /bin/bash
GITHUB_ACCOUNT = irods
GIT_COMMITTISH = main
MAKEDOXYGENVERSION = Release_1_9_3
BUILDAREA = /hostcomputer
IRODSTARGET = ${BUILDAREA}/irods_for_doxygen
DOXYGENTARGET = ${BUILDAREA}/doxygen_for_docs
DOXYGENMAKEJOBCOUNT =
VENVTARGET = ${BUILDAREA}/venv43
DOCS_SOURCE_DIR = docs
DOCS_TARGET_DIR = ${BUILDAREA}/site
default : doxygen mkdocs
@rsync -ar --delete doxygen/ ${DOCS_TARGET_DIR}/doxygen/
get_irods :
@echo "Getting iRODS source... v[${GIT_COMMITTISH}]"
@if [ -d ${IRODSTARGET} ] ; then rm -rf ${IRODSTARGET} ; fi
@git clone https://github.com/${GITHUB_ACCOUNT}/irods ${IRODSTARGET}
@cd ${IRODSTARGET}; git fetch; git checkout ${GIT_COMMITTISH}
doxygen : get_irods
@echo "Generating Doxygen..."
@if [ ! -d ${DOXYGENTARGET} ] ; then git clone https://github.com/doxygen/doxygen ${DOXYGENTARGET}; fi
@cd ${DOXYGENTARGET}; git fetch; git checkout ${MAKEDOXYGENVERSION}
@mkdir -p ${DOXYGENTARGET}/build
@if [ ! -f ${DOXYGENTARGET}/build/CMakeCache.txt ] ; then cd ${DOXYGENTARGET}/build; cmake ..; fi
@cd ${DOXYGENTARGET}/build ; make -j ${DOXYGENMAKEJOBCOUNT}
@cd ${IRODSTARGET}; ${DOXYGENTARGET}/build/bin/doxygen Doxyfile 1> /dev/null
@rsync -ar --delete ${IRODSTARGET}/doxygen/html/ doxygen/
@cp ${IRODSTARGET}/doxygen/custom.css doxygen/
mkdocs : get_irods
@echo "Generating Mkdocs..."
@./generate_icommands_md.sh
@python3 generate_dynamic_peps_md.py > ${DOCS_SOURCE_DIR}/plugins/dynamic_peps_table.mdpp
@if [ ! -d ${VENVTARGET} ] ; then \
python3 -m venv ${VENVTARGET}; \
. ${VENVTARGET}/bin/activate; \
pip install wheel; \
pip install -r requirements.txt; \
fi
@. ${VENVTARGET}/bin/activate; \
pushd ${DOCS_SOURCE_DIR}; \
markdown-pp -e latexrender -o plugins/dynamic_policy_enforcement_points.md plugins/dynamic_policy_enforcement_points.mdpp; \
mkdir -p doxygen; \
touch doxygen/index.html; \
popd; \
export LC_ALL=C.UTF-8; \
export LANG=C.UTF-8; \
mkdocs build --clean; \
rsync -ar --delete site/ ${DOCS_TARGET_DIR}/
clean :
@echo "Cleaning..."
@rm -rf site
@rm -rf ${IRODSTARGET} ${DOXYGENTARGET} ${VENVTARGET}
@rm -rf ${DOCS_SOURCE_DIR}/doxygen
@rm -rf ${DOCS_SOURCE_DIR}/icommands
@rm -rf ${DOCS_SOURCE_DIR}/plugins/rule_engine_plugin_framework.md