aboutsummaryrefslogtreecommitdiff
path: root/doc/user/Makefile.am
blob: 04d63244965a111f08d15aef7a07d8ea78186484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Chapters and sections.
EXTRA_DIST = bib.skb char.skb colframe.skb document.skb emacs.skb	\
  engine.skb enumeration.skb eq.skb examples.skb figure.skb		\
  font.skb footnote.skb htmle.skb image.skb index.skb			\
  justify.skb latexe.skb loute.skb lib.skb line.skb links.skb		\
  markup.skb ornament.skb package.skb pie.skb prgm.skb sectioning.skb	\
  skribilo-config.skb compiler.skb skribeinfo.skb slide.skb spacing.skb	\
  start.skb syntax.skb table.skb toc.skb user.skb xmle.skb		\
  lout/book-style.lout lout/front-page.lout.in

# Examples.
EXTRA_DIST += src/api1.skb						\
  src/api10.skb src/api11.skb src/api12.skb src/api13.skb src/api14.skb	\
  src/api15.skb src/api16.skb src/api17.skb src/api18.skb src/api19.skb	\
  src/api2.skb src/api20-html.skb src/api20-lout.skb src/api3.skb	\
  src/api5.skb src/api6.skb src/api7.skb src/api8.skb src/api9.skb	\
  src/bib1.sbib src/bib2.skb src/bib3.skb src/bib4.skb src/bib5.skb	\
  src/bib6.skb								\
  src/eq1.skb src/eq2.skb src/eq3.skb src/html-navtabs.skb		\
  src/index1.skb src/index2.skb src/index3.skb src/links1.skb		\
  src/links2.skb src/pie1.skb src/pie2.skb src/prgm1.skb src/prgm2.skb	\
  src/prgm3.skb src/slides.skb src/start1.skb src/start2.skb		\
  src/start3.skb src/start4.skb src/start5.skb				\
  src/outline.txt src/scheme.scm


html_DATA = user.html
dist_html_DATA = skribilo.css
BUILT_SOURCES = lout/front-page.lout
CLEANFILES = $(BUILT_SOURCES) $(html_DATA)

skribilo = $(top_builddir)/src/pre-inst-skribilo
skrflags  = -I $(srcdir) -P $(top_srcdir)/doc/img		\
	    -S $(srcdir) -S $(top_srcdir)/src/guile		\
	    -B $(srcdir)					\
	    -e '(define %top-srcdir "$(top_srcdir)")'		\
	    -e '(define %top-builddir "$(top_builddir)")'

# FIXME: Eventually, we should use the native API.
skrflags += --compat=skribe

if HAVE_PLOTICUS
skrflags += -e "(define %have-ploticus? (= 1 1))"		\
	    -e "(define %ploticus-path \"$(PLOTICUS)\")"
else
skrflags += -e "(define %have-ploticus? (= 0 1))"	\
	    -e "(define %ploticus-path (= 0 1))"
endif


load_path = $(top_srcdir)/doc/modules


.skb.html:
	GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
	$(skribilo) $(skrflags) --target=html -o $@ $<

if HAVE_LOUT

CLEANFILES += user.lout user.lout.ld user.li user.lix

if HAVE_PS2PDF
pdf_DATA = user.pdf
CLEANFILES += $(pdf_DATA)
else !HAVE_PS2PDF
ps_DATA = user.ps
CLEANFILES += $(ps_DATA)
endif !HAVE_PS2PDF

.skb.lout:
	GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
	$(skribilo) $(skrflags) --target=lout -o $@ $<

.lout.ps:
	$(LOUT) -r4 -I$(srcdir)/lout -I$(builddir)/lout \
	  -c $(@:%.ps=%) -o $@ $<

# Variable substitution.
include $(top_srcdir)/substitute.am

lout/front-page.lout: lout/front-page.lout.in
	test -d "lout" || mkdir "lout"
	$(substitute) "$^" > "$@.tmp" &&	\
	mv "$@.tmp" "$@"

endif HAVE_LOUT

if HAVE_PS2PDF
.ps.pdf:
	$(PS2PDF) $(@:%.pdf=%.ps)
endif


# Install/uninstall files not listed in `html_DATA'.
install-data-hook:
	$(INSTALL_DATA) user-*.html *.png "$(DESTDIR)$(htmldir)"

uninstall-local:
	-rm -rf "$(DESTDIR)$(htmldir)"/user-*.html \
		"$(DESTDIR)$(htmldir)"/*.png


# Remove the HTML files and images created in the process and
# not listed in `CLEANFILES'.
clean-local:
	-rm -f user-*.html *.eps *.png
	-rm -rf "lout"