diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-07-20 23:15:52 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-07-20 23:15:52 -0400 |
commit | 95492ebd7240cacf1cf8305414f10462707a7284 (patch) | |
tree | be0b02817dcc6dd032da7725a7e54ad401a9be48 /rules/asm2 | |
parent | 97aa93f3db2fd41ed667a502f5586b2e5b39631b (diff) |
Get all versions of ASM to build.
Diffstat (limited to 'rules/asm2')
-rw-r--r-- | rules/asm2/Makefile | 33 | ||||
-rw-r--r-- | rules/asm2/delete.list | 1 |
2 files changed, 23 insertions, 11 deletions
diff --git a/rules/asm2/Makefile b/rules/asm2/Makefile index 156651e..2024107 100644 --- a/rules/asm2/Makefile +++ b/rules/asm2/Makefile @@ -1,16 +1,17 @@ DESTDIR ?= MAVEN_LOCAL_REPO ?= ~/.m2 -ANT = ant -EXISTS = test -e -FAIL = exit 1 -FIND = find +ANT = ant +EXISTS = test -e +FAIL = exit 1 +FIND = find INSTALL = install -MKDIRS = mkdir -p -RM = rm -f -SED = sed +MKDIRS = mkdir -p +RM = rm -f +SED = sed SYMLINK = ln -sf -TOUCH = touch +TOUCH = touch +ECHO = echo artifactIds := $(patsubst archive/%.xml,%,$(wildcard archive/asm*.xml)) version := $(shell $(SED) -n 's/^product\.version\s\s*//p' build.properties) @@ -18,12 +19,15 @@ groupId := asm findjar = $(firstword $(foreach path,$(subst :, ,$(CLASSPATH)),$(if $(findstring $1,$(path)),$(path))) /notfound.jar) ow_util_ant_tasks_jar = $(call findjar,ow_util_ant_tasks) +bnd_jar = $(call findjar,biz.aQute.bnd) all: PHONY output -output: $(shell $(FIND) src) | test/lib - $(SED) -i -e '/^objectweb.ant.tasks.path/d' -e '$$aobjectweb.ant.tasks.path $(ow_util_ant_tasks_jar)' build.properties && \ - $(ANT) dist && \ +output: $(shell $(FIND) src) .classpath | test/lib config/biz.aQute.bnd.jar + $(RM) -r $@ + $(SED) -i '/^objectweb.ant.tasks.path/d' build.properties && \ + $(SED) -i '$$aobjectweb.ant.tasks.path $(ow_util_ant_tasks_jar)' build.properties && \ + $(ANT) jar && \ ( cd output/dist/lib && $(SYMLINK) all/* . ) || \ { $(RM) -r $@; $(FAIL); } $(TOUCH) $@ @@ -31,6 +35,13 @@ output: $(shell $(FIND) src) | test/lib test/lib: $(MKDIRS) $@ +config/biz.aQute.bnd.jar: + $(MKDIRS) $(@D) + $(SYMLINK) $(bnd_jar) $@ + +.classpath: + { $(ECHO) '<?xml version="1.0" encoding="UTF-8"?>'; $(ECHO) '<classpath></classpath>'; } > $@ + install-base = $(DESTDIR)$(MAVEN_LOCAL_REPO)/$(subst .,/,$(groupId))/$(artifactId)/$(version)/$(artifactId)-$(version) install-jars = $(foreach artifactId,$(filter-out %-parent,$(artifactIds)),$(install-base).jar) install-poms = $(foreach artifactId, $(artifactIds) ,$(install-base).pom) diff --git a/rules/asm2/delete.list b/rules/asm2/delete.list new file mode 100644 index 0000000..cddd2a3 --- /dev/null +++ b/rules/asm2/delete.list @@ -0,0 +1 @@ +.classpath |