1 MKDOC = doc/makedoc$(EXEEXT_FOR_BUILD)
3 # We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
4 noinst_DATA += $(MKDOC)
6 # We don't use CFLAGS with CC_FOR_BUILD because here CFLAGS will
7 # actually be CFLAGS_FOR_TARGET, and in some cases that will include
8 # -Os, which CC_FOR_BUILD may not recognize.
10 $(MKDOC): doc/makedoc.o
11 $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $<
13 doc/makedoc.o: doc/makedoc.c
15 $(CC_FOR_BUILD) -g $(CFLAGS_FOR_BUILD) -o $@ -c $<
18 # Subdir documentation rules.
23 CHEW = $(MKDOC) -f $(srcdir)/%D%/doc.str
26 $(AM_V_at)$(MKDIR_P) $(@D)
27 $(AM_V_GEN)$(CHEW) < $< > $*.def || ( rm $*.def && false )
31 DOCBOOK_CHEW = ${top_srcdir}/%D%/makedocbook.py
34 $(AM_V_at)$(MKDIR_P) $(@D)
35 $(AM_V_GEN)$(DOCBOOK_CHEW) < $< > $*.xml || ( rm $*.xml && false )
37 # We can't use .tex.xml rule here as it'll conflict with .c.xml when the chapter
38 # name (e.g. "stdio.xml") matches a source file name (e.g. "stdio.c"). We've
39 # been flattening chapters into the main library dir (e.g. libc/) to avoid that.
40 TEXI2DOCBOOK = $(top_srcdir)/%D%/chapter-texi2docbook.py