aboutsummaryrefslogtreecommitdiff
path: root/doc/user/Makefile.am
blob: 65077bdb239935d7f7568ad135d1811b533d71f6 (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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# 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 infoe.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		\
  contexte.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/prgm4.skb src/slides.skb				\
  src/start1.skb src/start2.skb						\
  src/start3.skb src/start4.skb src/start5.skb				\
  src/lout-illustration.skb						\
  src/outline.txt src/scheme.scm

EXTRA_DIST += FONTS

skrinfodir = $(infodir)
skrinfo_DATA = skribilo.info

html_DATA = user.html user.sui
nobase_dist_html_DATA =				\
  lobster-2.100.otf junction.ttf		\
  static/gears-down.png				\
  static/gears-up.png				\
  static/graphy.png				\
  static/Hack-Regular.ttf			\
  static/LinBiolinum_Rah.ttf			\
  static/LinLibertine_Rah.ttf			\
  static/main.css				\
  static/manual.css				\
  static/normalize.css


if HAVE_LOUT
BUILT_SOURCES = lout/front-page.lout
else !HAVE_LOUT
BUILT_SOURCES =
endif !HAVE_LOUT

CLEANFILES = $(BUILT_SOURCES) $(html_DATA) skribilo.info

# `user.sui' is produced by the HTML engine.
user.sui: user.html

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)")'

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

if HAVE_LOUT
skrflags += -e "(define %have-lout? (= 1 1))"
else
skrflags += -e "(define %have-lout? (= 0 1))"
endif

load_path = $(top_srcdir)/doc/modules
load_compiled_path = $(top_builddir)/doc/modules

# Silent rules.

AM_V_SKRINFO = $(AM_V_SKRINFO_$(V))
AM_V_SKRINFO_ = $(AM_V_SKRINFO_$(AM_DEFAULT_VERBOSITY))
AM_V_SKRINFO_0 = @echo "  SKRINFO" $@;

AM_V_SKRHTML = $(AM_V_SKRHTML_$(V))
AM_V_SKRHTML_ = $(AM_V_SKRHTML_$(AM_DEFAULT_VERBOSITY))
AM_V_SKRHTML_0 = @echo "  SKRHTML" $@;


skribilo.info: user.skb
	$(AM_V_SKRINFO)GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH	\
	GUILE_LOAD_COMPILED_PATH=$(load_compiled_path):$$GUILE_LOAD_COMPILED_PATH \
	GUILE_AUTO_COMPILE=0				\
	$(skribilo) $(skrflags) --target=info -o $@ $<

.skb.html:
	$(AM_V_SKRHTML)GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH	\
	GUILE_LOAD_COMPILED_PATH=$(load_compiled_path):$$GUILE_LOAD_COMPILED_PATH \
	GUILE_AUTO_COMPILE=0				\
	$(skribilo) $(skrflags) --target=html -o $@ $<

if HAVE_LOUT

AM_V_SKRLOUT = $(AM_V_SKRLOUT_$(V))
AM_V_SKRLOUT_ = $(AM_V_SKRLOUT_$(AM_DEFAULT_VERBOSITY))
AM_V_SKRLOUT_0 = @echo "  SKRLOUT" $@;

AM_V_LOUT = $(AM_V_LOUT_$(V))
AM_V_LOUT_ = $(AM_V_LOUT_$(AM_DEFAULT_VERBOSITY))
AM_V_LOUT_0 = @echo "  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

.lout.ps:
	$(AM_V_LOUT)$(LOUT) -a -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"
	$(AM_V_SUBSTITUTE)$(substitute) "$^" > "$@.tmp" &&	\
	mv "$@.tmp" "$@"

endif HAVE_LOUT

if HAVE_PS2PDF
.ps.pdf:
	$(PS2PDF) -sPAPERSIZE=a4 -dPDFSETTINGS=/prepress $(@:%.pdf=%.ps)
endif

.skb.lout:
	$(AM_V_SKRLOUT)GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH	\
	GUILE_LOAD_COMPILED_PATH=$(load_compiled_path):$$GUILE_LOAD_COMPILED_PATH \
	GUILE_AUTO_COMPILE=0				\
	$(skribilo) $(skrflags) --target=lout -o $@ $<

.skb.tex:
	GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH	\
	GUILE_LOAD_COMPILED_PATH=$(load_compiled_path):$$GUILE_LOAD_COMPILED_PATH \
	GUILE_AUTO_COMPILE=0				\
	$(skribilo) $(skrflags) --target=latex -o $@ $<

.skb.ctx:
	GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH		\
	GUILE_LOAD_COMPILED_PATH=$(load_compiled_path):$$GUILE_LOAD_COMPILED_PATH \
	GUILE_AUTO_COMPILE=0					\
	$(skribilo) $(skrflags) --target=context -o $@ $<


# Install/uninstall files not listed in `html_DATA'.
# Make the images available alongside the Info manual.
install-data-hook:
	$(INSTALL_DATA) user-*.html *.png "$(DESTDIR)$(htmldir)"
	$(MKDIR_P) "$(DESTDIR)$(infodir)"
	for i in "$(DESTDIR)$(htmldir)/"*.png; do	\
	  (cd "$(DESTDIR)$(infodir)";			\
	   rm -f "`basename $$i`"; $(LN_S) "$$i");	\
	done

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
	-if test "$(top_builddir)" != "$(top_srcdir)";	\
	 then rm -rf "lout" ; else : ; fi