URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [or1200/] [doc/] [Makefile] - Rev 732
Go to most recent revision | Compare with Previous | Blame | View Log
ASCIIDOC=asciidoc
XSLTPROC=xsltproc
DBLATEX=dblatex
RM ?= rm -f
CP ?= cp
MV ?= mv
CAT ?= cat
GEN-DOCINFO=gen-docinfo.pl
PREPROCESS=preprocess.pl
ifndef PERL_PATH
PERL_PATH = /usr/bin/perl
endif
ASCIIDOC_EXTRA += -a docinfo
SPEC_TXT=openrisc1200_spec.txt
SPEC_HTML=$(patsubst %.txt,%.html,$(SPEC_TXT))
SPEC_XML=$(patsubst %.txt,%.xml,$(SPEC_TXT))
SPEC_PDF=$(patsubst %.txt,%.pdf,$(SPEC_TXT))
SPEC_DOCINFO=$(patsubst %.txt,%-docinfo.xml,$(SPEC_TXT))
ifneq ($(findstring $(MAKEFLAGS),s),s)
ifndef V
QUIET_ASCIIDOC = @echo ' ' ASCIIDOC $@;
QUIET_XSLTPROC = @echo ' ' XSLTPROC $@;
QUIET_DBLATEX = @echo ' ' DBLATEX $@;
QUIET_GEN-DOCINFO = @echo ' ' GEN-DOCINFO $@;
QUIET_PREPROCESS = @echo ' ' PREPROCESS $<;
export V
endif
endif
all: html
html: $(SPEC_HTML)
pdf: $(SPEC_PDF)
$(SPEC_DOCINFO): $(SPEC_TXT) $(GEN-DOCINFO)
$(QUIET_GEN-DOCINFO)$(CAT) $< | \
$(PERL_PATH) -ne 'if (/__vstart__/../__vend__/) {print unless /__v(start|end)__/}' | \
$(PERL_PATH) $(GEN-DOCINFO) > $@
$(SPEC_TXT)+: $(SPEC_TXT)
$(QUIET_PREPROCESS)$(PERL_PATH) $(PREPROCESS) $< > $@
$(SPEC_XML): $(SPEC_TXT)+ $(SPEC_DOCINFO)
$(QUIET_ASCIIDOC)$(ASCIIDOC) $(ASCIIDOC_EXTRA) -b docbook $<
XSLT = docbook.xsl
XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css \
--stringparam section.autolabel 1 \
--stringparam section.label.includes.component.label 1
$(SPEC_HTML): $(SPEC_XML)
$(QUIET_XSLTPROC)$(RM) $@+ $@ && \
$(XSLTPROC) $(XSLTOPTS) -o $@+ $(XSLT) $< && \
$(MV) $@+ $@
DBLATEXOPTS = --param=doc.publisher.show=0
$(SPEC_PDF): $(SPEC_XML)
$(QUIET_DBLATEX)$(RM) $@+ $@ && \
$(DBLATEX) $(DBLATEXOPTS) -o $@+ \
-p /etc/asciidoc/dblatex/asciidoc-dblatex.xsl \
-s /etc/asciidoc/dblatex/asciidoc-dblatex.sty $< && \
$(MV) $@+ $@
clean:
$(RM) *.xml *.xml+ *.html *.html+
$(RM) openrisc1200_spec.pdf+ openrisc1200_spec.txt+
.PHONY: all clean html
Go to most recent revision | Compare with Previous | Blame | View Log