[PATCH/committed] newlib: fix mkdoc dependencies

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Make sure we depend on the right name of mkdoc all the time, and that
the rules that need it (e.g. .def files) depend on it.

Reported-by: Jon Turney <[email protected]>
---
 newlib/Makefile.in       | 4 +++-
 newlib/doc/local.mk      | 6 +++---
 newlib/libc/Makefile.inc | 1 +
 newlib/libm/Makefile.inc | 1 +
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/newlib/doc/local.mk b/newlib/doc/local.mk
index 15c43f225e66..de1dd1f2bb09 100644
--- a/newlib/doc/local.mk
+++ b/newlib/doc/local.mk
@@ -1,8 +1,8 @@
-# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
-noinst_DATA += doc/makedoc
-
 MKDOC = doc/makedoc$(EXEEXT_FOR_BUILD)
 
+# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
+noinst_DATA += $(MKDOC)
+
 # We don't use CFLAGS with CC_FOR_BUILD because here CFLAGS will
 # actually be CFLAGS_FOR_TARGET, and in some cases that will include
 # -Os, which CC_FOR_BUILD may not recognize.
diff --git a/newlib/libc/Makefile.inc b/newlib/libc/Makefile.inc
index fff9e880506f..f30ced867eec 100644
--- a/newlib/libc/Makefile.inc
+++ b/newlib/libc/Makefile.inc
@@ -5,6 +5,7 @@ LIBC_CHEWOUT_FILES =
 
 LIBC_CHAPTERS = %D%/sys.tex
 LIBC_DOCBOOK_OUT_FILES = $(LIBC_CHEWOUT_FILES:.def=.xml)
+$(LIBC_CHEWOUT_FILES): $(MKDOC)
 
 %D%/libc.dvi: %D%/targetdep.tex $(LIBC_CHEWOUT_FILES)
 
diff --git a/newlib/libm/Makefile.inc b/newlib/libm/Makefile.inc
index f2f192ea81fe..7fdea0ca518e 100644
--- a/newlib/libm/Makefile.inc
+++ b/newlib/libm/Makefile.inc
@@ -5,6 +5,7 @@ LIBM_CHEWOUT_FILES =
 
 LIBM_CHAPTERS =
 LIBM_DOCBOOK_OUT_FILES = $(LIBM_CHEWOUT_FILES:.def=.xml)
+$(LIBM_CHEWOUT_FILES): $(MKDOC)
 
 %D%/libm.dvi: %D%/targetdep.tex $(LIBM_CHEWOUT_FILES)
 
-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.