forked from usnistgov/OSCAL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (25 loc) · 802 Bytes
/
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
SHELL:=/usr/bin/env bash
OSCAL_DIR:=../../../
METASCHEMA_XSLT_DIR:=$(OSCAL_DIR)/build/metaschema-xslt
XSPEC_DIR:=$(METASCHEMA_XSLT_DIR)/support/xspec
XSPEC_COMMAND:=$(XSPEC_DIR)/bin/xspec.sh
POM_FILE:=$(METASCHEMA_XSLT_DIR)/support/pom.xml
TEST_DIR:=./testing/xspec
# Must be an absolute path due to maven issues
# (maven's copy dependency plugin resolves paths relative to the POM file)
SUPPORT_DIR:=$(shell pwd)/java_modules
$(SUPPORT_DIR):
mkdir -p "$(SUPPORT_DIR)"
mvn --quiet -f $(POM_FILE) \
dependency:copy-dependencies \
-DoutputDirectory="$(SUPPORT_DIR)"
.PHONY: test
test: $(SUPPORT_DIR) $(wildcard *.xsl)
TEST_DIR=$(TEST_DIR) \
XSPEC_COMMAND=$(XSPEC_COMMAND) \
SAXON_CP="$(SUPPORT_DIR)/*" \
./testing/test.sh
.PHONY: clean
clean:
rm -fr $(SUPPORT_DIR)
rm -fr $(TEST_DIR)