114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
...
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
|
local output=$2
local flags=$3
if test -e "$output"; then
if test ! "$output" -ot "$src"; then
return
fi
fi
$m4 $macro_compile_env -I "$gen" $flags "$src" > "$output"
announce $m4 $macro_compile_env -I "$gen" $flags "$src" \> "$output"
# yes, this is incredibly stupid. if you know a better way, feel
# free to submit a fix. the problem is there's no way to pass >
# to report in such a way that it'll do the right thing, and if
# you just write > it redirects *report's* output, instead of
# m4's. piece of shit that it is, m4 doesn't have any way to emit
# output into a fille - stdout only apparently. tl;dr i hate bash.
}
................................................................................
local output=$2
local flags=$3
if test -e "$output"; then
if test ! "$output" -ot "$src"; then
return
fi
fi
report $asm $flags "-f$bin_fmt" -i "$gen" "$src" -o "$output";
}
comp_co() { comp_c $1 $2 "-c -fPIC"; }
comp_c(){
local src=$1
local output=$2
local flags=$3
if test -e "$output"; then
if test ! "$output" -ot "$src"; then
return
fi
fi
# only rebuild the file if the source file is newer
report $cc $src $3 -std=c11 -isystem "$to" -isystem "$gen" -isystem "arch/" -nostdlib "-L$to" "-o$output"
}
say "commencing libk build $build at $(timestamp)"
# set -x
# get type data
mkdir -p $gen
|
>
>
>
|
|
>
>
>
|
>
>
>
>
>
|
|
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
...
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
|
local output=$2
local flags=$3
if test -e "$output"; then
if test ! "$output" -ot "$src"; then
return
fi
fi
if test "$debug" = yes; then
local dflag=-Dcompile_debug=yes
fi
$m4 $macro_compile_env $dflag -I "$gen" $flags "$src" > "$output"
announce $m4 $macro_compile_env $dflag -I "$gen" $flags "$src" \> "$output"
# yes, this is incredibly stupid. if you know a better way, feel
# free to submit a fix. the problem is there's no way to pass >
# to report in such a way that it'll do the right thing, and if
# you just write > it redirects *report's* output, instead of
# m4's. piece of shit that it is, m4 doesn't have any way to emit
# output into a fille - stdout only apparently. tl;dr i hate bash.
}
................................................................................
local output=$2
local flags=$3
if test -e "$output"; then
if test ! "$output" -ot "$src"; then
return
fi
fi
if test "$debug" = yes; then
local dflag="-g dwarf2"
fi
report $asm $flags $dflag "-f$bin_fmt" -i "$gen" "$src" -o "$output";
}
comp_co() { comp_c $1 $2 "-c -fPIC"; }
comp_c(){
local src=$1
local output=$2
local flags=$3
if test -e "$output"; then
if test ! "$output" -ot "$src"; then
return
fi
fi
# only rebuild the file if the source file is newer
if test "$debug" = yes; then
local dflag="-g"
else
local dflag="-O4"
fi
report $cc $src $3 $dflag -std=c11 -isystem "$to" -isystem "$gen" -isystem "arch/" -ffreestanding -nostdlib "-L$to" "-o$output"
}
say "commencing libk build $build at $(timestamp)"
# set -x
# get type data
mkdir -p $gen
|