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
|
# Make sure that $(SCITECO_FULL) and the SciTECO-based
# substitutor for *.in is available.
include $(top_srcdir)/bootstrap.am
# tedoc is a code documentation tool for SciTECO commands
# and macros, extracting comments from SciTECO and C
# code.
# It generates Troff manpage markup and acts as a Troff
# preprocessor to manpage templates.
dist_bin_SCRIPTS = tedoc.tes
# Name of tedoc.tes after installation, taking --program-prefix
# into account.
TEDOC_INSTALLED = \
$(bindir)/`echo tedoc.tes | @SED@ '$(transform)'`
%.in : %.template tedoc.tes @top_srcdir@/src/*.c
$(SCITECO_FULL) -m -- @srcdir@/tedoc.tes \
-C $@ $< @top_srcdir@/src/*.c
# grosciteco is a troff postprocessor similar to grotty
# which can be used to produce SciTECO-friendly output
# (woman pages).
dist_bin_SCRIPTS += grosciteco.tes
# grosciteco, like many other postprocessors, works
# best with its own macro package.
# Unfortunately, there is no way to query the built-in
# Groff tmac path.
# Therefore, the "sciteco" macros are installed into
# SciTECO's scitecodatadir. Users can copy this file, set up
# environment variables like $GROFF_TMAC_PATH or pass
# the directory via `groff -M`.
dist_scitecodata_DATA = sciteco.tmac
# Name of grosciteco.tes after installation, taking --program-prefix
# into account.
GROSCITECO_INSTALLED = \
$(bindir)/`echo grosciteco.tes | @SED@ '$(transform)'`
# Fix up the hash-bang line of installed SciTECO scripts upon
# installation to refer to the installed sciteco binary.
# This takes --program-prefix into account.
# This wouldn't work on Windows since SciTECO cannot open
# the /mingw64 paths.
#
# FIXME: This will patch the hash-bang line repeatedly.
# Perhaps it would be better to do that using a preprocessing
# step before installation - see the known problems that this
# is causing on FreeBSD/Poudriere.
if !WIN32
install-exec-hook:
$(SCITECO_FULL) -e "<%i^[ :Q[^A^E\\i]:; @EB'^EN[^A^E\\i]' \
0,^Q::@FR'#!^EM^Xsciteco'#!$(SCITECO_INSTALLED)'> \
:EX" \
$(DESTDIR)$(GROSCITECO_INSTALLED) \
$(DESTDIR)$(TEDOC_INSTALLED)
endif
womendir = $(scitecolibdir)/women
women_DATA = grosciteco.tes.1.woman grosciteco.tes.1.woman.tec
CLEANFILES = grosciteco.tes.1
EXTRA_DIST = grosciteco.tes.1.in
women_DATA += tedoc.tes.1.woman tedoc.tes.1.woman.tec
CLEANFILES += tedoc.tes.1
EXTRA_DIST += tedoc.tes.1.in
women_DATA += sciteco.1.woman sciteco.1.woman.tec
CLEANFILES += sciteco.1
EXTRA_DIST += sciteco.1.in
women_DATA += sciteco.7.woman sciteco.7.woman.tec
CLEANFILES += sciteco.7 sciteco.7.in
EXTRA_DIST += sciteco.7.template
women_DATA += tutorial.woman tutorial.woman.tec
CLEANFILES += tutorial.ms
EXTRA_DIST += tutorial.ms.in
CLEANFILES += $(women_DATA)
# Using pattern rules is bugged in some versions of GNU make in
# combination with grouped targets (&:).
define woman_man_rule
$(1).woman $(1).woman.tec &: $(1) sciteco.tmac grosciteco.tes
@GROFF@ @GROFF_FLAGS@ -wall -Z -Tutf8 -t -man -M@srcdir@ -msciteco $$< | \
$(SCITECO_FULL) -im -- @srcdir@/grosciteco.tes $$@
endef
$(eval $(call woman_man_rule,grosciteco.tes.1))
$(eval $(call woman_man_rule,tedoc.tes.1))
$(eval $(call woman_man_rule,sciteco.1))
$(eval $(call woman_man_rule,sciteco.7))
tutorial.woman tutorial.woman.tec &: tutorial.ms sciteco.tmac grosciteco.tes
@GROFF@ @GROFF_FLAGS@ -wall -Z -Tutf8 -t -ms -M@srcdir@ -msciteco $< | \
$(SCITECO_FULL) -im -- @srcdir@/grosciteco.tes $@
man_MANS = grosciteco.tes.1 tedoc.tes.1 sciteco.1 sciteco.7
dist_noinst_SCRIPTS = htbl.tes
if BUILD_HTMLDOCS
html_DATA = grosciteco.tes.1.html tedoc.tes.1.html \
sciteco.1.html sciteco.7.html tutorial.html
CLEANFILES += $(html_DATA)
endif
%.html : % htbl.tes
$(SCITECO_FULL) -qiom -- @srcdir@/htbl.tes <$< | \
@GROFF@ @GROFF_FLAGS@ -wall -Thtml -man >$@
%.html : %.ms
@GROFF@ @GROFF_FLAGS@ -wall -Thtml -ms $< >$@
# FIXME: We may want to build the cheat sheet automatically.
# This would require a full Groff installation, though.
EXTRA_DIST += cheat-sheet.mm
#
# Doxygen processing (do not install or distribute)
#
devdoc : doxygen/
.PHONY: doxygen/
doxygen/ : Doxyfile
-rm -rf doxygen/
@DOXYGEN@ $<
clean-local:
-rm -rf doxygen/
|