File 0925-Fix-awk-warning-about-missing-file.patch of Package erlang

From 100cd03348c901b5f04d5c969500fa17d6a75cac Mon Sep 17 00:00:00 2001
From: Dan Gudmundsson <dgud@erlang.org>
Date: Wed, 27 Nov 2019 10:22:42 +0100
Subject: [PATCH 5/5] Fix awk warning about missing file

For edoc all files does not exists when doc is not built yet.
And we don't want to build the doc in the normal src build.
---
 make/otp_release_targets.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk
index 615bf1adb7..c629a7d143 100644
--- a/make/otp_release_targets.mk
+++ b/make/otp_release_targets.mk
@@ -147,7 +147,7 @@ docs: $(HTMLDIR)/$(APPLICATION).eix
 ## Here awk is used to find all xi:include files in $(BOOK_FILES)
 ## Then we look into all those files check for xi:includes
 BOOK_XI_INC_FILES:=$(foreach file,$(BOOK_FILES),$(shell awk -F\" '/xi:include/ {print $$2}' $(file))) $(BOOK_FILES)
-ALL_XI_INC_FILES:=$(foreach file,$(BOOK_XI_INC_FILES),$(shell awk -F\" '/xi:include/ {if ("$(dir $(file))" != "./") printf "$(dir $(file))"; print $$2}' $(file))) $(BOOK_XI_INC_FILES)
+ALL_XI_INC_FILES:=$(foreach file,$(BOOK_XI_INC_FILES),$(shell if [ -f $(file) ]; then awk -F\" '/xi:include/ {if ("$(dir $(file))" != "./") printf "$(dir $(file))"; print $$2}' $(file) ; fi)) $(BOOK_XI_INC_FILES)
 ifeq ($(TOPDOC), true)
 ALL_XI_INC_GEN_FILES:=$(filter-out book.xml,$(ALL_XI_INC_FILES)) $(BOOK_FILES:%=$(XMLDIR)/%)
 else
-- 
2.16.4

openSUSE Build Service is sponsored by