Speedup build somewhat.

This commit is contained in:
Kris Maglione 2010-07-27 14:28:04 -04:00
parent 6868022346
commit 3798957c3b
3 changed files with 18 additions and 13 deletions

View File

@ -63,13 +63,9 @@ constraintwin(Rectangle r) {
void void
destroyconstraintwin(Window *w) { destroyconstraintwin(Window *w) {
Window *w2;
if(w->aux) { if(w->aux)
w2 = w->aux; destroywindow(w->aux);
sethandler(w2, nil);
destroywindow(w2);
}
destroywindow(w); destroywindow(w);
} }

View File

@ -22,6 +22,11 @@ FILTER = cat
EXCFLAGS = $(INCLUDES) -D_XOPEN_SOURCE=600 EXCFLAGS = $(INCLUDES) -D_XOPEN_SOURCE=600
# Try to avoid bash if possible. It slows the build considerably.
SHELL := $(shell which /bin/dash 2>/dev/null || echo /bin/sh)
SHELL != which /bin/dash 2>/dev/null || echo /bin/sh
.SHELL: name=sh path=$(SHELL)
COMPILE_FLAGS = $(EXCFLAGS) $(CFLAGS) COMPILE_FLAGS = $(EXCFLAGS) $(CFLAGS)
COMPILE = $(SHELL) $(ROOT)/util/compile "$(CC)" "$(PACKAGES)" "$(COMPILE_FLAGS)" COMPILE = $(SHELL) $(ROOT)/util/compile "$(CC)" "$(PACKAGES)" "$(COMPILE_FLAGS)"
COMPILEPIC = $(SHELL) $(ROOT)/util/compile "$(CC)" "$(PACKAGES)" "$(COMPILE_FLAGS) $(SOCFLAGS)" COMPILEPIC = $(SHELL) $(ROOT)/util/compile "$(CC)" "$(PACKAGES)" "$(COMPILE_FLAGS) $(SOCFLAGS)"

View File

@ -8,11 +8,10 @@ CFLAGS=$3; shift 3
outfile="$1"; shift outfile="$1"; shift
bin="$(echo $0 | sed 's,/[^/]*$,,')" bin="$(echo $0 | sed 's,/[^/]*$,,')"
xtmp=/tmp/cc.$$.$USER.out
# Derived from Russ Cox's 9c in plan9port. # Derived from Russ Cox's 9c in plan9port.
xtmp=/tmp/cc.$$.$USER.out
echo CC $($bin/cleanname ${BASE}$outfile) echo CC $($bin/cleanname ${BASE}$outfile)
[ -n "$noisycc" ] && echo $CC -o $outfile $CFLAGS $@ [ -n "$noisycc" ] && echo $CC -o $outfile $CFLAGS $@
eval '$CC -o $outfile '"$CFLAGS"' $@ >$xtmp 2>&1' eval '$CC -o $outfile '"$CFLAGS"' $@ >$xtmp 2>&1'
@ -50,7 +49,16 @@ undup() { # GCC is crap.
nl=0 nl=0
maxl=6 maxl=6
} }
/: (error|note): .?Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level:|support .long long.|use of C99 long long|ISO C forbids conversion|warning:.*warn_unused_result/ {
next
}
$1 == "warning:" {
t = $2 " " $1
sub(/^[^ ]+ [^ ]+ /, "")
$0 = t " " $0
}
{ {
sub(/\[/, ": [", $1)
if(nl == maxl) if(nl == maxl)
shift() shift()
l[++nl] = $0 l[++nl] = $0
@ -62,12 +70,8 @@ undup() { # GCC is crap.
} }
cat $xtmp | sed "s,^$re,$base&,g; s,\([[:space:]]\)$re,\1$base\2,g" | cat $xtmp | sed "s,^$re,$base&,g; s,\([[:space:]]\)$re,\1$base\2,g" |
egrep -iv ': (error|note): .?Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level:|support .long long.|use of C99 long long|ISO C forbids conversion|warning:.*warn_unused_result' |
sed 's/ .first use in this function.$//; s/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g' | sed 's/ .first use in this function.$//; s/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g' |
awk '$1 == "warning:"{t=$2" "$1; sub(/^[^ ]+ [^ ]+ /, ""); $0 = t" "$0}; //' | undup >&2
awk '{sub(/\[/, ": [", $1); print}' |
undup 1>&2
rm -f $xtmp rm -f $xtmp
exit $status exit $status