diff options
Diffstat (limited to 'doc/Makefile')
-rw-r--r-- | doc/Makefile | 60 |
1 files changed, 40 insertions, 20 deletions
diff --git a/doc/Makefile b/doc/Makefile index 7fd9b52..59d25d5 100644 --- a/doc/Makefile +++ b/doc/Makefile | |||
@@ -20,8 +20,10 @@ TARGETDEFAULTXMLS := $(shell cd $(REPODIR); ls -1 */default.xml) | |||
20 | # URL and HASH of this manifest repository to be used by the repo tool | 20 | # URL and HASH of this manifest repository to be used by the repo tool |
21 | CURRENTHASH := $(shell git log -1 --pretty=format:%H 2>/dev/null) | 21 | CURRENTHASH := $(shell git log -1 --pretty=format:%H 2>/dev/null) |
22 | CURRENTURL := $(shell git remote show origin | sed -n '/Fetch URL: /s/^.*URL: //p' 2>/dev/null) | 22 | CURRENTURL := $(shell git remote show origin | sed -n '/Fetch URL: /s/^.*URL: //p' 2>/dev/null) |
23 | .PHONY: inittargets | 23 | |
24 | # ****************************************************************** | 24 | # ******************* AutoGenerated chapter from template and target READMEs ******* |
25 | BUILDBOOT_XML := book-enea-linux-release-info/doc/build_boot_generated.xml | ||
26 | BUILDBOOT_TEMPLATE := book-enea-linux-release-info/doc/build_boot_template.xml | ||
25 | 27 | ||
26 | 28 | ||
27 | 29 | ||
@@ -38,11 +40,10 @@ DOCBOOK_FO_USEFOP ?= yes | |||
38 | DOCBOOK_TO_BOOKDIR ?= yes | 40 | DOCBOOK_TO_BOOKDIR ?= yes |
39 | DOCBOOK_CLEANTMP ?= yes | 41 | DOCBOOK_CLEANTMP ?= yes |
40 | 42 | ||
41 | #Components in this subsystem | 43 | #Components (books) in this subsystem |
42 | COMPONENTS := book-enea-linux-release-info book-enea-linux-open-source | 44 | # COMPONENTS := book-enea-linux-release-info book-enea-linux-open-source |
43 | # COMPONENTS += book-enea-linux-eclipse-open-source | 45 | # COMPONENTS += book-enea-linux-eclipse-open-source |
44 | # COMPONENTS += book-enea-linux-target-guide | 46 | COMPONENTS := $(shell ls -d book-enea* ) |
45 | |||
46 | 47 | ||
47 | # -------------------------------------------------------------- | 48 | # -------------------------------------------------------------- |
48 | ifeq ($(VERBOSE),yes) | 49 | ifeq ($(VERBOSE),yes) |
@@ -65,24 +66,23 @@ VALIDATE = no | |||
65 | # Export all parameters including those on the command line | 66 | # Export all parameters including those on the command line |
66 | export | 67 | export |
67 | 68 | ||
68 | .PHONY: doc books docusage | 69 | .PHONY: doc books docusage init initbuild inittargets initpardoc initbuildboot |
69 | 70 | ||
70 | 71 | ||
71 | docusage: | 72 | docusage: |
72 | @echo 'make docusage #Shows this help text' | 73 | @echo 'make docusage #Shows this help text' |
73 | @echo ' DOCBOOK_TOOLS_VERSIONS=yes #Displays DocBook tools versions in this machine' | 74 | @echo ' DOCBOOK_TOOLS_VERSIONS=yes #Displays DocBook tools versions in this machine' |
74 | @echo 'make doc #Builds the userdoc, does autoinit if needed' | 75 | @echo 'make doc #Builds the userdoc, does autoinit if needed' |
75 | @echo 'make init #Init all needed s_* below' | 76 | @echo 'make init #Init all needed init* below' |
76 | @echo 'make initbuild #Init s_docbuild Docbook build system and central files' | 77 | @echo 'make initbuild #Init s_docbuild Docbook build system and central files' |
77 | @echo 'make inittargets #Init s_targets using repo tool Targets in this distro with poky' | 78 | @echo 'make inittargets #Init s_targets using repo tool Targets in this distro with poky' |
78 | @echo 'make initpardoc #Init s_docsrc_common using info from poky/' | 79 | @echo 'make initpardoc #Init s_docsrc_common using info from poky/' |
80 | @echo 'make initbuildboot #Init build_boot chapter from READMEs and template in release info' | ||
79 | @echo ' DOCBOOK_CLEANTMP=no #Option to keep temp files in doc/ and tmp/' | 81 | @echo ' DOCBOOK_CLEANTMP=no #Option to keep temp files in doc/ and tmp/' |
80 | @echo ' BOOK_GLOBALCLONEROOT=yes #Option for all init above to clone all outside the doc directory' | 82 | @echo ' BOOK_GLOBALCLONEROOT=yes #Option for all init above to clone all outside the doc directory' |
81 | @echo ' BOOK_GLOBALCLONEROOT=otherpath #Option for all init above to clone all' | 83 | @echo ' BOOK_GLOBALCLONEROOT=otherpath #Option for all init above to clone all' |
82 | @echo #Force rebuilding (ignore dependency on file times or BL_LABEL)' | ||
83 | @echo ' # Dependency only works if common doc directory is kept' | ||
84 | @echo 'make pullbuild #git pull in s_docbuild' | 84 | @echo 'make pullbuild #git pull in s_docbuild' |
85 | @echo 'make pulltargets #git pull in s_targets' | 85 | @echo 'make pulltargets #git pull in s_targets. You need also initpardoc initbuildboot' |
86 | @echo 'make clean #Clean. Also clean s_* but not any external clones' | 86 | @echo 'make clean #Clean. Also clean s_* but not any external clones' |
87 | @echo '' | 87 | @echo '' |
88 | @echo 'Optional parameters for make doc:' | 88 | @echo 'Optional parameters for make doc:' |
@@ -105,7 +105,7 @@ docusage: | |||
105 | @echo ' DOCBOOK_OLINK_TARGETDB=only #Build a target db for this book (for links into it)' | 105 | @echo ' DOCBOOK_OLINK_TARGETDB=only #Build a target db for this book (for links into it)' |
106 | @echo ' DOCBOOK_OLINK_TARGETDB=yes #Build a target db AND build the book' | 106 | @echo ' DOCBOOK_OLINK_TARGETDB=yes #Build a target db AND build the book' |
107 | @echo ' #Master olinkdb defined in this Makefile, one per generated format, is:' | 107 | @echo ' #Master olinkdb defined in this Makefile, one per generated format, is:' |
108 | @echo ' $(DOCBOOKOLINKDB_BASE)_*.db' | 108 | @echo ' $(DOCBOOKOLINKDB_BASE)_*.db' |
109 | @echo ' Typical examples:' | 109 | @echo ' Typical examples:' |
110 | @echo ' make doc Creates all books, all formats' | 110 | @echo ' make doc Creates all books, all formats' |
111 | @echo ' make doc COMP=book-xxxx FORMAT=html' | 111 | @echo ' make doc COMP=book-xxxx FORMAT=html' |
@@ -124,7 +124,8 @@ ifeq ($(DOCBOOK_TOOLS_VERSIONS),yes) | |||
124 | $(VERB)$(MAKE) -f $(DOCBOOKMAKE)/tools_book_standalone.mk book_tools_versions | 124 | $(VERB)$(MAKE) -f $(DOCBOOKMAKE)/tools_book_standalone.mk book_tools_versions |
125 | endif | 125 | endif |
126 | 126 | ||
127 | init: initbuild inittargets initpardoc | 127 | # We rely on make doing these in order left to right |
128 | init: initbuild inittargets initpardoc initbuildboot | ||
128 | pullall: pullbuild pulltargets | 129 | pullall: pullbuild pulltargets |
129 | 130 | ||
130 | # If no COMP, iterate over books-* in COMPONENTS with make doc | 131 | # If no COMP, iterate over books-* in COMPONENTS with make doc |
@@ -150,7 +151,7 @@ FORMAT=html pdf eclipse | |||
150 | endif | 151 | endif |
151 | 152 | ||
152 | 153 | ||
153 | books: initbuild inittargets initpardoc | 154 | books: init |
154 | # BOOKPACKAGES is defined in all book-*/swcomp.mk | 155 | # BOOKPACKAGES is defined in all book-*/swcomp.mk |
155 | $(VERB)DISTRO_VERSION_MAJOR=`egrep '"EneaLinux_DISTRO_VERSION_MAJOR"' s_docsrc_common/pardoc-distro.xml | sed 's/.*<phrase>//;s/<\/phrase>.*//'` ; \ | 156 | $(VERB)DISTRO_VERSION_MAJOR=`egrep '"EneaLinux_DISTRO_VERSION_MAJOR"' s_docsrc_common/pardoc-distro.xml | sed 's/.*<phrase>//;s/<\/phrase>.*//'` ; \ |
156 | DISTRO_VERSION_MINOR=`egrep '"EneaLinux_DISTRO_VERSION_MINOR"' s_docsrc_common/pardoc-distro.xml | sed 's/.*<phrase>//;s/<\/phrase>.*//'` ; \ | 157 | DISTRO_VERSION_MINOR=`egrep '"EneaLinux_DISTRO_VERSION_MINOR"' s_docsrc_common/pardoc-distro.xml | sed 's/.*<phrase>//;s/<\/phrase>.*//'` ; \ |
@@ -169,8 +170,8 @@ ifeq ($(DOCBOOK_CLEANTMP),yes) | |||
169 | endif | 170 | endif |
170 | endif | 171 | endif |
171 | 172 | ||
172 | # cleaninit cleans ALL tmpcommon and all s_* | 173 | # cleaninit cleans ALL tmpcommon and all s_* and generated build_boot chapter xml |
173 | clean: cleaninit | 174 | clean: cleaninit cleanbuildboot |
174 | $(VERB)rm -rf doc tmp 2>/dev/null | 175 | $(VERB)rm -rf doc tmp 2>/dev/null |
175 | ifneq ($(filter book-%, $(COMPONENTS)),) | 176 | ifneq ($(filter book-%, $(COMPONENTS)),) |
176 | $(VERB)for comp in $(filter book-%, $(COMPONENTS)); do \ | 177 | $(VERB)for comp in $(filter book-%, $(COMPONENTS)); do \ |
@@ -214,12 +215,12 @@ $(TMPCLONEROOT_TARGETS): | |||
214 | 215 | ||
215 | # **************************************************************************** | 216 | # **************************************************************************** |
216 | # ******************** SUPPORT FOR dynamic pardoc with added parameters ****** | 217 | # ******************** SUPPORT FOR dynamic pardoc with added parameters ****** |
218 | # pardoc-distro can contain MAJOR.MINOR-xxxxx keeping -xxxx when replacing MINOR.MINOR from enea.conf | ||
217 | 219 | ||
218 | PATH_DOCSRC_COMMON = $(SUBSYSROOT)/s_docsrc_common | 220 | PATH_DOCSRC_COMMON = $(SUBSYSROOT)/s_docsrc_common |
219 | NAME_DOCSRC_COMMON = docsrc_common | 221 | NAME_DOCSRC_COMMON = docsrc_common |
220 | TMPCLONEROOT_DOCSRC_COMMON := $(TMPCLONEROOT)/$(NAME_DOCSRC_COMMON) | 222 | TMPCLONEROOT_DOCSRC_COMMON := $(TMPCLONEROOT)/$(NAME_DOCSRC_COMMON) |
221 | TMPPARDOC := $(TMPCLONEROOT_DOCSRC_COMMON)/pardoc-distro.xml | 223 | TMPPARDOC := $(TMPCLONEROOT_DOCSRC_COMMON)/pardoc-distro.xml |
222 | .PHONY: initpardoc | ||
223 | 224 | ||
224 | initpardoc: s_docsrc_common | 225 | initpardoc: s_docsrc_common |
225 | 226 | ||
@@ -233,14 +234,33 @@ $(TMPCLONEROOT_DOCSRC_COMMON): s_targets | |||
233 | $(VERB)if [ ! -d "$(TMPCLONEROOT)" ] ; then mkdir -p "$(TMPCLONEROOT)" ; fi | 234 | $(VERB)if [ ! -d "$(TMPCLONEROOT)" ] ; then mkdir -p "$(TMPCLONEROOT)" ; fi |
234 | $(VERB)if [ ! -d $(TMPCLONEROOT_DOCSRC_COMMON) ]; then mkdir -p $(TMPCLONEROOT_DOCSRC_COMMON) ; fi | 235 | $(VERB)if [ ! -d $(TMPCLONEROOT_DOCSRC_COMMON) ]; then mkdir -p $(TMPCLONEROOT_DOCSRC_COMMON) ; fi |
235 | @echo "Copy and patch docsrc_common/ files to $(TMPCLONEROOT_DOCSRC_COMMON)" | 236 | @echo "Copy and patch docsrc_common/ files to $(TMPCLONEROOT_DOCSRC_COMMON)" |
236 | $(VERB)FIRSTTARGET=`ls -1 s_targets/ | head -1`; echo "FIRSTTARGET is $$FIRSTTARGET" ; \ | 237 | $(VERB)FIRSTTARGET=`ls -1 s_targets/ | head -1`; \ |
237 | ENEACONF=s_targets/$$FIRSTTARGET/poky/meta-el-common/conf/distro/enea.conf ; \ | 238 | ENEACONF=s_targets/$$FIRSTTARGET/poky/meta-el-common/conf/distro/enea.conf ; \ |
238 | DISTRO_VERSION_MAJOR=`egrep '^DISTRO_VERSION_MAJOR' $$ENEACONF | sed 's/^[^"]*"//;s/".*//'` ; \ | 239 | DISTRO_VERSION_MAJOR=`egrep '^DISTRO_VERSION_MAJOR' $$ENEACONF | sed 's/^[^"]*"//;s/".*//'` ; \ |
239 | DISTRO_VERSION_MINOR=`egrep '^DISTRO_VERSION_MINOR' $$ENEACONF | sed 's/^[^"]*"//;s/".*//'` ; \ | 240 | DISTRO_VERSION_MINOR=`egrep '^DISTRO_VERSION_MINOR' $$ENEACONF | sed 's/^[^"]*"//;s/".*//'` ; \ |
240 | cat docsrc_common/pardoc-distro.xml | sed '/<\/section>/d' | \ | 241 | cat docsrc_common/pardoc-distro.xml | sed '/<\/section>/d' | \ |
241 | sed '/<!ENTITY ENEA_LINUX_REL_VER/s/".*"/"'"$$DISTRO_VERSION_MAJOR$$DISTRO_VERSION_MINOR"'"/' >$(TMPPARDOC) ; \ | 242 | sed '/<!ENTITY ENEA_LINUX_REL_VER/s/MAJOR.MINOR/'"$$DISTRO_VERSION_MAJOR$$DISTRO_VERSION_MINOR"'/' | \ |
243 | sed '/<!ENTITY . common_poky_entities SYSTEM/s/s_targets\/[^\/]*\/poky/s_targets\/'"$$FIRSTTARGET"'\/poky/' >$(TMPPARDOC) ; \ | ||
242 | echo "<para id=\"EneaLinux_DISTRO_VERSION_MAJOR\"><phrase>$$DISTRO_VERSION_MAJOR</phrase></para>" >>$(TMPPARDOC) ; \ | 244 | echo "<para id=\"EneaLinux_DISTRO_VERSION_MAJOR\"><phrase>$$DISTRO_VERSION_MAJOR</phrase></para>" >>$(TMPPARDOC) ; \ |
243 | echo "<para id=\"EneaLinux_DISTRO_VERSION_MINOR\"><phrase>$$DISTRO_VERSION_MINOR</phrase></para>" >>$(TMPPARDOC) ; \ | 245 | echo "<para id=\"EneaLinux_DISTRO_VERSION_MINOR\"><phrase>$$DISTRO_VERSION_MINOR</phrase></para>" >>$(TMPPARDOC) ; \ |
244 | echo "</section>" >>$(TMPPARDOC) | 246 | echo "</section>" >>$(TMPPARDOC) |
245 | 247 | ||
246 | # **************************************************************************** | 248 | # **************************************************************************** |
249 | # ***** Create XML chapter with build/boot commands from all README files in s_targets | ||
250 | |||
251 | initbuildboot: $(BUILDBOOT_XML) | ||
252 | |||
253 | cleanbuildboot: | ||
254 | $(VERB)rm -f $(BUILDBOOT_XML) 2>/dev/null | ||
255 | |||
256 | |||
257 | $(BUILDBOOT_XML): s_targets $(BUILDBOOT_TEMPLATE) | ||
258 | @echo "Creating $(BUILDBOOT_XML) from READMEs" | ||
259 | $(VERB)INITBB_CMD=initbuildboot.sh ; \ | ||
260 | if [ -f "$$INITBB_CMD" ]; then \ | ||
261 | sh "$$INITBB_CMD" -xml $(BUILDBOOT_XML) -template $(BUILDBOOT_TEMPLATE) ; \ | ||
262 | else \ | ||
263 | echo "ERROR: Missing $$INITBB_CMD, can not create $(BUILDBOOT_XML)"; exit 10; \ | ||
264 | fi | ||
265 | |||
266 | # **************************************************************************** | ||