File: CMakeLists-docs.txt

package info (click to toggle)
yacas 1.3.6-2
  • links: PTS
  • area: main
  • in suites: buster, 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 (118 lines) | stat: -rw-r--r-- 4,794 bytes parent folder | download | duplicates (3)
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
find_program (PERL perl)
find_package (LATEX)

set (CHAPTERS FDL.chapt GPL.chapt cl-options.chapt config.chapt addons.chapt YacasDebugger.chapt ABIN-grammar.chapt SimpleTools.chapt CVS-Howto.chapt YacasDocs.chapt wester-1994.chapt new.chapt paper.chapt wordproblems.chapt BuildSystem.chapt 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 probability-and-statistics.chapt glossary.chapt glossary.chapt algo-basic.chapt algo-numapprox.chapt algorithms-elemfunc.chapt algorithms-specfunc.chapt algorithms-numtheory.chapt algorithms-integration.chapt algorithms-multivar.chapt SturmSequences.chapt algo-refs.chapt algo-contfrac.chapt algorithms-transforms.chapt numerics.chapt)
foreach (_chapter ${CHAPTERS})
  add_custom_command (
    OUTPUT ${_chapter}
    COMMAND ${PERL} ${PROJECT_SOURCE_DIR}/manmake/txt2yacasdoc.pl
    ARGS < ${PROJECT_SOURCE_DIR}/manmake/${_chapter}.txt > ${_chapter}
    MAIN_DEPENDENCY manmake/${_chapter}.txt
    DEPENDS manmake/txt2yacasdoc.pl)
endforeach()

set (BOOKS intro.book coding.book ref.book refprog.book essays.book Algo.book)
foreach (_book ${BOOKS})
  add_custom_command (
    OUTPUT ${_book}
    COMMAND ${PERL} ${PROJECT_SOURCE_DIR}/manmake/txt2yacasdoc.pl
    ARGS < ${PROJECT_SOURCE_DIR}/manmake/${_book}.txt > ${_book}
    MAIN_DEPENDENCY manmake/${_book}.txt
    DEPENDS manmake/txt2yacasdoc.pl)
endforeach()

add_custom_target (docs DEPENDS ${BOOKS} ${CHAPTERS})

foreach (_book ${BOOKS})
  add_custom_command (
    OUTPUT ${_book}.tex
    COMMAND ${YACAS} --rootdir ${PROJECT_SOURCE_DIR}/scripts:${PROJECT_BINARY_DIR}/scripts -i "[ Use(\"${PROJECT_SOURCE_DIR}/manmake/book2TeX.ys\"); Load(\"${_book}\"); TeXFinishUp(); ];" > ${_book}.tex
    MAIN_DEPENDENCY ${_book}
    DEPENDS docs yacas
    VERBATIM)
endforeach()

set (TEX_BOOKS)
foreach (_book ${BOOKS})
  list (APPEND TEX_BOOKS ${_book}.tex)
endforeach()

add_custom_target (tex_docs DEPENDS ${TEX_BOOKS})

foreach (_book ${BOOKS})
  add_custom_command ( 
    OUTPUT    ${PROJECT_BINARY_DIR}/${_book}.pdf
    COMMAND   ${PDFLATEX_COMPILER}
    ARGS      ${PROJECT_BINARY_DIR}/${_book}.tex
    DEPENDS   ${PROJECT_BINARY_DIR}/${_book}.tex
    COMMENT   "LaTeX"
)
endforeach()

set (PDF_BOOKS)
foreach (_book ${BOOKS})
  list (APPEND PDF_BOOKS ${_book}.pdf)
endforeach()

add_custom_target (pdf_docs ALL DEPENDS ${PDF_BOOKS})

set (PDF_BOOK_PATHS)
foreach (_book ${PDF_BOOKS})
  list (APPEND PDF_BOOK_PATHS ${PROJECT_BINARY_DIR}/${_book})
endforeach()

install (FILES ${PDF_BOOK_PATHS} DESTINATION share/yacas/documentation COMPONENT doc)

foreach (_book ${BOOKS})
  string (REPLACE .book "" _book ${_book})
  add_custom_command (
    OUTPUT ${_book}manual.html
    COMMAND ${YACAS} --rootdir ${PROJECT_SOURCE_DIR}/scripts:${PROJECT_BINARY_DIR}/scripts:${PROJECT_BINARY_DIR}/manmake -i "[ DefaultDirectory(\"${PROJECT_SOURCE_DIR}/manmake\"); Use(\"${PROJECT_SOURCE_DIR}/manmake/styleplain\"); Use(\"${PROJECT_SOURCE_DIR}/manmake/manualmaker\"); GenerateBook(\"${_book}\"); ];"
    MAIN_DEPENDENCY ${_book}.book
    DEPENDS docs yacas
    VERBATIM)
endforeach()

add_custom_command (
  OUTPUT books.html
  COMMAND ${YACAS} --rootdir ${PROJECT_SOURCE_DIR}/scripts:${PROJECT_BINARY_DIR}/scripts:${PROJECT_BINARY_DIR}/manmake -i "[ DefaultDirectory(\"${PROJECT_SOURCE_DIR}/manmake\"); Use(\"${PROJECT_SOURCE_DIR}/manmake/styleplain\"); Use(\"${PROJECT_SOURCE_DIR}/manmake/indexmaker\"); GenerateIndex(); ];"
  DEPENDS docs yacas
  VERBATIM)

set (HTML_BOOKS)
foreach (_book ${BOOKS})
  string (REPLACE .book "" _book ${_book})
  list (APPEND HTML_BOOKS ${CMAKE_BINARY_DIR}/${_book}manual.html)
endforeach()

set (HTML_CHAPTERS)
foreach (_chapter RANGE 1 6)
  list (APPEND HTML_CHAPTERS "${CMAKE_BINARY_DIR}/introchapter${_chapter}.html")
endforeach ()

foreach (_chapter RANGE 1 9)
  list (APPEND HTML_CHAPTERS "${CMAKE_BINARY_DIR}/codingchapter${_chapter}.html")
endforeach ()

foreach (_chapter RANGE 1 8)
  list (APPEND HTML_CHAPTERS "${CMAKE_BINARY_DIR}/Algochapter${_chapter}.html")
endforeach ()

foreach (_chapter RANGE 1 8)
  list (APPEND HTML_CHAPTERS "${CMAKE_BINARY_DIR}/essayschapter${_chapter}.html")
endforeach ()

foreach (_chapter RANGE 1 32)
  list (APPEND HTML_CHAPTERS "${CMAKE_BINARY_DIR}/refchapter${_chapter}.html")
endforeach ()

foreach (_chapter RANGE 1 10)
  list (APPEND HTML_CHAPTERS "${CMAKE_BINARY_DIR}/refprogchapter${_chapter}.html")
endforeach ()

list (APPEND HTML_BOOKS ${CMAKE_BINARY_DIR}/books.html)

add_custom_target (html_docs ALL DEPENDS ${HTML_BOOKS})

install (FILES ${HTML_BOOKS} ${HTML_CHAPTERS} DESTINATION share/yacas/documentation COMPONENT doc)