File: documentation.cook

package info (click to toggle)
fstrcmp 0.7.D001-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,460 kB
  • sloc: sh: 3,493; ansic: 1,505; makefile: 455; awk: 110
file content (157 lines) | stat: -rw-r--r-- 4,077 bytes parent folder | download | duplicates (5)
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
/*
 * fstrcmp - fuzzy string compare library
 * Copyright (C) 2009, 2011 Peter Miller
 *
 * This program 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.
 *
 * This program 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
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

all += documentation;

documentation:
    [fromto man/man%1/%2.%1 man/cat%1/%2.%1
        [match_mask man/man%1/%2.%1 [source_files]]
    ]
    etc/reference.pdf
    ;

man/cat%1/%2.%1: man/man%1/%2.%1
    etc/groff.sh
{
    sh [resolve etc/groff.sh]
        [addprefix "-I" [search_list]]
        -Tascii -t -P-c -man
        [resolve man/man%1/%2.%1]
        > [target];
}

man/man%1/%2.%1.d: man/man%1/%2.%1
    set no-cascade
{
    c_incl -nc -ns -api -nrec
        --lang\=roff
        [addprefix "-I" [search_list]]
        [resolve man/man%1/%2.%1]
        -prefix "'cascade man/man%1/%2.%1 ='"
        -suffix "';'"
        [addprefix "-rlp=" [search_list]]
        -o [target];
}

man/man%1/%2.so.d: man/man%1/%2.so
    set no-cascade
{
    c_incl -nc -ns -api -nrec
        --lang\=roff
        [addprefix "-I" [search_list]]
        [resolve man/man%1/%2.so]
        -prefix "'cascade man/man%1/%2.so ='"
        -suffix "';'"
        [addprefix "-rlp=" [search_list]]
        -o [target];
}

etc/%.so.d: etc/%.so
    set no-cascade
{
    c_incl -nc -ns -api -nrec
        --lang\=roff
        [addprefix "-I" [search_list]]
        [resolve etc/%.so]
        -prefix "'cascade etc/%.so ='"
        -suffix "';'"
        [addprefix "-rlp=" [search_list]]
        -o [target];
}

#include-cooked [addsuffix ".d" [match_mask etc/%.man [source_files]]]
#include-cooked [addsuffix ".d" [match_mask man/man%1/%2.%1 [source_files]]]
#include-cooked [addsuffix ".d" [match_mask man/%0%.so [source_files]]]

etc/%.pdf: etc/%.man etc/page-list.awk
    etc/groff.sh
{
    sh [resolve etc/groff.sh]
        [addprefix "-I" [search_list]]
        -t -man
        [resolve etc/%.man]
        > %.ps.tmp;
    psselect -p`awk -f [resolve etc/page-list.awk] %.ps.tmp`
        %.ps.tmp > %.ps;
    rm %.ps.tmp
        set silent;
    ps2pdf %.ps [target];
    rm %.ps
        set silent;
}

etc/%.man.d: etc/%.man
    set no-cascade
{
    c_incl -nc -ns -api -nrec
        --lang\=roff
        [addprefix "-I" [search_list]]
        [resolve etc/%.man]
        -prefix "'cascade etc/%.man ='"
        -suffix "';'"
        [addprefix "-rlp=" [search_list]]
        -o [target];
}

cascade etc/reference.man = etc/ref-parts.so;

etc/ref-parts.so: [match_mask man/man%1/%2.%1 [source_files]]
    etc/ref-ptx.sh
{
    sh -f [resolve etc/ref-ptx.sh]
        [match_mask man/man%1/%2.%1 [source_files]]
    > [target];
}
#include-cooked etc/ref-parts.so.d

#if [count [match_mask etc/new.%.so [source_files]]]
etc/new.so: : etc/new.sh [match_mask etc/new.%.so [source_files]]
{
    sh [resolve etc/new.sh] -r [match_mask etc/new.%.so [need]] > [target];
}
#include-cooked-nowarn etc/new.so.d
#endif

cascade etc/readme.man = etc/new.so ;

%: etc/[downcase %].man: etc/groff.sh
{
    sh [resolve etc/groff.sh] -Tascii -t -P-bcu -man
        [addprefix "-I" [search_list]]
        [resolve etc/[downcase %].man]
        > [target];
}

LICENSE: man/man1/fstrcmp_license.1
{
    sh [resolve etc/groff.sh] -Tascii -t -P-bcu -man
        [addprefix "-I" [search_list]]
        [resolve man/man1/fstrcmp_license.1]
        > [target];
}

etc/%.txt: etc/%.roff: etc/version.so
{
    sh [resolve etc/groff.sh] -Tascii -t -P-bcu
        [addprefix "-I" [search_list]]
        [resolve etc/%.roff]
    | cat -s
        > [target];
}

all += etc/freshmeat.txt;