From: Mathieu Date: Fri, 10 Mar 2023 09:39:21 +0000 (+0100) Subject: Autonomous build for bootstrap X-Git-Tag: v2.3.12~69 X-Git-Url: https://git.argeo.org/?a=commitdiff_plain;h=6b24bc29f1bea600516f4a5fbd15d1acca31dada;p=gpl%2Fargeo-tp.git Autonomous build for bootstrap --- diff --git a/.gitmodules b/.gitmodules index 07b10ca..2237f6c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,7 @@ path = sdk/argeo-build url = http://git.argeo.org/cc0/argeo-build.git branch = unstable +[submodule "bootstrap/sdk/argeo-build"] + path = bootstrap/sdk/argeo-build + url = http://git.argeo.org/cc0/argeo-build.git + branch = unstable diff --git a/bootstrap/.gitignore b/bootstrap/.gitignore index 9671c65..9a4df6c 100644 --- a/bootstrap/.gitignore +++ b/bootstrap/.gitignore @@ -1,2 +1,3 @@ /ecj/ /bndlib/ +/output/ diff --git a/bootstrap/Makefile b/bootstrap/Makefile index 12514c6..838046f 100644 --- a/bootstrap/Makefile +++ b/bootstrap/Makefile @@ -1,5 +1,4 @@ -include ../sdk.mk -include ../common.mk +-include sdk.mk ECJ_VERSION=4.26 @@ -31,18 +30,12 @@ $(ORIGIN_BASE)/bnd-$(BND_VERSION).tar.gz all: ecj-build bndlib-build make -C org.argeo.tp.build all -ecj: ecj-build - ecj-build: + mkdir -p $(BOOTSTRAP_BASE) # list sources - find $(ECJ_BASE)/org | grep "\.java" > $(BOOTSTRAP_BASE)/ecj.todo - # copy sources - mkdir -p $(ECJ_SRC) - cp -r $(ECJ_BASE)/org $(ECJ_SRC) + find $(ECJ_BASE)/OSGI-OPT/src | grep "\.java" > $(BOOTSTRAP_BASE)/ecj.todo # build $(JAVA_HOME)/bin/javac -d $(ECJ_BASE) -source 17 -target 17 -Xlint:none @$(BOOTSTRAP_BASE)/ecj.todo - # remove sources - cd $(ECJ_BASE) && find . -name "*.java" -name "*.html" -type f -exec rm -f {} \; bndlib-build: $(JAVA_HOME)/bin/java -cp $(ECJ_BASE) org.eclipse.jdt.internal.compiler.batch.Main -nowarn \ @@ -52,11 +45,15 @@ bndlib-build: clean: $(RM) -rf $(BOOTSTRAP_BASE) + cd $(ECJ_BASE) && find . -name "*.class" -type f -exec rm -f {} \; + cd $(BNDLIB_BASE) && find . -name "*.class" -type f -exec rm -f {} \; + make -C org.argeo.tp.build clean + +clean-sources: $(RM) -rf $(ECJ_BASE) $(RM) -rf $(BNDLIB_BASE) - make -C org.argeo.tp.build clean -bootstrap-prepare-source-tarball: bootstrap-download-sources +bootstrap-prepare-sources: bootstrap-download-sources ## ECJ mkdir -p $(ECJ_BASE) cd $(ECJ_BASE) && jar -xf $(ORIGIN_BASE)/ecjsrc-$(ECJ_VERSION).jar @@ -69,6 +66,13 @@ bootstrap-prepare-source-tarball: bootstrap-download-sources $(RM) -rf $(ECJ_BASE)/scripts # TODO: keep the service files $(RM) -rf $(ECJ_BASE)/META-INF + + # copy sources and resources + mkdir -p $(ECJ_SRC) + cp -r $(ECJ_BASE)/org $(ECJ_SRC) + # remove java sources + cd $(ECJ_BASE) && find org -name "*.java" -type f -exec rm -f {} \; + cd $(ECJ_BASE) && find org -name "*.html -type f -exec rm -f {} \; ## BNDLIB # copy sources @@ -103,11 +107,7 @@ bootstrap-prepare-source-tarball: bootstrap-download-sources # clean up BNDLIB $(RM) -rf $(BNDLIB_SRC)/aQute/bnd/annotation/spi - $(RM) -rf $(BNDLIB_SRC)/aQute/bnd/junit - - tar -cf ../argeo-tp-build_$(ECJ_VERSION).orig.tar $(ECJ_BASE) - tar -rf ../argeo-tp-build_$(ECJ_VERSION).orig.tar $(BNDLIB_BASE) - xz -f ../argeo-tp-build_$(ECJ_VERSION).orig.tar + $(RM) -rf $(BNDLIB_SRC)/aQute/bnd/junit bootstrap-download-sources: $(SOURCE_ARCHIVES) diff --git a/bootstrap/branch.mk b/bootstrap/branch.mk new file mode 100644 index 0000000..afde0f8 --- /dev/null +++ b/bootstrap/branch.mk @@ -0,0 +1 @@ +BRANCH=unstable \ No newline at end of file diff --git a/bootstrap/configure b/bootstrap/configure new file mode 100755 index 0000000..47f7d96 --- /dev/null +++ b/bootstrap/configure @@ -0,0 +1,7 @@ +#!/bin/sh + +# Source are located where this script is +SDK_SRC_BASE="$(cd "$(dirname "$0")"; pwd -P)" + +# Source the configure script +. $SDK_SRC_BASE/sdk/argeo-build/configure diff --git a/bootstrap/debian/changelog b/bootstrap/debian/changelog index 83914c5..b4409a7 100644 --- a/bootstrap/debian/changelog +++ b/bootstrap/debian/changelog @@ -1,4 +1,4 @@ -argeo-tp-build (4.26-1) unstable; urgency=medium +argeo-tp-build (4.26) unstable; urgency=medium * Initial release diff --git a/bootstrap/debian/control b/bootstrap/debian/control index 39873ac..b744e3d 100644 --- a/bootstrap/debian/control +++ b/bootstrap/debian/control @@ -2,7 +2,7 @@ Source: argeo-tp-build Section: unknown Priority: optional Maintainer: Mathieu Baudier -Build-Depends: debhelper-compat (= 13) +Build-Depends: debhelper-compat (= 13), openjdk-17-jdk Standards-Version: 4.5.1 Rules-Requires-Root: no @@ -10,4 +10,4 @@ Package: argeo-tp-build Architecture: all Depends: ${misc:Depends} Description: Argeo Build third party libraries - Eclipse ECJ compiler and BND library. \ No newline at end of file + Eclipse ECJ compiler and BND library. diff --git a/bootstrap/debian/rules b/bootstrap/debian/rules index 2d33f6a..2338cfd 100755 --- a/bootstrap/debian/rules +++ b/bootstrap/debian/rules @@ -1,4 +1,6 @@ #!/usr/bin/make -f +JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 + %: dh $@ diff --git a/bootstrap/debian/source/format b/bootstrap/debian/source/format index 163aaf8..89ae9db 100644 --- a/bootstrap/debian/source/format +++ b/bootstrap/debian/source/format @@ -1 +1 @@ -3.0 (quilt) +3.0 (native) diff --git a/bootstrap/org.argeo.tp.build/Makefile b/bootstrap/org.argeo.tp.build/Makefile index 2416d49..65116fd 100644 --- a/bootstrap/org.argeo.tp.build/Makefile +++ b/bootstrap/org.argeo.tp.build/Makefile @@ -1,21 +1,18 @@ -include ../../sdk.mk -include ../../common.mk - .PHONY: clean all osgi A2_OUTPUT := $(SDK_BUILD_BASE)/a2 JVM ?= $(JAVA_HOME)/bin/java -ARGEO_MAKE := $(JVM) -cp $(BOOTSTRAP_BASE)/ecj:$(BOOTSTRAP_BASE)/bndlib:$(BND_CLASSPATH) $(SDK_SRC_BASE)/sdk/argeo-build/src/org/argeo/build/Make.java +ARGEO_MAKE := $(JVM) -cp ../ecj:../bndlib ../sdk/argeo-build/src/org/argeo/build/Make.java A2_CATEGORY = org.argeo.tp.build all: osgi osgi: - cp -r $(BOOTSTRAP_BASE)/ecj/OSGI-OPT/src org.eclipse.jdt.core.compiler.batch + cp -r ../ecj/OSGI-OPT/src org.eclipse.jdt.core.compiler.batch - cp -r $(BOOTSTRAP_BASE)/bndlib/OSGI-OPT/src biz.aQute.bndlib + cp -r ../bndlib/OSGI-OPT/src biz.aQute.bndlib cp -rv ../../rebuild/org.argeo.tp/org.argeo.ext.slf4j/src/* biz.aQute.bndlib/src $(ARGEO_MAKE) all --category $(A2_CATEGORY) --bundles org.eclipse.jdt.core.compiler.batch biz.aQute.bndlib diff --git a/bootstrap/sdk/argeo-build b/bootstrap/sdk/argeo-build new file mode 160000 index 0000000..0719a66 --- /dev/null +++ b/bootstrap/sdk/argeo-build @@ -0,0 +1 @@ +Subproject commit 0719a66beb5a861fe351f176e3f69f385a103bc8 diff --git a/bootstrap/sdk/branches/unstable.bnd b/bootstrap/sdk/branches/unstable.bnd new file mode 100644 index 0000000..e69de29