X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=osgi.mk;h=5ac04b5f2ca616d01653696ff421a6a80769aeec;hb=d1dda809f03ef88f0148d7283960253d89d91798;hp=12e34aa6d0d3a30f52b3dfe8635bfbd789ed064c;hpb=cb30146f36ebb57b26e090ed67d6c3b1022f0f12;p=cc0%2Fargeo-build.git diff --git a/osgi.mk b/osgi.mk index 12e34aa..5ac04b5 100644 --- a/osgi.mk +++ b/osgi.mk @@ -15,6 +15,10 @@ JAVADOC ?= $(JAVA_HOME)/bin/javadoc # BUNDLES the space-separated list of bundles to build # A2_CATEGORY the (single) a2 category the bundles will belong to +# The following environment variables can change the behaviour of the build +# SOURCE_BUNDLES sources will be packaged separately in Eclipse-compatible source bundles +# NO_MANIFEST_COPY generated MANIFESTs won't be copied to the source tree + # The following variables have default values which can be overriden # DEP_CATEGORIES the a2 categories the compilation depends on # JAVADOC_PACKAGES the space-separated list of packages for which javadoc will be generated @@ -31,7 +35,9 @@ BNDLIB_JAR ?= $(lastword $(foreach base, $(A2_BASE), $(wildcard $(base)/org.arge # Internal variables ARGEO_MAKE = $(JVM) -cp $(LOGGER_JAR):$(ECJ_JAR):$(BNDLIB_JAR) $(ARGEO_BUILD_BASE)/src/org/argeo/build/Make.java JAVADOC_SRCS = $(foreach bundle, $(BUNDLES), $(bundle)/src) +ifneq ($(NO_MANIFEST_COPY),true) MANIFESTS = $(foreach bundle, $(BUNDLES), $(bundle)/META-INF/MANIFEST.MF) +endif BUILD_BASE = $(SDK_BUILD_BASE)/$(shell basename $(SDK_SRC_BASE)) TARGET_BUNDLES = $(abspath $(foreach bundle, $(BUNDLES),$(A2_OUTPUT)/$(shell dirname $(bundle))/$(A2_CATEGORY)/$(shell basename $(bundle)).$(major).$(minor).jar)) TODOS = $(foreach bundle, $(BUNDLES),$(BUILD_BASE)/$(bundle)/to-build) @@ -41,9 +47,6 @@ TODOS = $(foreach bundle, $(BUNDLES),$(BUILD_BASE)/$(bundle)/to-build) .PHONY: osgi manifests javadoc osgi: $(BUILD_BASE)/built $(MANIFESTS) -# copy MANIFESTs to sources -# @mkdir -p $(foreach bundle, $(BUNDLES), $(bundle)/META-INF/); -# @$(foreach bundle, $(BUNDLES), cp -v $(BUILD_BASE)/$(bundle)/META-INF/MANIFEST.MF $(bundle)/META-INF/MANIFEST.MF;) # Actual build (compilation + bundle packaging) $(BUILD_BASE)/built : BUNDLES_TO_BUILD = $(subst $(abspath $(BUILD_BASE))/,, $(subst to-build,, $?)) @@ -65,8 +68,10 @@ $(BUILD_BASE)/%/to-build : $$(shell find % -type f -not -path 'bin/*' -not -path # Local manifests %/META-INF/MANIFEST.MF : $(BUILD_BASE)/%/META-INF/MANIFEST.MF - @mkdir -p $* +ifneq ($(NO_MANIFEST_COPY),true) + @mkdir -p $*/META-INF @cp $< $@ +endif clean-manifests : @rm -rf $(foreach bundle, $(BUNDLES), $(bundle)/META-INF/MANIFEST.MF);