-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (41 loc) · 1.22 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
SHAREDIR=/usr/share/dpres-xml-schemas
XMLCATALOGDIR=/etc/xml/dpres-xml-schemas
PYTHON=python3
all: info
info:
@echo
@echo "dpres-xml-schemas"
@echo
@echo "Usage:"
@echo " make test - Run all unit tests"
@echo " make install - Install dpres-xml-schemas"
@echo
install:
# XML Schema catalogs
mkdir -p "${XMLCATALOGDIR}/schema_catalogs"
cp -r --preserve=timestamp schema_catalogs/* "${XMLCATALOGDIR}/schema_catalogs"
rm -rf "${XMLCATALOGDIR}"/.git*
# Common data files
mkdir -p "${SHAREDIR}/preservation_schemas"
cp -r ingest_report/* "${SHAREDIR}/preservation_schemas"
mkdir -p "${SHAREDIR}/schematron"
cp -r --preserve=timestamp schematron/* "${SHAREDIR}/schematron"
rm -rf "${SHAREDIR}"/.git*
chmod -R 755 "${XMLCATALOGDIR}"
find "${XMLCATALOGDIR}" -type f -exec chmod 644 \{\} \;
chmod -R 755 "${SHAREDIR}"
find "${SHAREDIR}" -type f -exec chmod 644 \{\} \;
test:
${PYTHON} -m pytest tests --junitprefix=dpres-xml-schemas --junitxml=junit.xml
docs:
make -C doc html
make -C doc pdf
docserver:
make -C doc docserver
killdocserver:
make -C doc killdocserver
clean: clean-rpm
find . -iname '*.pyc' -type f -delete
find . -iname '__pycache__' -exec rm -rf '{}' \; | true
clean-rpm:
rm -rf rpmbuild