6 OSGI_CORE_VERSION
=7.0.0
7 OSGI_CMPN_VERSION
=7.0.0
8 OSGI_ANNOTATION_VERSION
=7.0.0
11 ORIGIN_BASE
=$(HOME
)/.cache
/argeo
/build
/origin
12 SDK_BUILD_BASE ?
= .
/output
13 BOOTSTRAP_BASE
=$(SDK_BUILD_BASE
)/bootstrap
16 ECJ_SRC
=$(ECJ_BASE
)/OSGI-OPT
/src
19 BNDLIB_SRC
=$(BNDLIB_BASE
)/OSGI-OPT
/src
21 OSGI_BASE
=$(BOOTSTRAP_BASE
)/osgi
24 $(ORIGIN_BASE
)/ecjsrc-
$(ECJ_VERSION
).jar \
25 $(ORIGIN_BASE
)/org.osgi
/osgi.core-
$(OSGI_CORE_VERSION
)-sources.jar \
26 $(ORIGIN_BASE
)/org.osgi
/osgi.cmpn-
$(OSGI_CMPN_VERSION
)-sources.jar \
27 $(ORIGIN_BASE
)/org.osgi
/osgi.annotation-
$(OSGI_ANNOTATION_VERSION
)-sources.jar \
28 $(ORIGIN_BASE
)/org.slf4j
/slf4j-api-
$(SLF4J_VERSION
)-sources.jar \
29 $(ORIGIN_BASE
)/bnd-
$(BND_VERSION
).
tar.gz
31 all: ecj-build bndlib-build
32 make
-C org.argeo.tp.build
all
35 mkdir
-p
$(BOOTSTRAP_BASE
)
37 find
$(ECJ_BASE
)/OSGI-OPT
/src | grep
"\.java" > $(BOOTSTRAP_BASE
)/ecj.todo
39 $(JAVA_HOME
)/bin
/javac
-d
$(ECJ_BASE
) -source
17 -target
17 -Xlint
:none @
$(BOOTSTRAP_BASE
)/ecj.todo
41 bndlib-build
: ecj-build
42 $(JAVA_HOME
)/bin
/java
-cp
$(ECJ_BASE
) org.eclipse.jdt.internal.compiler.batch.Main
-nowarn \
43 -source
17 -target
17 \
48 $(RM
) -rf
$(BOOTSTRAP_BASE
)
49 find
$(ECJ_BASE
) -name
"*.class" -type f
-exec
rm -f
{} \
;
50 find
$(BNDLIB_BASE
) -name
"*.class" -type f
-exec
rm -f
{} \
;
51 make
-C org.argeo.tp.build
clean
59 $(RM
) -rf
$(BNDLIB_BASE
)
60 rm -rf org.argeo.tp.build
/biz.aQute.bndlib
/src
62 bootstrap-prepare-sources
: bootstrap-download-sources
65 cd
$(ECJ_BASE
) && jar
-xf
$(ORIGIN_BASE
)/ecjsrc-
$(ECJ_VERSION
).jar
66 # remove ant-dependent class
67 $(RM
) $(ECJ_BASE
)/org
/eclipse
/jdt
/core
/JDTCompilerAdapter.java
69 $(RM
) $(ECJ_BASE
)/*.jar
70 $(RM
) $(ECJ_BASE
)/build.xml
71 $(RM
) $(ECJ_BASE
)/ecj
.1
72 $(RM
) -rf
$(ECJ_BASE
)/scripts
73 # TODO: keep the service files
74 $(RM
) -rf
$(ECJ_BASE
)/META-INF
76 # copy sources and resources
78 cp
-r
$(ECJ_BASE
)/org
$(ECJ_SRC
)
80 cd
$(ECJ_BASE
) && find org
-name
"*.java" -type f
-exec
rm -f
{} \
;
81 cd
$(ECJ_BASE
) && find org
-name
"*.html" -type f
-exec
rm -f
{} \
;
85 mkdir
-p
$(BOOTSTRAP_BASE
)
86 cd
$(BOOTSTRAP_BASE
) && tar -xzf
$(ORIGIN_BASE
)/bnd-
$(BND_VERSION
).
tar.gz
87 mkdir
-p
$(BNDLIB_SRC
)
88 cp
-r
$(BOOTSTRAP_BASE
)/bnd-
$(BND_VERSION
).REL
/aQute.libg
/src
/* $(BNDLIB_SRC
)
89 cp
-r
$(BOOTSTRAP_BASE
)/bnd-
$(BND_VERSION
).REL
/biz.aQute.bndlib
/src
/* $(BNDLIB_SRC
)
90 cp
-r
$(BOOTSTRAP_BASE
)/bnd-
$(BND_VERSION
).REL
/biz.aQute.bnd.annotation
/src
/* $(BNDLIB_SRC
)
91 $(RM
) -rf
$(BOOTSTRAP_BASE
)/bnd-
$(BND_VERSION
).REL
95 cd
$(OSGI_BASE
) && jar
-xf
$(ORIGIN_BASE
)/org.osgi
/osgi.core-
$(OSGI_CORE_VERSION
)-sources.jar
96 cd
$(OSGI_BASE
) && jar
-xf
$(ORIGIN_BASE
)/org.osgi
/osgi.cmpn-
$(OSGI_CMPN_VERSION
)-sources.jar
97 cd
$(OSGI_BASE
) && jar
-xf
$(ORIGIN_BASE
)/org.osgi
/osgi.annotation-
$(OSGI_ANNOTATION_VERSION
)-sources.jar
99 mkdir
-p
$(BNDLIB_SRC
)/org
/osgi
/service
100 cp
-r
$(OSGI_BASE
)/org
/osgi
/annotation
$(BNDLIB_SRC
)/org
/osgi
101 cp
-r
$(OSGI_BASE
)/org
/osgi
/resource
$(BNDLIB_SRC
)/org
/osgi
102 cp
-r
$(OSGI_BASE
)/org
/osgi
/framework
$(BNDLIB_SRC
)/org
/osgi
103 cp
-r
$(OSGI_BASE
)/org
/osgi
/namespace
$(BNDLIB_SRC
)/org
/osgi
104 cp
-r
$(OSGI_BASE
)/org
/osgi
/util
$(BNDLIB_SRC
)/org
/osgi
105 cp
-r
$(OSGI_BASE
)/org
/osgi
/dto
$(BNDLIB_SRC
)/org
/osgi
106 cp
-r
$(OSGI_BASE
)/org
/osgi
/service
/repository
$(BNDLIB_SRC
)/org
/osgi
/service
107 cp
-r
$(OSGI_BASE
)/org
/osgi
/service
/log
$(BNDLIB_SRC
)/org
/osgi
/service
110 cd
$(BNDLIB_SRC
) && jar
-xf
$(ORIGIN_BASE
)/org.slf4j
/slf4j-api-
$(SLF4J_VERSION
)-sources.jar
111 $(RM
) -rf
$(BNDLIB_SRC
)/META-INF
112 cp
-rv ..
/rebuild
/org.argeo.tp
/org.argeo.ext.slf4j
/src
/* $(BNDLIB_SRC
)
115 $(RM
) -rf
$(BNDLIB_SRC
)/aQute
/bnd
/annotation
/spi
116 $(RM
) -rf
$(BNDLIB_SRC
)/aQute
/bnd
/junit
118 mkdir
-p org.argeo.tp.build
/biz.aQute.bndlib
/src
119 cp
-r ..
/rebuild
/org.argeo.tp
/org.argeo.ext.slf4j
/src
/* org.argeo.tp.build
/biz.aQute.bndlib
/src
121 # make sure directory is clean
124 bootstrap-download-sources
: $(SOURCE_ARCHIVES
)
126 $(ORIGIN_BASE
)/ecjsrc-
$(ECJ_VERSION
).jar
:
127 mkdir
-p
$(ORIGIN_BASE
)
128 wget
-c
-O
$(ORIGIN_BASE
)/ecjsrc-
$(ECJ_VERSION
).jar https
://ftp-stud.hs-esslingen.de
/Mirrors
/eclipse
/eclipse
/downloads
/drops4
/R-4.26
-202211231800/ecjsrc-
$(ECJ_VERSION
).jar
130 $(ORIGIN_BASE
)/bnd-
$(BND_VERSION
).
tar.gz
:
131 mkdir
-p
$(ORIGIN_BASE
)
132 wget
-c
-O
$(ORIGIN_BASE
)/bnd-
$(BND_VERSION
).
tar.gz https
://github.com
/bndtools
/bnd
/archive
/refs
/tags/$(BND_VERSION
).REL.
tar.gz
134 $(ORIGIN_BASE
)/org.osgi
/osgi.core-
$(OSGI_CORE_VERSION
)-sources.jar
:
135 mkdir
-p
$(ORIGIN_BASE
)/org.osgi
136 wget
-c
-O
$(ORIGIN_BASE
)/org.osgi
/osgi.core-
$(OSGI_CORE_VERSION
)-sources.jar https
://repo1.maven.org
/maven2
/org
/osgi
/osgi.core
/$(OSGI_CORE_VERSION
)/osgi.core-
$(OSGI_CORE_VERSION
)-sources.jar
138 $(ORIGIN_BASE
)/org.osgi
/osgi.cmpn-
$(OSGI_CMPN_VERSION
)-sources.jar
:
139 mkdir
-p
$(ORIGIN_BASE
)/org.osgi
140 wget
-c
-O
$(ORIGIN_BASE
)/org.osgi
/osgi.cmpn-
$(OSGI_CMPN_VERSION
)-sources.jar https
://repo1.maven.org
/maven2
/org
/osgi
/osgi.cmpn
/$(OSGI_CMPN_VERSION
)/osgi.cmpn-
$(OSGI_CMPN_VERSION
)-sources.jar
142 $(ORIGIN_BASE
)/org.osgi
/osgi.annotation-
$(OSGI_ANNOTATION_VERSION
)-sources.jar
:
143 mkdir
-p
$(ORIGIN_BASE
)/org.osgi
144 wget
-c
-O
$(ORIGIN_BASE
)/org.osgi
/osgi.annotation-
$(OSGI_ANNOTATION_VERSION
)-sources.jar https
://repo1.maven.org
/maven2
/org
/osgi
/osgi.annotation
/$(OSGI_ANNOTATION_VERSION
)/osgi.annotation-
$(OSGI_ANNOTATION_VERSION
)-sources.jar
146 $(ORIGIN_BASE
)/org.slf4j
/slf4j-api-
$(SLF4J_VERSION
)-sources.jar
:
147 mkdir
-p
$(ORIGIN_BASE
)/org.slf4j
148 wget
-c
-O
$(ORIGIN_BASE
)/org.slf4j
/slf4j-api-
$(SLF4J_VERSION
)-sources.jar https
://repo1.maven.org
/maven2
/org
/slf4j
/slf4j-api
/$(SLF4J_VERSION
)/slf4j-api-
$(SLF4J_VERSION
)-sources.jar