File: Makefile.am

package info (click to toggle)
yacas 1.3.6-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 7,176 kB
  • ctags: 3,520
  • sloc: cpp: 13,960; java: 12,602; sh: 11,401; makefile: 552; perl: 517; ansic: 381
file content (245 lines) | stat: -rw-r--r-- 9,807 bytes parent folder | download
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
## Makefile.am -- Process this file with automake to produce Makefile.in

# $(srcdir) is the manmake/ directory and $(top_srcdir) is the Yacas tree
# so this file should work even if we are building Yacas in a different directory

# newly compiled version of yacas in ../src (not necessarily under $(srcdir))
ouryacas = ../src/yacas --rootdir $(top_srcdir)/scripts/:../scripts/

# top target
## BOOKS_HTML is either "manicon.html" or empty
## PDF_DOCS   is either "pdf-docs" or empty
all-am: @BOOKS_HTML@ @PDF_DOCS@ hints

noinst_PROGRAMS = manripper removeduplicates

manripper_SOURCES = manripper.cpp 

removeduplicates_SOURCES = removeduplicates.cpp

hints: manripper removeduplicates $(REFSOURCES) $(REFPROGSOURCES) ref.book.txt refprog.book.txt
	rm -f hints.unsorted
	for file in ref.book.txt $(REFSOURCES) refprog.book.txt $(REFPROGSOURCES); do \
	./manripper $(srcdir)/"$$file" >> hints.unsorted ; done
	LC_ALL=C sort -t ":" hints.unsorted > hints.sorted
	./removeduplicates hints.sorted hints.singlesorted
	echo "::::" > tail.txt
	cat hints.singlesorted tail.txt > hints

## ytxt2tex is to be installed in $(bindir). 
bin_SCRIPTS = ytxt2tex
## It needs the following scripts:
ytxt2tex_DEPS = book2TeX.sh book2TeX.ys txt2yacasdoc.pl

BOOKS = intro.book coding.book ref.book refprog.book essays.book \
	Algo.book 

BOOKSOURCES = intro.book.txt coding.book.txt ref.book.txt refprog.book.txt \
	essays.book.txt Algo.book.txt 

PDF_DOCS = intro.book.pdf coding.book.pdf essays.book.pdf ref.book.pdf \
	refprog.book.pdf Algo.book.pdf 

# refprog.html is not listed because it is generated together with ref.html
HTMLBOOKS = intromanual.html codingmanual.html essaysmanual.html refmanual.html refprogmanual.html \
	Algomanual.html 

INTROCHAPTERS = FDL.chapt cl-options.chapt config.chapt addons.chapt  



INTROSOURCES = FDL.chapt.txt cl-options.chapt.txt config.chapt.txt addons.chapt.txt 


ALGOCHAPTERS = algo-basic.chapt algo-numapprox.chapt \
	algorithms-elemfunc.chapt algorithms-specfunc.chapt \
	algorithms-numtheory.chapt algorithms-integration.chapt \
	algorithms-multivar.chapt SturmSequences.chapt FDL.chapt \
	algo-refs.chapt algo-contfrac.chapt algorithms-transforms.chapt

ALGOSOURCES = algo-basic.chapt.txt algo-numapprox.chapt.txt \
	algorithms-elemfunc.chapt.txt algorithms-specfunc.chapt.txt \
	algorithms-numtheory.chapt.txt algorithms-integration.chapt.txt \
	algorithms-multivar.chapt.txt SturmSequences.chapt.txt FDL.chapt.txt \
	algo-refs.chapt.txt algo-contfrac.chapt.txt algorithms-transforms.chapt.txt

REFCHAPTERS = arith.chapt calc.chapt complex.chapt solvers.chapt simplify.chapt ode.chapt linalg.chapt \
	univar.chapt lists.chapt functional.chapt controlflow.chapt \
	preds.chapt logic.chapt const.chapt vars.chapt io.chapt \
	numtheory.chapt strings.chapt transforms.chapt cl-options.chapt \
	probability-and-statistics.chapt FDL.chapt 

REFSOURCES = arith.chapt.txt calc.chapt.txt complex.chapt.txt \
	solvers.chapt.txt simplify.chapt.txt ode.chapt.txt \
	linalg.chapt.txt univar.chapt.txt lists.chapt.txt cl-options.chapt.txt \
	functional.chapt.txt controlflow.chapt.txt preds.chapt.txt \
	logic.chapt.txt const.chapt.txt vars.chapt.txt io.chapt.txt \
	numtheory.chapt.txt strings.chapt.txt transforms.chapt.txt \
	probability-and-statistics.chapt.txt FDL.chapt.txt 


