From b7f2965dc397610aa4c8941557e48d5736d8e8dd Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 13 Feb 2022 23:17:48 -0500 Subject: newlib: rename doc/local.mk to Makefile.inc For consistency across the whole tree. --- newlib/doc/Makefile.inc | 43 +++++++++++++++++++++++++++++++++++++++++++ newlib/doc/local.mk | 43 ------------------------------------------- 2 files changed, 43 insertions(+), 43 deletions(-) create mode 100644 newlib/doc/Makefile.inc delete mode 100644 newlib/doc/local.mk (limited to 'newlib/doc') diff --git a/newlib/doc/Makefile.inc b/newlib/doc/Makefile.inc new file mode 100644 index 000000000..de1dd1f2b --- /dev/null +++ b/newlib/doc/Makefile.inc @@ -0,0 +1,43 @@ +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. + +$(MKDOC): doc/makedoc.o + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $< + +doc/makedoc.o: doc/makedoc.c + $(MKDIR_P) doc + $(CC_FOR_BUILD) -g $(CFLAGS_FOR_BUILD) -o $@ -c $< + +man-cache: + ${srcdir}/doc/makedocbook.py --cache + +PHONY += man-cache + +# +# Subdir documentation rules. +# + +SUFFIXES += .def + +CHEW = $(MKDOC) -f $(srcdir)/%D%/doc.str + +.c.def: + $(AM_V_GEN)$(CHEW) < $< > $*.def || ( rm $*.def && false ) + +SUFFIXES += .xml + +DOCBOOK_CHEW = ${top_srcdir}/%D%/makedocbook.py + +.c.xml: + $(AM_V_GEN)$(DOCBOOK_CHEW) < $< > $*.xml || ( rm $*.xml && false ) + +# We can't use .tex.xml rule here as it'll conflict with .c.xml when the chapter +# name (e.g. "stdio.xml") matches a source file name (e.g. "stdio.c"). We've +# been flattening chapters into the main library dir (e.g. libc/) to avoid that. +TEXI2DOCBOOK = $(top_srcdir)/%D%/chapter-texi2docbook.py diff --git a/newlib/doc/local.mk b/newlib/doc/local.mk deleted file mode 100644 index de1dd1f2b..000000000 --- a/newlib/doc/local.mk +++ /dev/null @@ -1,43 +0,0 @@ -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. - -$(MKDOC): doc/makedoc.o - $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $< - -doc/makedoc.o: doc/makedoc.c - $(MKDIR_P) doc - $(CC_FOR_BUILD) -g $(CFLAGS_FOR_BUILD) -o $@ -c $< - -man-cache: - ${srcdir}/doc/makedocbook.py --cache - -PHONY += man-cache - -# -# Subdir documentation rules. -# - -SUFFIXES += .def - -CHEW = $(MKDOC) -f $(srcdir)/%D%/doc.str - -.c.def: - $(AM_V_GEN)$(CHEW) < $< > $*.def || ( rm $*.def && false ) - -SUFFIXES += .xml - -DOCBOOK_CHEW = ${top_srcdir}/%D%/makedocbook.py - -.c.xml: - $(AM_V_GEN)$(DOCBOOK_CHEW) < $< > $*.xml || ( rm $*.xml && false ) - -# We can't use .tex.xml rule here as it'll conflict with .c.xml when the chapter -# name (e.g. "stdio.xml") matches a source file name (e.g. "stdio.c"). We've -# been flattening chapters into the main library dir (e.g. libc/) to avoid that. -TEXI2DOCBOOK = $(top_srcdir)/%D%/chapter-texi2docbook.py -- cgit v1.2.3