-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathMakefile
48 lines (36 loc) · 1.13 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
.DELETE_ON_ERROR:
TIKA_VERSION := 1.13
JAVAS := $(shell ls src/main/java/org/icij/nodetika/*.java)
JAR := jar/node-tika-$(TIKA_VERSION).jar
PARSERS_JAR := build/tika/tika-core/target/tika-parsers-$(TIKA_VERSION).jar
install: node_modules
update: build/tika-$(TIKA_VERSION) $(JAR)
$(JAR): $(JAVAS) build/tika-$(TIKA_VERSION) pom.xml
mvn install
$(PARSERS_JAR): build/tika-$(TIKA_VERSION)
cd $< && mvn clean && mvn install -Dmaven.test.skip=true
touch $<
build/tika-$(TIKA_VERSION)-src.zip: build
if [ ! -f $@ ]; then \
curl http://www.eu.apache.org/dist/tika/tika-$(TIKA_VERSION)-src.zip --output build/tika-$(TIKA_VERSION)-src.zip; \
else \
touch $@; \
fi
build/tika-$(TIKA_VERSION): build/tika-$(TIKA_VERSION)-src.zip
if [ ! -d $@ ]; then \
unzip build/tika-$(TIKA_VERSION)-src.zip -d build; \
else \
touch $@; \
fi
node_modules: package.json
npm install
touch $@
build:
if [ ! -d $@ ]; then \
mkdir $@; \
fi
test: node_modules
./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --timeout 30000 --reporter spec --check-leaks --ui tdd --recursive
clean:
rm -rf build
.PHONY: install update test clean