blob: d0f9766524e9febf579bbf4804407d58abac5593 (
plain)
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
|
DESTDIR ?=
MAVEN_LOCAL_REPO ?= ~/.m2
ANT = ant
EXISTS = test -e
FIND = find
INSTALL = install
RM = rm -f
TOUCH = touch
XMLSTARLET = xml
artifactId := $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:artifactId -n pom.xml)
version := $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:version -n pom.xml)
groupId := $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:groupId -n pom.xml)
all: PHONY javassist.jar
javassist.jar: $(shell $(FIND) src/main) build.xml
$(ANT) jar
$(EXISTS) '$@'
$(TOUCH) '$@'
install-base = $(DESTDIR)$(MAVEN_LOCAL_REPO)/$(subst .,/,$(groupId))/$(artifactId)/$(version)/$(artifactId)-$(version)
install: PHONY $(install-base).jar $(install-base).pom
$(install-base).jar: javassist.jar
$(INSTALL) -Dm644 $< $@
$(install-base).pom: pom.xml
$(INSTALL) -Dm644 $< $@
clean: PHONY
$(RM) -r target javassist.jar
.PHONY: PHONY
|