diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-07-22 14:38:01 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-07-22 14:38:01 -0400 |
commit | be92521ffff0964ad6ab7583fa61279098540256 (patch) | |
tree | ee59dd60c75e9b493e86182ee453e80c9ce4c424 /rules/cglib | |
parent | 3e636fad315b719b880655e3eec039b45204f14c (diff) |
get cglib to build
Diffstat (limited to 'rules/cglib')
-rw-r--r-- | rules/cglib/Makefile | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/rules/cglib/Makefile b/rules/cglib/Makefile new file mode 100644 index 0000000..38c91f6 --- /dev/null +++ b/rules/cglib/Makefile @@ -0,0 +1,45 @@ +DESTDIR ?= +JAR_DIR ?= /usr/share/java + +ANT = ant +EGREP = grep -E +EXISTS = test -e +FAIL = exit 1 +FIND = find +INSTALL = install +PRINTF = printf +RM = rm -f +TOUCH = touch + +version = 3.1 + +dep_dir = $1 $(shell $(FIND) $1 2>/dev/null) +findjar = $(firstword $(shell IFS=:; $(PRINTF) '%s\n' $$CLASSPATH | $(EGREP) '/$1(-[0-9.-]*)?\.jar$$') /notfound.jar) +asm_jar = $(call findjar,asm) + +all: PHONY dist + +dist: $(call dep_dir,src xdocs) lib/asm-4.2.jar + $(RM) -r $@ build + $(ANT) dist || { $(RM) -r $@ build; $(FAIL); } + $(EXISTS) $@ + $(TOUCH) $@ + +dist/%.jar: dist + $(EXISTS) $@ + $(TOUCH) $@ + +lib/asm-4.2.jar: $(asm_jar) + $(INSTALL) -Dm644 $< $@ + +install: PHONY dist $(foreach n,cglib cglib-docs cglib-nodep cglib-src,$(DESTDIR)$(JAR_DIR)/$n-$(version).jar) + +$(DESTDIR)$(JAR_DIR)/%.jar: dist/%.jar + $(INSTALL) -Dm644 $< $@ + +clean: PHONY + $(RM) -r dist build lib/*.jar + +.PHONY: PHONY +.DELETE_ON_ERROR: +.SECONDARY: |