Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

DocBook: only copy stuff to media_api if media xml is generated

It is possible to use:
make DOCBOOKS=device-drivers.xml htmldocs

To produce just a few docbooks. In such case, the media docs
won't be built, causing the makefile target to return an error.

While this is ok for human eyes, if the above is used on an script,
it would cause troubles.

Fix it by only creating/filling the media_api directory if the
media_api.xml is found at DOCBOOKS.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

+4 -2
+4 -2
Documentation/DocBook/media/Makefile
··· 199 199 # 200 200 201 201 install_media_images = \ 202 - $(Q)-mkdir -p $(MEDIA_OBJ_DIR)/media_api; \ 203 - cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api 202 + $(Q)if [ "x$(findstring media_api.xml,$(DOCBOOKS))" != "x" ]; then \ 203 + mkdir -p $(MEDIA_OBJ_DIR)/media_api; \ 204 + cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api; \ 205 + fi 204 206 205 207 $(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64 206 208 $(Q)base64 -d $< >$@