summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Johansson <lennart.johansson@enea.com>2016-10-20 10:04:03 +0200
committerLennart Johansson <lennart.johansson@enea.com>2016-10-20 10:04:03 +0200
commitb828d67c8c429c2b1bf87d2f890607c378d55200 (patch)
tree5204238593fc223d2b3fe00a0eadf212ec7515d0
parenta20ee6c555e45432dde7d02a4dcfce878e296859 (diff)
downloadel_releases-networking-b828d67c8c429c2b1bf87d2f890607c378d55200.tar.gz
Extract list of targets from manifest, instead of hardcoded
This list was hardcoded in Makefile before. Do this by cloning the manifest repo to see the targets. Support both ref/tags/<tag> and hashvalue i.e. same as the repo command supports. Signed-off-by: Lennart Johansson <lennart.johansson@enea.com>
-rw-r--r--doc/Makefile82
-rw-r--r--doc/book-enea-linux-release-info/doc/about_release.xml34
2 files changed, 73 insertions, 43 deletions
diff --git a/doc/Makefile b/doc/Makefile
index ebb086c..c7569e9 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -2,12 +2,12 @@
2SUBSYSROOT := $(shell pwd) 2SUBSYSROOT := $(shell pwd)
3 3
4# NOTE: MANIFESTHASH in manifest_conf.mk needs to be the final release tag before a release 4# NOTE: MANIFESTHASH in manifest_conf.mk needs to be the final release tag before a release
5# The manifest_conf.mk defines MANIFESTHASH and MANIFESTURL and PROFILE_NAME 5# The manifest_conf.mk defines MANIFESTHASH and MANIFESTURL and PROFILE_NAME(on front+footers)
6include manifest_conf.mk 6include manifest_conf.mk
7MANIFESTDIR := $(shell echo "$(MANIFESTURL)" | sed 's/.*\///;s/\.git//')
7 8
8# An alternative is to clone the manifest repository and extract the list of target manifest files from that 9# Further down we extract the list of target manifest file names from the manifest itself
9# We need all to get all README, but only first in alphabetic list is used to extract info from poky/ 10# We need all to get all README, but only first in alphabetic list is used to extract info from poky/
10TARGETDEFAULTXMLS := p2041rdb/default.xml
11 11
12 12
13# ***************** Generic docbuild.git auto-clone + s_docbuild symlink *** 13# ***************** Generic docbuild.git auto-clone + s_docbuild symlink ***
@@ -22,6 +22,7 @@ NAME_TARGETS := targets
22DOCBASEDIR=$(shell pwd) 22DOCBASEDIR=$(shell pwd)
23REPODIR=$(DOCBASEDIR)/.. 23REPODIR=$(DOCBASEDIR)/..
24TMPCLONEROOT_TARGETS := $(TMPCLONEROOT)/$(NAME_TARGETS) 24TMPCLONEROOT_TARGETS := $(TMPCLONEROOT)/$(NAME_TARGETS)
25TMPCLONEROOT_MANIFEST := $(TMPCLONEROOT)/manifest
25 26
26 27
27# ******************* AutoGenerated chapter from template and target READMEs ******* 28# ******************* AutoGenerated chapter from template and target READMEs *******
@@ -70,29 +71,34 @@ VALIDATE = no
70# Export all parameters including those on the command line 71# Export all parameters including those on the command line
71export 72export
72 73
73.PHONY: doc books docusage init initbuild inittargets initpardoc initbuildboot dist 74.PHONY: doc books docusage init initbuild initmanifest inittargets initpardoc initbuildboot dist
74 75
75 76
76docusage: 77docusage:
77 @echo 'make docusage #Shows this help text' 78 @echo 'make docusage #Shows this help text'
78 @echo ' DOCBOOK_TOOLS_VERSIONS=yes #Displays DocBook tools versions in this machine' 79 @echo ' DOCBOOK_TOOLS_VERSIONS=yes #Displays DocBook tools versions in this machine'
79 @echo 'make doc #Builds the userdoc, does automatically also init if needed' 80 @echo 'make doc #Builds doc. ALSO automatically does all inits if needed'
80 @echo 'make dist BOOK_DIST_DIR=xx/doc #Builds doc and copies results to BOOK_DIST_DIR' 81 @echo 'make dist BOOK_DIST_DIR=xx/doc #Builds doc as above and copies results to BOOK_DIST_DIR'
81 @echo ' #Does not work with DOCBOOK_TO_BOOKDIR or BOOK_BUILD_DIR' 82 @echo ' # Does not work with DOCBOOK_TO_BOOKDIR or BOOK_BUILD_DIR'
82 @echo ' #Currently EclipseHelp formated doc will not be in BOOK_DIST_DIR' 83 @echo ' BOOK_DIST_ECLIPSE=yes #Currently EclipseHelp formated doc will not be in BOOK_DIST_DIR'
83 @echo ' # unless BOOK_DIST_ECLIPSE is set to yes' 84 @echo ' # unless BOOK_DIST_ECLIPSE is set to yes'
84 @echo 'make init #Init all needed init* below' 85 @echo 'make init #Init all needed init* below'
85 @echo 'make initbuild #Init s_docbuild Docbook build system and central files' 86 @echo 'make initbuild #Init s_docbuild Docbook build system and central files'
86 @echo 'make inittargets #Init s_targets using repo tool Targets in this distro with poky' 87 @echo 'make initmanifest #Init s_manifest by cloning, to detect which targets are included'
87 @echo 'make initpardoc #Init s_docsrc_common using info from poky/' 88 @echo 'make inittargets #Init s_targets using repo tool. Targets in this distro with poky'
89 @echo 'make initpardoc #Init s_docsrc_common with extracted parameters/'
88 @echo 'make initbuildboot #Init build_boot chapter from READMEs and template in release info' 90 @echo 'make initbuildboot #Init build_boot chapter from READMEs and template in release info'
91 @echo 'make initissues #Init known issues section from Jira'
92 @echo ' MANIFESTHASH=xxxxx #Option for all inits above to use nondefault manifest version'
93 @echo ' #It shall either be ref/tags/<tagvalue> or a hashvalue'
94 @echo ' #Configured tag or hashvalue $(MANIFESTHASH)'
95 @echo ' #Configured MANIFESTURL $(MANIFESTURL)'
96 @echo ' #Configured PROFILE_NAME $(PROFILE_NAME)'
89 @echo ' DOCBOOK_CLEANTMP=no #Option to keep temp files in doc/ and tmp/' 97 @echo ' DOCBOOK_CLEANTMP=no #Option to keep temp files in doc/ and tmp/'
90 @echo ' BOOK_GLOBALCLONEROOT=yes #Option for all init above to clone all outside the doc directory' 98 @echo ' BOOK_GLOBALCLONEROOT=yes #Option for all init above to clone all outside the doc directory'
91 @echo ' BOOK_GLOBALCLONEROOT=otherpath #Option for all init above to clone all to given path' 99 @echo ' BOOK_GLOBALCLONEROOT=otherpath #Option for all init above to clone all to given path'
92 @echo ' MANIFESTHASH=xxxxx #Option for all init above to use nondefault MANIFEST in repo cmd'
93 @echo 'make pullbuild #git pull in s_docbuild' 100 @echo 'make pullbuild #git pull in s_docbuild'
94 @echo 'make pulltargets #git pull in s_targets. You need also initpardoc initbuildboot' 101 @echo 'make clean #Clean results and all s_*, but not any external clones'
95 @echo 'make clean #Clean. Also clean s_* but not any external clones'
96 @echo '' 102 @echo ''
97 @echo 'Optional parameters for make doc:' 103 @echo 'Optional parameters for make doc:'
98 @echo ' COMP=<book-directory> #Component (book) to build. Book component names are book-*' 104 @echo ' COMP=<book-directory> #Component (book) to build. Book component names are book-*'
@@ -121,7 +127,7 @@ docusage:
121 @echo ' make doc COMP=book-xxxx FORMAT=html' 127 @echo ' make doc COMP=book-xxxx FORMAT=html'
122 @echo ' make doc COMP=book-xxxx FORMAT=pdf' 128 @echo ' make doc COMP=book-xxxx FORMAT=pdf'
123 @echo ' make doc BL_LABEL="Version 1.2.3" Creates all with version in footers and front' 129 @echo ' make doc BL_LABEL="Version 1.2.3" Creates all with version in footers and front'
124 130 @echo ''
125 @echo ' Requires docbook-xsl-1.76.1 or later, docbook-xml 4.2, svg1.1, fop-1.0 + fop-hyph.jar' 131 @echo ' Requires docbook-xsl-1.76.1 or later, docbook-xml 4.2, svg1.1, fop-1.0 + fop-hyph.jar'
126 @echo ' fop + the separate fop-hyph can be found together in package "libfop-java"' 132 @echo ' fop + the separate fop-hyph can be found together in package "libfop-java"'
127 @echo ' otherwise fetch fop-hyph.jar and place in same place as fop.jar' 133 @echo ' otherwise fetch fop-hyph.jar and place in same place as fop.jar'
@@ -135,8 +141,8 @@ ifeq ($(DOCBOOK_TOOLS_VERSIONS),yes)
135endif 141endif
136 142
137# We rely on make doing these in order left to right 143# We rely on make doing these in order left to right
138init: initbuild inittargets initpardoc initbuildboot initpkgdiff initissues 144init: initbuild initmanifest inittargets initpardoc initbuildboot initpkgdiff initissues
139pullall: pullbuild pulltargets 145pullall: pullbuild
140 146
141# If no COMP, iterate over books-* in COMPONENTS with make doc 147# If no COMP, iterate over books-* in COMPONENTS with make doc
142ifeq ($(COMP),) 148ifeq ($(COMP),)
@@ -193,8 +199,9 @@ ifeq ($(DOCBOOK_CLEANTMP),yes)
193endif 199endif
194endif 200endif
195 201
196# cleaninit cleans ALL tmpcommon and all s_* and generated build_boot chapter xml 202# cleaninit cleans ALL tmpcommon and all s_*
197clean: cleaninit cleanbuildboot cleanpkgdiff cleanissues 203clean: cleaninit cleanbuildboot cleanpkgdiff cleanissues
204 @echo "Cleaning build results and temporary files"
198 $(VERB)rm -rf doc tmp 2>/dev/null 205 $(VERB)rm -rf doc tmp 2>/dev/null
199ifneq ($(filter book-%, $(COMPONENTS)),) 206ifneq ($(filter book-%, $(COMPONENTS)),)
200 $(VERB)for comp in $(filter book-%, $(COMPONENTS)); do \ 207 $(VERB)for comp in $(filter book-%, $(COMPONENTS)); do \
@@ -206,26 +213,45 @@ endif
206 213
207# ****************************************************************** 214# ******************************************************************
208# ****************** SUPPORT FOR TARGETS *************************** 215# ****************** SUPPORT FOR TARGETS ***************************
216initmanifest: s_manifest
209inittargets: s_targets 217inittargets: s_targets
210pulltargets:
211 $(VERB)if [ ! -d s_targets ]; then echo "ERROR: No s_targets exists?" ; exit 10 ; fi
212 $(VERB)cd s_targets; for targ in *; do ( cd $targ ; git pull )
213 218
214 219
215# ----------------------------------------- 220# -----------------------------------------
221# We only clone the manifest to be able to autodetect which targets are in it
222# git clone requires only the tag string e.g. EL6, not the entire ref/tags/EL6 that repo requires
223# git clone -b hashvalue is not supported. We must first clone, then git checkout hashvalue
224# These steps work also for a tag so we could use the same stepwise code
225
226s_manifest: $(TMPCLONEROOT_MANIFEST)
227 $(VERB)rm s_manifest 2>/dev/null; ln -s $(TMPCLONEROOT_MANIFEST) s_manifest
216 228
217# Use repo to auto-clone each target separately - VERY LARGE if there are many targets (5 targets => about 1.3 Gytes) 229$(TMPCLONEROOT_MANIFEST):
230 $(VERB)if [ ! -d "$(TMPCLONEROOT)" ] ; then mkdir -p "$(TMPCLONEROOT)" ; fi
231 $(VERB)if [ ! -d "$(TMPCLONEROOT_MANIFEST)" ]; then mkdir -p "$(TMPCLONEROOT_MANIFEST)" ; fi
232 $(VERB) MBRANCH=`echo "$(MANIFESTHASH)" | sed 's/.*\///'`; \
233 echo "**** Cloning manifest version $$MBRANCH of $(MANIFESTURL) in $(TMPCLONEROOT_MANIFEST)" ; \
234 cd "$(TMPCLONEROOT_MANIFEST)"; git clone $(MANIFESTURL) ; cd $(MANIFESTDIR) ; git checkout $(MANIFESTHASH)
235 $(VERB)if [ ! -d "$(TMPCLONEROOT_MANIFEST)/$(MANIFESTDIR)" ]; then echo "ERROR: Missing $(TMPCLONEROOT_MANIFEST)/$(MANIFESTDIR)"; exit 10 ; fi ; \
236 TARGETDEFAULTXMLS=`cd $(TMPCLONEROOT_MANIFEST)/$(MANIFESTDIR); ls -1 */default.xml 2>/dev/null` ; \
237 echo "$$TARGETDEFAULTXMLS" | tr '\n' ' ' >$(TMPCLONEROOT_MANIFEST)/targetdefaultxmls.txt ; \
238 echo "$$TARGETDEFAULTXMLS" | sed 's/\/.*//' | tr '\n' ' ' >$(TMPCLONEROOT_MANIFEST)/targetids.txt
239
240# -----------------------------------------
241# Use repo to auto-clone each target separately - VERY LARGE if there are many targets (5 targets => about 1.3 Gbytes)
218 242
219s_targets: $(TMPCLONEROOT_TARGETS) 243s_targets: $(TMPCLONEROOT_TARGETS)
220 $(VERB)rm s_targets 2>/dev/null; ln -s $(TMPCLONEROOT_TARGETS) s_targets 244 $(VERB)rm s_targets 2>/dev/null; ln -s $(TMPCLONEROOT_TARGETS) s_targets
221 245
222 246
223$(TMPCLONEROOT_TARGETS): 247$(TMPCLONEROOT_TARGETS): s_manifest
224 $(VERB)if [ ! -d "$(TMPCLONEROOT)" ] ; then mkdir -p "$(TMPCLONEROOT)" ; fi 248 $(VERB)if [ ! -d "$(TMPCLONEROOT)" ] ; then mkdir -p "$(TMPCLONEROOT)" ; fi
225 $(VERB)if [ ! -d $(TMPCLONEROOT_TARGETS) ]; then mkdir -p $(TMPCLONEROOT_TARGETS) ; fi 249 $(VERB)if [ ! -d $(TMPCLONEROOT_TARGETS) ]; then mkdir -p $(TMPCLONEROOT_TARGETS) ; fi
226 @echo "**** Cloning all targets using repo tool into $(TMPCLONEROOT_TARGETS)" 250 @echo "**** Cloning all targets using repo tool into $(TMPCLONEROOT_TARGETS)"
227 @echo "TARGETDEFAULTXMLS is <$(TARGETDEFAULTXMLS)>" 251 $(VERB)if [ ! -f "$(TMPCLONEROOT_MANIFEST)/targetdefaultxmls.txt" ]; then echo "ERROR: Missing $(TMPCLONEROOT_MANIFEST)/targetdefaultxmls.txt"; exit 10; fi
228 $(VERB)for target_default_xml in $(TARGETDEFAULTXMLS); \ 252 $(VERB)TARGETDEFAULTXMLS=`cat "$(TMPCLONEROOT_MANIFEST)/targetdefaultxmls.txt" 2>/dev/null` ; \
253 echo "Info: TARGETDEFAULTXMLS is $$TARGETDEFAULTXMLS" ; \
254 for target_default_xml in $$TARGETDEFAULTXMLS; \
229 do \ 255 do \
230 TARGDIR=$(TMPCLONEROOT_TARGETS)/`dirname $$target_default_xml` ; \ 256 TARGDIR=$(TMPCLONEROOT_TARGETS)/`dirname $$target_default_xml` ; \
231 echo "TARGDIR=<$$TARGDIR>" ; \ 257 echo "TARGDIR=<$$TARGDIR>" ; \
@@ -248,6 +274,7 @@ TMPPARDOC := $(TMPCLONEROOT_DOCSRC_COMMON)/pardoc-distro.xml
248initpardoc: s_docsrc_common 274initpardoc: s_docsrc_common
249 275
250cleanpardoc: 276cleanpardoc:
277 @echo "Cleaning dynamic parameters"
251 $(VERB)rm -rf $(TMPCLONEROOT_DOCSRC_COMMON) ; rm s_docsrc_common 278 $(VERB)rm -rf $(TMPCLONEROOT_DOCSRC_COMMON) ; rm s_docsrc_common
252 279
253s_docsrc_common: $(TMPCLONEROOT_DOCSRC_COMMON) 280s_docsrc_common: $(TMPCLONEROOT_DOCSRC_COMMON)
@@ -258,8 +285,10 @@ $(TMPCLONEROOT_DOCSRC_COMMON): s_targets
258 $(VERB)if [ ! -d $(TMPCLONEROOT_DOCSRC_COMMON) ]; then mkdir -p $(TMPCLONEROOT_DOCSRC_COMMON) ; fi 285 $(VERB)if [ ! -d $(TMPCLONEROOT_DOCSRC_COMMON) ]; then mkdir -p $(TMPCLONEROOT_DOCSRC_COMMON) ; fi
259 @echo "**** Copy and patch docsrc_common/ files to $(TMPCLONEROOT_DOCSRC_COMMON)" 286 @echo "**** Copy and patch docsrc_common/ files to $(TMPCLONEROOT_DOCSRC_COMMON)"
260 @echo "*** Add parameters from first target's enea.conf and add manifest parameters" 287 @echo "*** Add parameters from first target's enea.conf and add manifest parameters"
261 $(VERB)FIRSTTARGET=`ls -1 s_targets/ | head -1`; \ 288 $(VERB)FIRSTTARGET=`ls -1 s_targets/ 2>/dev/null | head -1`; \
289 if [ "$$FIRSTTARGET" = "" ]; then echo "ERROR: No targets?" ; exit 10; fi ; \
262 ENEACONF=s_targets/$$FIRSTTARGET/poky/meta-el-common/conf/distro/enea.conf ; \ 290 ENEACONF=s_targets/$$FIRSTTARGET/poky/meta-el-common/conf/distro/enea.conf ; \
291 if [ ! -f "$$ENEACONF" ]; then echo "ERROR: No $$ENEACONF?" ; exit 10; fi ; \
263 DISTRO_VERSION_MAJOR=`egrep '^DISTRO_VERSION_MAJOR' $$ENEACONF | sed 's/^[^"]*"//;s/".*//'` ; \ 292 DISTRO_VERSION_MAJOR=`egrep '^DISTRO_VERSION_MAJOR' $$ENEACONF | sed 's/^[^"]*"//;s/".*//'` ; \
264 DISTRO_VERSION_MINOR=`egrep '^DISTRO_VERSION_MINOR' $$ENEACONF | sed 's/^[^"]*"//;s/".*//'` ; \ 293 DISTRO_VERSION_MINOR=`egrep '^DISTRO_VERSION_MINOR' $$ENEACONF | sed 's/^[^"]*"//;s/".*//'` ; \
265 cat docsrc_common/pardoc-distro.xml | sed '/<\/section>/d' | \ 294 cat docsrc_common/pardoc-distro.xml | sed '/<\/section>/d' | \
@@ -278,6 +307,7 @@ $(TMPCLONEROOT_DOCSRC_COMMON): s_targets
278initbuildboot: $(BUILDBOOT_XML) 307initbuildboot: $(BUILDBOOT_XML)
279 308
280cleanbuildboot: 309cleanbuildboot:
310 @echo "Cleaning generated build-boot command document file"
281 $(VERB)rm -f $(BUILDBOOT_XML) 2>/dev/null 311 $(VERB)rm -f $(BUILDBOOT_XML) 2>/dev/null
282 312
283 313
@@ -296,6 +326,7 @@ $(BUILDBOOT_XML): s_targets $(BUILDBOOT_TEMPLATE)
296initpkgdiff: $(PKGDIFF_GEN_XML) 326initpkgdiff: $(PKGDIFF_GEN_XML)
297 327
298cleanpkgdiff: 328cleanpkgdiff:
329 @echo "Cleaning generated package diff document file"
299 $(VERB)rm -f $(PKGDIFF_GEN_XML) 2>/dev/null 330 $(VERB)rm -f $(PKGDIFF_GEN_XML) 2>/dev/null
300 331
301$(PKGDIFF_GEN_XML): 332$(PKGDIFF_GEN_XML):
@@ -313,6 +344,7 @@ $(PKGDIFF_GEN_XML):
313initissues: $(JIRA_ISSUES_GEN_XML) 344initissues: $(JIRA_ISSUES_GEN_XML)
314 345
315cleanissues: 346cleanissues:
347 @echo "Cleaning generated known issues document file"
316 $(VERB)rm -f $(JIRA_ISSUES_GEN_XML) 2>/dev/null 348 $(VERB)rm -f $(JIRA_ISSUES_GEN_XML) 2>/dev/null
317 349
318$(JIRA_ISSUES_GEN_XML): 350$(JIRA_ISSUES_GEN_XML):
diff --git a/doc/book-enea-linux-release-info/doc/about_release.xml b/doc/book-enea-linux-release-info/doc/about_release.xml
index 3e5bcd6..6907507 100644
--- a/doc/book-enea-linux-release-info/doc/about_release.xml
+++ b/doc/book-enea-linux-release-info/doc/about_release.xml
@@ -131,19 +131,16 @@
131 <row> 131 <row>
132 <entry>Poky</entry> 132 <entry>Poky</entry>
133 133
134 <entry> 134 <entry><para>Git commit id:</para>
135 <para>Git commit id:</para> 135 <para>75ca53211488a3e268037a44ee2a7ac5c7181bd2</para><remark>Problem:
136 <para>75ca53211488a3e268037a44ee2a7ac5c7181bd2</para> 136 Unfortunately the poky version in poky.ent is not correct unless
137 </entry> 137 the EL release would be based on a Yocto release, so we can not
138 138 use that here. This is a problem because we don't want to manually
139 <remark> 139 edit the git commit ID in this file? The poky version in poky.ent
140 The auto-fetched version is not correct unless the EL release is 140 is just now <xi:include
141 based on a Yocto release tag. 141 href="../../s_docsrc_common/pardoc-distro.xml"
142 <entry><xi:include href="../../s_docsrc_common/pardoc-distro.xml"
143 xmlns:xi="http://www.w3.org/2001/XInclude" 142 xmlns:xi="http://www.w3.org/2001/XInclude"
144 xpointer="element(Poky_VER/1)" /><remark>INFO: Auto-fetched from 143 xpointer="element(Poky_VER/1)" /></remark></entry>
145 poky.ent via pardoc-distro.xml</remark></entry>
146 </remark>
147 </row> 144 </row>
148 145
149 <row> 146 <row>
@@ -310,8 +307,8 @@
310 </listitem> 307 </listitem>
311 308
312 <listitem> 309 <listitem>
313 <para><trademark class="registered">Enea</trademark> Linux 310 <para><trademark class="registered">Enea</trademark> Linux Networking
314 Networking Profile Guide</para> 311 Profile Guide</para>
315 </listitem> 312 </listitem>
316 313
317 <listitem> 314 <listitem>
@@ -329,13 +326,14 @@
329 </listitem> 326 </listitem>
330 327
331 <listitem> 328 <listitem>
332 <para><trademark class="registered">Enea</trademark> Linux 6 Test Report</para> 329 <para><trademark class="registered">Enea</trademark> Linux 6 Test
330 Report</para>
333 </listitem> 331 </listitem>
334 332
335 <listitem> 333 <listitem>
336 <para><trademark 334 <para><trademark class="registered">Enea</trademark> Linux Real-Time
337 class="registered">Enea</trademark> Linux Real-Time Guide can be read at 335 Guide can be read at <ulink
338 <ulink url="http://linuxrealtime.org">http://linuxrealtime.org</ulink>.</para> 336 url="http://linuxrealtime.org">http://linuxrealtime.org</ulink>.</para>
339 </listitem> 337 </listitem>
340 </itemizedlist> 338 </itemizedlist>
341 </section> 339 </section>