-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (40 loc) · 1.42 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
PACKAGE=lttoolbox-java-3.4.2
SYMLINKS=lt-validate-j lt-print-j lt-expand-j lt-comp-j lt-proc-j lt-trim-j\
apertium-destxt-j apertium-retxt-j apertium-tagger-j apertium-pretransfer-j\
apertium-transfer-j apertium-interchunk-j apertium-postchunk-j apertium-preprocess-transfer-bytecode-j
DISTFILES=README dist/lttoolbox.jar autogen.sh pom.xml COPYING Makefile src test testdata apertium-j apertium-pack-j ${SYMLINKS}
.PHONY : test dist
all: dist/lttoolbox.jar symlinks
dist/lttoolbox.jar: pom.xml src
./mvnw package
mkdir dist
cp target/lttoolbox.jar dist/
symlinks: ${SYMLINKS}
${SYMLINKS}:
@echo "Making symlinks"
for i in ${SYMLINKS}; do ln -sf apertium-j $$i; done
install: dist/lttoolbox.jar
@if [ ! -e prefix ]; then \
echo "/usr/local" > prefix; \
fi
$(eval DEST=${DESTDIR}$(shell cat prefix))
@echo installing into ${DEST}
mkdir -p ${DEST}/bin/
mkdir -p ${DEST}/share/apertium/
cp dist/lttoolbox.jar ${DEST}/share/apertium/
# cp -a apertium-j lt-expand-j lt-comp-j lt-validate-j ${DEST}/bin/
chmod a+x ${SYMLINKS} apertium-j apertium-pack-j
cp -a ${SYMLINKS} apertium-j apertium-pack-j ${DEST}/bin/
test:
./mvnw test
clean:
./mvnw -quiet clean
rm -rf out target dist tmp
distclean: clean
rm -f prefix ${SYMLINKS}
dist: dist/lttoolbox.jar
rm -rf ${PACKAGE}
mkdir ${PACKAGE}
cp -a ${DISTFILES} ${PACKAGE}
tar --exclude-vcs --exclude=${PACKAGE}/nbproject/private -czf ${PACKAGE}.tar.gz ${PACKAGE}
rm -rf ${PACKAGE}