[go: up one dir, main page]

File: archive.cook

package info (click to toggle)
srecord 1.39-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,624 kB
  • ctags: 1,822
  • sloc: cpp: 18,283; sh: 5,839; makefile: 1,701; awk: 201; vhdl: 15
file content (295 lines) | stat: -rw-r--r-- 8,423 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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
/*
 *      srecord - manipulate eprom load files
 *      Copyright (C) 1998-2000, 2003, 2004, 2006-2008 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/>.
 */

integration-build-targets:
        archive/change_log.txt
        archive/[project_minus].README
        archive/[project_minus].lsm
        archive/[project_minus].spec
        archive/[project_minus].tar.gz
        archive/[project_minus].pdf
        archive/[project_short].png
        archive/[project_short].ico
        archive/[project_short]-128.png
        archive/[project_short]-64.png
        archive/[project_short]-32.png
        archive/[project_short]-16.png
        [fromto etc/%.html archive/%.html
            [match_mask etc/%.html [source_files]]
        ]
        ;

source_file_order =
        README
        [sort
                [stringset
                        [source_files]
                        BUILDING
                        LICENSE

                        /*
                         * These two are for time stamping the distribution.
                         */
                        etc/version.so
                        lib/patchlevel.h

                        /*
                         * These four are for building the distribution.
                         */
                        Makefile.in
                        lib/config.h.in
                        install-sh
                        configure

                        /*
                         * This is for building the RPM package
                         */
                        [project_minus].spec

                        /*
                         * for the reference manual
                         */
                        etc/ref-index.so
                        etc/ref-parts.so
                        etc/new.so
                -
                        README
                ]
        ]
        ;


/*
 * These recipes build a Makefile for a user.  They do not build a
 * Makefile useful for a development build, because no arch
 * information is included in the Makefile.
 */

Makefile.in: [source_files]
{
    aemakegen -p [project] -c [change]
        | [awk] -f [resolve etc/Makefile.awk]
        > [target]
            set meter;
}

archive/[project_minus].tar.gz: [source_file_order]
        set shallow
{
        tar cf - [resolve [source_file_order]]
                | tardy
                        -una Peter -gna Miller
                        -unu 0 -gnu 0
                        -ms 0644 -mc 07022
                        -now
                        -prefix\=[project_minus]
                        [prepost "-rp=" "" [search_list]]
                | gzip -9
                > [target];
}

archive/[project_minus].%: %
        set shallow
{
        cat [resolve [need]] > [target];
}

archive/[project_minus].pdf: etc/reference.pdf
        set shallow
{
        cat [resolve [need]] > [target];
}

%: etc/%.man
{
        roffpp
                [prepost "-I" /[arch]/etc [search_list]]
                [prepost "-I" "/etc" [search_list]]
                [resolve etc/%.man]
        | groff -Tascii -t -P-bcu -man
        > [target];
}

archive/%.txt: etc/%.man
    set shallow
{
        roffpp
                [prepost "-I" /[arch]/etc [search_list]]
                [prepost "-I" "/etc" [search_list]]
                [resolve etc/%.man]
        | groff -Tascii -t -P-bcu -man
        > [target];
}

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

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


/*
 * This is not in the integration-build-targets because it takes far
 * too long to do.
 */

RPM: archive/[project_minus]-1.i386.rpm;

archive/[project_minus]-1.i386.rpm archive/[project_minus]-1.src.rpm:
                archive/[project_minus].tar.gz etc/rpm-build.sh
        set shallow
{
        sh [resolve etc/rpm-build.sh]
                RPM-temporary
                [resolve archive/[project_minus].tar.gz]
                ;
        mv RPM-temporary/RPMS/i386/[project_minus]-1.i386.rpm
                archive/[project_minus]-1.i386.rpm
                ;
        mv RPM-temporary/SRPMS/[project_minus]-1.src.rpm
                archive/[project_minus]-1.src.rpm
                ;
        rm -r RPM-temporary;
}

[project_minus].spec: etc/spec.sh [source_files]
{
        version\=[version_short]
        sh [resolve etc/spec.sh] [source_files]
                > [target];
}

archive/[project_minus].spec: [project_minus].spec
        set shallow
{
        cat [resolve [need]] > [target];
}

archive/%: etc/%.uue
        set shallow
{
        uudecode -o [target] [resolve [need]];
}


etc/%.html.d: etc/%.html
        set no-cascade
{
        c_incl -nc -ns -eia -r -nrec
                [prepost "-I" /[arch]/etc [search_list]]
                [prepost "-I" "/etc" [search_list]]
                -prefix "'cascade etc/"%".html ='"
                -suffix "';'"
                [resolve etc/%.html]
                [prepost "-rlp=" "" [search_list]] /* remove leading path */
                -slp [arch] "'[arch]'" /* substitute leading path */
                -o [target];
}

#include-cooked [addsuffix ".d" [match_mask etc/%.html [source_files]]]

archive/%.html: etc/%.html etc/ssp.awk
        set shallow
{
        roffpp
                [prepost "-I" /[arch]/etc [search_list]]
                [prepost "-I" "/etc" [search_list]]
                [resolve etc/%.html]
        | groff -Tascii -t -P-bcu -man
        | [awk] -f [resolve etc/ssp.awk]
        > [target];
}


etc/[project_short].lsm.d: etc/[project_short].lsm
        set no-cascade
{
        c_incl -nc -ns -eia -r -nrec
                [prepost "-I" /[arch]/etc [search_list]]
                [prepost "-I" "/etc" [search_list]]
                -prefix "'cascade etc/"[project_short]".lsm ='"
                -suffix "';'"
                [resolve etc/[project_short].lsm]
                [prepost "-rlp=" "" [search_list]] /* remove leading path */
                -slp [arch] "'[arch]'" /* substitute leading path */
                -o [target];
}

#include-cooked-nowarn etc/[project_short].lsm.d

archive/[project_minus].lsm: etc/[project_short].lsm etc/ssp.awk
        set shallow
{
        roffpp
                [prepost "-I" /[arch]/etc [search_list]]
                [prepost "-I" "/etc" [search_list]]
                [resolve etc/[project_short].lsm]
        | groff -Tascii -t -P-bcu -man
        | [awk] -f [resolve etc/ssp.awk]
        > [target];
}

LICENSE: man/cat1/srec_license.1
{
        cat [resolve [need]] > [target];
}

archive/%1-%2.png: archive/%1.png
{
    if [find_command pngcrush] then
    {
        convert [resolve archive/%1.png] -scale %2 [target].tmp;
        pngcrush -bkgd 255 255 255 -brute -q [target].tmp [target];
        rm [target].tmp;
    }
    else
    {
        convert [resolve archive/%1.png] -scale %2 [target];
    }
}

archive/srecord.ico:
    archive/srecord-16.png
    archive/srecord-24.png
    archive/srecord-32.png
    archive/srecord-48.png
    archive/srecord-64.png
    archive/srecord-96.png
    archive/srecord-128.png
{
    png2ico [target] [resolve [need]];
}


check-tarball: etc/check-tarball.sh archive/[project_minus].tar.gz
{
    sh [resolve etc/check-tarball.sh archive/[project_minus].tar.gz];
}