Factorise common variables
[cc0/argeo-build.git] / repackage.mk
index 3461a25370cea0eb600b6104f417318197945eae..54b6d65cf7e272c253681baff5814da460d79c2c 100644 (file)
@@ -1,25 +1,14 @@
 ARGEO_BUILD_BASE := $(dir $(lastword $(MAKEFILE_LIST)))
 include $(ARGEO_BUILD_BASE)common.mk
-#
-# Common repackage routines to be included in Makefiles
-#
-# The following variables are found in the sdk.mk file which is generated by the configure script:
-# SDK_SRC_BASE         the base of the source code, typically the root of the cloned git repository
-# SDK_BUILD_BASE       the base of the output
-# JAVA_HOME                    the base of the JDK used to build
-A2_OUTPUT = $(SDK_BUILD_BASE)/a2
-JVM ?= $(JAVA_HOME)/bin/java
 
 # The following variables should be declared in the including Makefile:
 # CATEGORIES           the space-separated list of categories to repackage
 
-# The following variables have default values which can be overriden
-# A2_BASE                      the space-separated directories where already built a2 categories can be found
 A2_BASE ?=/usr/share/a2 /usr/local/share/a2 $(A2_OUTPUT)
 
 # Third-party libraries
-LOGGER_JAR ?= $(lastword $(foreach base, $(A2_BASE), $(wildcard $(base)/log/syslogger/org.argeo.tp/org.argeo.tp.syslogger.$(SYSLOGGER_BRANCH).jar)))
-BNDLIB_JAR ?= $(lastword $(foreach base, $(A2_BASE), $(wildcard $(base)/org.argeo.tp.build/biz.aQute.bndlib.$(BNDLIB_BRANCH).jar)))
+LOGGER_JAR ?= $(firstword $(foreach base, $(A2_BASE), $(wildcard $(base)/log/syslogger/org.argeo.tp/org.argeo.tp.syslogger.$(SYSLOGGER_BRANCH).jar)))
+BNDLIB_JAR ?= $(firstword $(foreach base, $(A2_BASE), $(wildcard $(base)/org.argeo.tp.build/biz.aQute.bndlib.$(BNDLIB_BRANCH).jar)))
 
 # Internal variables
 ARGEO_REPACKAGE = $(JVM) -cp $(LOGGER_JAR):$(BNDLIB_JAR) $(ARGEO_BUILD_BASE)src/org/argeo/build/Repackage.java