1 | ## $Id$ |
---|
2 | |
---|
3 | SUFFIXES += .t |
---|
4 | |
---|
5 | ## Texinfo support |
---|
6 | TEXINFO_TEX = ../texinfo/texinfo.tex |
---|
7 | ## TEXINPUTS = $(srcdir):$(top_srcdir) |
---|
8 | TEXI_COMMON = -I .. |
---|
9 | |
---|
10 | .texi: |
---|
11 | @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] |
---|
12 | cd $(srcdir) && \ |
---|
13 | $(MAKEINFO) $(TEXI_COMMON) `echo $< | sed 's,.*/,,'` |
---|
14 | |
---|
15 | $(srcdir)/stamp-vti: $(PROJECT).texi $(top_srcdir)/configure.in |
---|
16 | @echo "@set UPDATED `$(SHELL) $(srcdir)/mdate-sh \ |
---|
17 | $(srcdir)/$(PROJECT).texi`" > vti.tmp |
---|
18 | @echo "@set EDITION $(EDITION)" >> vti.tmp |
---|
19 | @echo "@set VERSION $(VERSION)" >> vti.tmp |
---|
20 | @cmp -s vti.tmp $(srcdir)/version.texi \ |
---|
21 | || (echo "Updating $(srcdir)/version.texi"; \ |
---|
22 | cp vti.tmp $(srcdir)/version.texi) |
---|
23 | -@rm -f vti.tmp |
---|
24 | @cp $(srcdir)/version.texi $@ |
---|
25 | |
---|
26 | MAINTAINERCLEANFILES += $(PROJECT) $(PROJECT)-[0-9] $(PROJECT)-[0-9][0-9] |
---|
27 | MAINTAINERCLEANFILES += $(GENERATED_FILES) |
---|
28 | |
---|
29 | ## DVI support |
---|
30 | dvidir = $(pkgdatadir)/dvi |
---|
31 | ## dvi_projectdir = $(dvidir)/$(PROJECT) |
---|
32 | |
---|
33 | ## PS support |
---|
34 | psdir = $(pkgdatadir)/ps |
---|
35 | ## ps_projectdir = $(psdir)/$(PROJECT) |
---|
36 | |
---|
37 | ## PDF support |
---|
38 | SUFFIXES += .pdf |
---|
39 | |
---|
40 | pdfdir = $(pkgdatadir)/pdf |
---|
41 | ## pdf_projectdir = $(pdfdir)/$(PROJECT) |
---|
42 | |
---|
43 | SUFFIXES += .eps |
---|
44 | |
---|
45 | if EPSTOPDF |
---|
46 | .eps.pdf: |
---|
47 | $(EPSTOPDF) $< --outfile=$@ |
---|
48 | endif |
---|
49 | |
---|
50 | $(PROJECT).pdf: $(PROJECT).texi $($(PROJECT)_TEXINFOS) $(PDF_IMAGES) |
---|
51 | CLEANFILES += $(PROJECT).pdf |
---|
52 | |
---|
53 | MOSTLYCLEANFILES += $(PDF_IMAGES) |
---|
54 | |
---|
55 | ## HTML |
---|
56 | SUFFIXES += .html |
---|
57 | |
---|
58 | html_projectdir = $(htmldir)/$(PROJECT) |
---|
59 | |
---|
60 | TEXI2WWW_ARGS=\ |
---|
61 | -I $(srcdir) \ |
---|
62 | -I $(top_srcdir) \ |
---|
63 | -dirfile ../index.html \ |
---|
64 | -header rtems_header.html \ |
---|
65 | -footer rtems_footer.html \ |
---|
66 | -icons $(top_builddir)/images |
---|
67 | |
---|
68 | rtems_header.html: $(top_srcdir)/rtems_header.html.in version.texi |
---|
69 | @sed -e s%\.\./images/%$(top_builddir)/images/%g \ |
---|
70 | -e s%\@VERSION\@%@VERSION@%g \ |
---|
71 | < $< > $@ |
---|
72 | rtems_footer.html: $(top_srcdir)/rtems_footer.html.in version.texi |
---|
73 | @sed -e s%\.\./images/%$(top_builddir)/%g \ |
---|
74 | -e s%\@VERSION\@%@VERSION@%g \ |
---|
75 | < $< > $@ |
---|
76 | |
---|
77 | index.html $(PROJECT)*.html: $(PROJECT).texi \ |
---|
78 | rtems_header.html rtems_footer.html |
---|
79 | $(TEXI2WWW) $(TEXI2WWW_ARGS) -base $(PROJECT) $< |
---|
80 | |
---|
81 | MOSTLYCLEANFILES += index.html $(PROJECT)*.html rtems_header.html \ |
---|
82 | rtems_footer.html |
---|
83 | |
---|
84 | ## Common installation points |
---|
85 | if USE_HTML |
---|
86 | html_project_DATA += index.html $(PROJECT)*.html |
---|
87 | endif |
---|
88 | |
---|
89 | if USE_DVI |
---|
90 | dvi_DATA += $(PROJECT).dvi |
---|
91 | |
---|
92 | .texi.dvi: |
---|
93 | $(TEXI2DVI) -I $(srcdir) -I $(top_srcdir) $< |
---|
94 | |
---|
95 | if USE_PS |
---|
96 | ps_DATA += $(PROJECT).ps |
---|
97 | .dvi.ps: |
---|
98 | TEXINPUTS=$(srcdir):$$TEXINPUTS \ |
---|
99 | $(DVIPS) $< -o $@ |
---|
100 | endif # USE_PS |
---|
101 | |
---|
102 | endif # USE_DVI |
---|
103 | |
---|
104 | if USE_PDF |
---|
105 | pdf_DATA += $(PROJECT).pdf |
---|
106 | |
---|
107 | if TEXI2PDF |
---|
108 | .texi.pdf: |
---|
109 | $(TEXI2PDF) -I $(srcdir) -I $(top_srcdir) $< |
---|
110 | endif |
---|
111 | |
---|
112 | endif |
---|