summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-11-16 21:58:08 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-11-16 21:58:08 -0500
commit90c9e3ebb1871d18d516637fb4d0a2d5e3901665 (patch)
tree1c74ebb3afdb5af4a1bea0e299c95d32458263f2
parentf45a9ca6a7d8339776ff7db5594882dc1f8fec4f (diff)
Makefile: make bindir configurable
-rw-r--r--Makefile7
-rw-r--r--conf/bindir.txt1
2 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index b8fdcd8..88a9603 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,8 @@ include conf/sources.mk
# Load other configuration files
include conf/dependencies.mk
export MAVEN_LOCAL_REPO := $(shell $(CAT) conf/maven.local.repo.txt)
-export JAR_DIR := $(shell $(CAT) conf/jardir.txt)
+export JAR_DIR := $(shell $(CAT) conf/jardir.txt)
+export bindir := $(shell $(CAT) conf/bindir.txt)
# Post-processing for conf/sources.mk
packages := $(filter-out _%,$(variables))
@@ -213,12 +214,12 @@ build/packages/%: $(MAKEFILE_LIST)
$(ECHO) 'CLASSPATH=$(call deps2classpath,$^):$${CLASSPATH:+:$${CLASSPATH}}' && \
$(ECHO) 'export CLASSPATH' && \
$(ECHO) 'exec $(JAVA) $(call name2,extra,$*)' ; \
- } | $(INSTALL) -Dm755 /dev/stdin '$@/usr/bin/$(call name2,url,$*)' && \
+ } | $(INSTALL) -Dm755 /dev/stdin '$@/$(bindir)/$(call name2,url,$*)' && \
{ \
$(ECHO) '#!/bin/sh' && \
$(ECHO) 'CLASSPATH=$(call deps2classpath,$^):$${CLASSPATH:+:$${CLASSPATH}}' && \
$(ECHO) 'printf '%s\n' "$$CLASSPATH"' ; \
- } | $(INSTALL) -Dm755 /dev/stdin '$@/usr/bin/$(call name2,url,$*)-classpath' || \
+ } | $(INSTALL) -Dm755 /dev/stdin '$@/$(bindir)/$(call name2,url,$*)-classpath' || \
{ $(RM) -r '$@'; $(FAIL); }
# boilerplate ##################################################################
diff --git a/conf/bindir.txt b/conf/bindir.txt
new file mode 100644
index 0000000..415f082
--- /dev/null
+++ b/conf/bindir.txt
@@ -0,0 +1 @@
+/usr/bin