diff options
author | Lennart Johansson <lennart.johansson@enea.com> | 2016-06-03 12:45:00 +0200 |
---|---|---|
committer | Lennart Johansson <lennart.johansson@enea.com> | 2016-06-03 12:45:00 +0200 |
commit | da05e9b9d3484d072a50be6237b0e9917ea04c7b (patch) | |
tree | f41851bc0bf4e466b09a28f5134589c8b4cb27e2 | |
parent | 8decb3267be14596c377155d6bc84a0eb61f04e9 (diff) | |
download | el_manifests-networking-da05e9b9d3484d072a50be6237b0e9917ea04c7b.tar.gz |
Doc Add make dist to autostore books to distrib doc/
Add to Makefile: "make dist BOOK_DIST_DIR=storeto/doc"
to both build all and copy built books to storeto/doc
which simplifies for release build scripts.
This way the release build script does not
need to know which books are built, but
just includes doc/ in the release.
make dist can currently not be combined
with BOOK_BUILD_DIR or
with DOCBOOK_TO_BOOKDIR=no
because it copies results from the expected
default place
Signed-off-by: Lennart Johansson <lennart.johansson@enea.com>
-rw-r--r-- | doc/Makefile | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/doc/Makefile b/doc/Makefile index 59d25d5..878874b 100644 --- a/doc/Makefile +++ b/doc/Makefile | |||
@@ -66,13 +66,15 @@ VALIDATE = no | |||
66 | # Export all parameters including those on the command line | 66 | # Export all parameters including those on the command line |
67 | export | 67 | export |
68 | 68 | ||
69 | .PHONY: doc books docusage init initbuild inittargets initpardoc initbuildboot | 69 | .PHONY: doc books docusage init initbuild inittargets initpardoc initbuildboot dist |
70 | 70 | ||
71 | 71 | ||
72 | docusage: | 72 | docusage: |
73 | @echo 'make docusage #Shows this help text' | 73 | @echo 'make docusage #Shows this help text' |
74 | @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' |
75 | @echo 'make doc #Builds the userdoc, does autoinit if needed' | 75 | @echo 'make doc #Builds the userdoc, does autoinit if needed' |
76 | @echo 'make dist BOOK_DIST_DIR=xx/doc #Builds all and copies results to BOOK_DIST_DIR' | ||
77 | @echo ' #Does not work with DOCBOOK_TO_BOOKDIR or BOOK_BUILD_DIR' | ||
76 | @echo 'make init #Init all needed init* below' | 78 | @echo 'make init #Init all needed init* below' |
77 | @echo 'make initbuild #Init s_docbuild Docbook build system and central files' | 79 | @echo 'make initbuild #Init s_docbuild Docbook build system and central files' |
78 | @echo 'make inittargets #Init s_targets using repo tool Targets in this distro with poky' | 80 | @echo 'make inittargets #Init s_targets using repo tool Targets in this distro with poky' |
@@ -144,6 +146,17 @@ doc: books | |||
144 | @# | 146 | @# |
145 | endif | 147 | endif |
146 | 148 | ||
149 | dist: doc | ||
150 | @echo "Copying resulting built documents to $(BOOK_DIST_DIR)" | ||
151 | $(VERB)if [ "$(BOOK_DIST_DIR)" = "" ]; then echo "ERROR: Missing BOOK_DIST_DIR parameter, typically shall be xxx/doc"; exit 10; fi | ||
152 | $(VERB)if [ ! -d "`dirname $(BOOK_DIST_DIR)`" ]; then echo "ERROR: Missing parent for BOOK_DIST_DIR"; exit 10; fi | ||
153 | $(VERB)if [ -f "$(BOOK_DIST_DIR)/Makefile" ]; then echo "ERROR: Wrong BOOK_DIST_DIR, contains a Makefile?"; exit 10; fi | ||
154 | $(VERB)if [ ! -d "$(BOOK_DIST_DIR)" ]; then mkdir -p "$(BOOK_DIST_DIR)/pdf" ; fi | ||
155 | $(VERB)for book in $(COMPONENTS); do \ | ||
156 | if ls -d $$book/book*.pdf >/dev/null 2>&1; then cp --preserve=timestamps $$book/book*.pdf "$(BOOK_DIST_DIR)/pdf" ; fi ; \ | ||
157 | if ls -d $$book/html >/dev/null 2>&1; then cp -r --preserve=timestamps $$book/html "$(BOOK_DIST_DIR)" ; fi ; \ | ||
158 | if ls -d $$book/eclipse >/dev/null 2>&1; then cp -r --preserve=timestamps $$book/eclipse "$(BOOK_DIST_DIR)" ; fi ; \ | ||
159 | done | ||
147 | 160 | ||
148 | # Default FORMATs | 161 | # Default FORMATs |
149 | ifeq ($(FORMAT),) | 162 | ifeq ($(FORMAT),) |