4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-24 01:29:34 +08:00
Mike Frysinger 3365bd2f7a newlib: libm: move manual into top-level build
This doesn't migrate all the docs, just the libm's manual (pdf/info).
This is to show the basic form of migrating the chew files.
2022-02-04 19:39:05 -05:00

32 lines
740 B
Makefile

# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
noinst_DATA += doc/makedoc
MKDOC = doc/makedoc$(EXEEXT_FOR_BUILD)
# 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 )