summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 5694a1435af84dcc55597587d8f0a96ad93f58ba (about) (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
# Guile Picture Language --- Compose pictures with Guile
# Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
#
# This file is part of the Guile Picture Language
#
# Guile-Debbugs is free software: you can redistribute it and/or
# modify it under the terms of the GNU  General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# Guile-Debbugs is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Guile-Debbugs.  If not, see <http://www.gnu.org/licenses/>.

include guile.am

moddir=$(prefix)/share/guile/site/$(GUILE_EFFECTIVE_VERSION)
godir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache

SOURCES =									\
  pict.scm									\
  pict/base64.scm							\
  pict/sxml.scm

EXTRA_DIST += \
  env.in									\
  $(SCM_TESTS)

info_TEXINFOS = doc/picture-language.texi

DOC_IMAGES = $(addsuffix .svg.scm, $(addprefix $(top_srcdir)/doc/images/, \
  line hline vline polyline polyline2 polygon \
  triangle octagon circle ellipse rectangle text \
  boring-triangles modifiers))

infoimagedir = $(infodir)/images
dist_infoimage_DATA =				\
  $(DOC_IMAGES:%.scm=%.scm.png)

%.svg.scm.svg: %.svg.scm
	$(top_builddir)/env						\
	$(GUILE) --no-auto-compile -e main		\
	$(top_srcdir)/build-aux/generate-images.scm $(abs_top_srcdir)/$<

%.svg.scm.png: %.svg.scm.svg
	$(RSVG_CONVERT) -o $@ $<

# We cannot add new dependencies to `%D%/picture-language.pdf' &
# co. (info "(automake) Extending").  Using the `-local' rules is
# imperfect, because they may be triggered after the main rule.  Oh,
# well.
pdf-local: $(DOC_IMAGES:%.scm=%.scm.png)
info-local: $(DOC_IMAGES:%.scm=%.scm.png)
INFO_DEPS = $(DOC_IMAGES:%.scm=%.scm.png) doc/picture-language.info

EXTRA_DIST += \
  $(DOC_IMAGES) \
  $(DOC_IMAGES:%.scm=%.scm.png) \
  $(DOC_IMAGES:%.svg.scm=%.svg.scm.svg) \
  doc/fdl-1.3.texi

_header='\
<div id="wrapper">\
  <div id="header">\
  </div>\
  <div id=content class=width-control>'

AM_MAKEINFOHTMLFLAGS = \
  --no-split \
  --no-number-sections \
  --css-ref=https://elephly.net/css/manuals.css \
  -c AFTER_BODY_OPEN=$(_header) \
  -c PRE_BODY_CLOSE='</div></div>' \
  -c TOC_LINKS=true \
  -c 'EXTRA_HEAD=<meta name="viewport" \ content="width=device-width, initial-scale=1" />'

dist-hook: gen-ChangeLog
gen-ChangeLog:
	$(AM_V_GEN)if test -d .git; then				\
	  $(top_srcdir)/build-aux/gitlog-to-changelog	\
	    > $(distdir)/cl-t;							\
	  rm -f $(distdir)/ChangeLog;					\
	  mv $(distdir)/cl-t $(distdir)/ChangeLog;		\
	fi

ps:
dvi:
install-ps:
install-dvi:

.PHONY: gen-ChangeLog install-dvi install-ps dvi ps