diff options
Diffstat (limited to 'rules')
-rw-r--r-- | rules/javassist/Makefile | 34 | ||||
-rw-r--r-- | rules/javassist/delete.list | 1 |
2 files changed, 35 insertions, 0 deletions
diff --git a/rules/javassist/Makefile b/rules/javassist/Makefile new file mode 100644 index 0000000..d0f9766 --- /dev/null +++ b/rules/javassist/Makefile @@ -0,0 +1,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 diff --git a/rules/javassist/delete.list b/rules/javassist/delete.list new file mode 100644 index 0000000..c7cd26c --- /dev/null +++ b/rules/javassist/delete.list @@ -0,0 +1 @@ +javassist.jar |