REFPROGCHAPTERS = FDL.chapt glossary.chapt \
	GPL.chapt numerics.chapt
REFPROGSOURCES = FDL.chapt.txt GPL.chapt.txt glossary.chapt.txt \
	numerics.chapt.txt

CODINGCHAPTERS = YacasDebugger.chapt FDL.chapt
CODINGSOURCES = YacasDebugger.chapt.txt FDL.chapt.txt

ESSAYCHAPTERS = ABIN-grammar.chapt \
	SimpleTools.chapt CVS-Howto.chapt YacasDocs.chapt \
	wester-1994.chapt new.chapt paper.chapt \
	wordproblems.chapt FDL.chapt BuildSystem.chapt 

ESSAYSOURCES = ABIN-grammar.chapt.txt \
	SimpleTools.chapt.txt CVS-Howto.chapt.txt YacasDocs.chapt.txt \
        paper.chapt.txt wester-1994.chapt.txt new.chapt.txt \
	wordproblems.chapt.txt FDL.chapt.txt BuildSystem.chapt.txt 


# Yacas test code extracted from the docs
TESTCODESNIPPETS = wester-1994.yts ref.book.yts refprog.book.yts

## This means: build wester-1994.yts etc. if running tests
check_SCRIPTS = $(TESTCODESNIPPETS)


EXTRA_DIST = txt2example.pl book2txt.sh book2txt.ys \
	book2xml.sh book2xml.ys \
	book2ys.sh book2ys.ys ys2book.pl \
	ytxt2tex $(ytxt2tex_DEPS) \
	manualmaker indexmaker styleplain \
	$(REFSOURCES) $(BOOKSOURCES) $(ESSAYSOURCES) $(CODINGSOURCES) \
	$(INTROSOURCES) \
	$(REFPROGSOURCES) $(ALGOSOURCES)  \
	dummies hints

# Stuff for automatic generation of Yacas books

SUFFIXES = .chapt.txt .chapt .book.tex .book.txt .book .tex .pdf .ys

.chapt.txt.chapt:
	perl $(srcdir)/txt2yacasdoc.pl < $< > $@

.book.txt.book:
	perl $(srcdir)/txt2yacasdoc.pl < $< > $@

.book.book.tex: 
	sh $(srcdir)/book2TeX.sh -run "$(ouryacas)" $< $@

.tex.pdf:
	pdflatex $< > /dev/null
	pdflatex $< > /dev/null
# The perl filter is used to help the 'makeindex' command: 
# 1) replace \verb|...| by \verb=...= 
# 2) escape ()|@! using a preceding quote "
# Note that @ and ! are not always escaped because they are sometimes part of the index entry and sometimes control chars. Heuristics are used to guess correctly.
	@perl -pe 's/(\\verb)\|([^|]*)\|/$$1=$$2=/g;s/([()|])/"$$1/g;if(/\@/){s/!/"!/g;};s/\@([^\\])/"\@$$1/g;'<$*.idx>$*.1.idx
	@makeindex $*.1.idx -o $*.ind || echo "***Warning: a problem with 'makeindex'"
	pdflatex $< > /dev/null

.chapt.ys:
	sh $(srcdir)/book2ys.sh -run "$(ouryacas)" $< $@

.chapt.yts:
	sh $(srcdir)/book2ys.sh -run "$(ouryacas)" $< $@

# generate test code from book sources

ref.book.yts: $(REFSOURCES) $(srcdir)/txt2example.pl
	@echo "// tests for ref.book" > $@
	for file in $(REFSOURCES); do perl $(srcdir)/txt2example.pl $(srcdir)/$$file >> $@; done

refprog.book.yts: $(REFPROGSOURCES) $(srcdir)/txt2example.pl
	@echo "// tests for refprog.book" > $@
	for file in $(REFPROGSOURCES); do perl $(srcdir)/txt2example.pl $(srcdir)/$$file >> $@; done


# specify books that need chapters
essays.book.tex: essays.book $(ESSAYCHAPTERS)
ref.book.tex : ref.book $(REFCHAPTERS)
refprog.book.tex : refprog.book $(REFPROGCHAPTERS)
coding.book.tex : coding.book $(CODINGCHAPTERS)
intro.book.tex: intro.book $(INTROCHAPTERS)
Algo.book.tex: Algo.book $(ALGOCHAPTERS)

# special "virtual" chapter built from corefunctions.h. This is printed by a special program "gencorefunctions", compiled together with yacas.



pdf-docs: $(PDF_DOCS)

