blob: 2b42a87ac560fd5c6e691b8294e899b4d2076147 (
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
35
36
37
38
|
DESTDIR ?=
MAVEN_LOCAL_REPO ?= ~/.m2
ANT = ant
FIND = find
INSTALL = install
RM = rm -f
SED = sed
TR = tr
artifactId = jdom2
version = 2.0.5
groupId = org.jdom
all: PHONY build
build: build.properties $(shell $(FIND) core/src/java)
$(ANT) maven || { $(RM) -r build; exit 1; }
build.properties: $(MAKEFILE_LIST)
{ \
echo $$CLASSPATH | tr : '\n' | sed -rn 's|.*/([A-Za-z]*)(-[0-9.]*)?[.]jar$$|\1.jar=&|p' && \
echo version=$(version); \
} > $@
install-dir = $(DESTDIR)$(MAVEN_LOCAL_REPO)/$(subst .,/,$(groupId))/$(artifactId)/$(version)
install-targets = $(addprefix $(install-dir)/$(artifactId)-$(version),.pom .jar -sources.jar -javadoc.jar)
install: PHONY $(install-targets)
$(install-targets): $(install-dir)/%: build/maven/core/%
$(INSTALL) -Dm644 $< $@
$(patsubst $(install-dir)/%,build/maven/core/%,$(install-targets)): build/maven/core/%: build
clean: PHONY
$(RM) -r build
.PHONY: PHONY
|