OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1200/] [doc/] [Makefile] - Blame information for rev 692

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 645 julius
ASCIIDOC=asciidoc
2
XSLTPROC=xsltproc
3
DBLATEX=dblatex
4
 
5
RM ?= rm -f
6
CP ?= cp
7
MV ?= mv
8
CAT ?= cat
9
GEN-DOCINFO=gen-docinfo.pl
10
PREPROCESS=preprocess.pl
11
 
12
ifndef PERL_PATH
13
        PERL_PATH = /usr/bin/perl
14
endif
15
 
16
ASCIIDOC_EXTRA += -a docinfo
17
 
18
SPEC_TXT=openrisc1200_spec.txt
19
SPEC_HTML=$(patsubst %.txt,%.html,$(SPEC_TXT))
20
SPEC_XML=$(patsubst %.txt,%.xml,$(SPEC_TXT))
21
SPEC_PDF=$(patsubst %.txt,%.pdf,$(SPEC_TXT))
22
 
23
SPEC_DOCINFO=$(patsubst %.txt,%-docinfo.xml,$(SPEC_TXT))
24
 
25
ifneq ($(findstring $(MAKEFLAGS),s),s)
26
ifndef V
27
        QUIET_ASCIIDOC          = @echo '   ' ASCIIDOC $@;
28
        QUIET_XSLTPROC          = @echo '   ' XSLTPROC $@;
29
        QUIET_DBLATEX           = @echo '   ' DBLATEX $@;
30
        QUIET_GEN-DOCINFO       = @echo '   ' GEN-DOCINFO $@;
31
        QUIET_PREPROCESS        = @echo '   ' PREPROCESS $<;
32
        export V
33
endif
34
endif
35
 
36
all: html
37
 
38
html: $(SPEC_HTML)
39
pdf: $(SPEC_PDF)
40
 
41
$(SPEC_DOCINFO): $(SPEC_TXT) $(GEN-DOCINFO)
42
        $(QUIET_GEN-DOCINFO)$(CAT) $< | \
43
        $(PERL_PATH) -ne 'if (/__vstart__/../__vend__/) {print unless /__v(start|end)__/}' | \
44
        $(PERL_PATH) $(GEN-DOCINFO) > $@
45
 
46
$(SPEC_TXT)+: $(SPEC_TXT)
47
        $(QUIET_PREPROCESS)$(PERL_PATH) $(PREPROCESS) $< > $@
48
 
49
$(SPEC_XML): $(SPEC_TXT)+ $(SPEC_DOCINFO)
50
        $(QUIET_ASCIIDOC)$(ASCIIDOC) $(ASCIIDOC_EXTRA) -b docbook $<
51
 
52
XSLT = docbook.xsl
53
XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css \
54
        --stringparam  section.autolabel 1 \
55
        --stringparam  section.label.includes.component.label 1
56
 
57
$(SPEC_HTML): $(SPEC_XML)
58
        $(QUIET_XSLTPROC)$(RM) $@+ $@ && \
59
        $(XSLTPROC) $(XSLTOPTS) -o $@+ $(XSLT) $< && \
60
        $(MV) $@+ $@
61
 
62
DBLATEXOPTS = --param=doc.publisher.show=0
63
 
64
$(SPEC_PDF): $(SPEC_XML)
65
        $(QUIET_DBLATEX)$(RM) $@+ $@ && \
66
        $(DBLATEX) $(DBLATEXOPTS) -o $@+ \
67
        -p /etc/asciidoc/dblatex/asciidoc-dblatex.xsl \
68
        -s /etc/asciidoc/dblatex/asciidoc-dblatex.sty $< && \
69
        $(MV) $@+ $@
70
 
71
clean:
72
        $(RM) *.xml *.xml+ *.html *.html+
73
        $(RM) openrisc1200_spec.pdf+ openrisc1200_spec.txt+
74
 
75
.PHONY: all clean html

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.