CLEANFILES = books.html *.tex *.aux *.idx *.ind *.ilg *.toc *.log *.pdf *.funcs.js \
	coding*.html intro*.html ref*.html essays*.html Algo*.html  *.o core *~ texdocs.c \
	$(REFCHAPTERS) $(ESSAYCHAPTERS) $(REFPROGCHAPTERS) $(CODINGCHAPTERS)  \
	$(TESTCODESNIPPETS) $(ALGOCHAPTERS) $(BOOKS) manicon.html 

# The top HTML docs target is now "manicon.html" that is built by GenerateIndex().
# The dependence on $(HTMLBOOKS) is only to make sure that all HTML docs
# are built - in fact manicon.html is a constant file and has no dependencies.
manicon.html:  books.html $(HTMLBOOKS)

# books.html only depends on top book files (*.book.txt).
books.html:  $(BOOKS) $(srcdir)/indexmaker $(srcdir)/styleplain
	-echo '[DefaultDirectory("$(srcdir)/"); Use("styleplain"); Use("indexmaker"); GenerateIndex();];' | $(ouryacas) -fpc

intromanual.html : intro.book $(INTROCHAPTERS) $(srcdir)/manualmaker $(srcdir)/styleplain
	-@echo '[DefaultDirectory("$(srcdir)/"); Use("styleplain"); Use("manualmaker"); GenerateBook("intro");];' | $(ouryacas) -fpc

codingmanual.html : coding.book $(CODINGCHAPTERS) $(srcdir)/manualmaker $(srcdir)/styleplain
	-@echo '[DefaultDirectory("$(srcdir)/"); Use("styleplain"); Use("manualmaker"); GenerateBook("coding");];' | $(ouryacas) -fpc

essaysmanual.html : essays.book $(ESSAYCHAPTERS) $(srcdir)/manualmaker $(srcdir)/styleplain
	-@echo '[DefaultDirectory("$(srcdir)/"); Use("styleplain"); Use("manualmaker"); GenerateBook("essays");];' | $(ouryacas) -fpc

refmanual.html : ref.book $(REFCHAPTERS) $(srcdir)/manualmaker $(srcdir)/styleplain
	-@echo '[DefaultDirectory("$(srcdir)/"); Use("styleplain"); Use("manualmaker"); GenerateBook("ref");];'    | $(ouryacas) -fpc

refprogmanual.html : ref.book $(REFCHAPTERS) refprog.book $(REFPROGCHAPTERS) $(srcdir)/manualmaker $(srcdir)/styleplain
	-@echo '[DefaultDirectory("$(srcdir)/"); Use("styleplain"); Use("manualmaker"); GenerateBook("refprog");];' | $(ouryacas) -fpc

Algomanual.html : Algo.book $(ALGOCHAPTERS) $(srcdir)/manualmaker $(srcdir)/styleplain
	-@echo '[DefaultDirectory("$(srcdir)/"); Use("styleplain"); Use("manualmaker"); GenerateBook("Algo");];' | $(ouryacas) -fpc

## Hook to install documentation
install-data-local: @INSTALL_HTML@ install-scripts install-hints

install-hints: hints
	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/documentation
	$(INSTALL_DATA) hints $(DESTDIR)$(pkgdatadir)/documentation/hints

install-scripts: $(ytxt2tex_DEPS)
	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/manmake/
	-for file in $(ytxt2tex_DEPS); do \
	   $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)$(pkgdatadir)/manmake/$$file; \
	done

install-html: books.html 
	$(mkinstalldirs) $(DESTDIR)$(htmldir)/
	$(INSTALL_DATA) $(top_srcdir)/docs/yacaslogo.png $(DESTDIR)$(htmldir)/
	-for file in *.html; do \
	   $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir)/$$file; \
	done

install-pdf: pdf-docs
	$(mkinstalldirs) $(DESTDIR)$(pdfdir)/
	-for file in $(PDF_DOCS); do \
	   $(INSTALL_DATA) $$file $(DESTDIR)$(pdfdir)/$$file; \
	done

uninstall-hook: 
	-for file in $(DESTDIR)$(htmldir)/*; do \
	    rm -f $$file; \
	done
	rm -f $(DESTDIR)$(pkgdatadir)/manmake/book2TeX.sh
	rm -f $(DESTDIR)$(pkgdatadir)/manmake/book2TeX.ys
	rm -f $(DESTDIR)$(pkgdatadir)/manmake/txt2yacasdoc.pl

clean-local:
	rm -f hints.unsorted
	rm -f hints.sorted
	rm -f hints.singlesorted
	rm -f tail.txt
	rm -f hints
	rm -f config.chapt
	rm -f addons.chapt