repo.or.cz
/
wvstreams.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
"wvtestmain ''" actually still runs all the tests, so skip the warning.
[wvstreams.git]
/
gen-cc
blob
3793350c3d4ba1a1ac58ef7e8695863358c81a7f
1
#!/bin/sh -e
2
OUTFILE
=
$1
3
EXT
=
$2
4
echo
"* Generating
$OUTFILE
"
>&
2
5
TEMPFILE
=
gencc-$$.tmp
6
7
cat
>
$TEMPFILE
<<-EOF
8
#!/bin/sh
9
set -e
10
11
MODE=\
$1
12
BASE=\
$2
13
DIR=\$(dirname \
$BASE
)
14
DEPFILE=\$(dirname \
$BASE
)/.\$(basename \
$BASE
.o).d
15
shift
16
shift
17
18
$CC
\
$MODE
-o \
$BASE
.o \
$BASE
.
$EXT
\\
19
-MMD -MF \
$DEPFILE
-MP -MQ \
$BASE
.o \\
20
$CPPFLAGS
\\
21
$CFLAGS
\\
22
"\$@"
23
EOF
24
25
chmod
a
+
x
$TEMPFILE
26
mv
$TEMPFILE $OUTFILE