prefix:=/usr/local DESTDIR:= JAR=dist/pluggablejs.jar bindir=$(DESTDIR)/$(prefix)/bin all: ant compile.downstream $(JAR): ant dist.downstream clean: ant clean install: $(JAR) mkdir -p $(DESTDIR)/$(prefix)/share/java $(bindir)/ install -m644 -o0 -g0 $(JAR) $(DESTDIR)/$(prefix)/share/java/ cat pjsh.sh | sed 's\^prefix=.*$$\prefix=$(prefix)\g' > $(bindir)/pjsh chmod 755 $(bindir)/pjsh -chown root.root $(bindir)/pjsh uninstall: $(RM) $(DESTDIR)/$(prefix)/share/java/`basename "$(JAR)"` -rmdir -p $(DESTDIR)/$(prefix)/share/java