diff options
| author | welinder@troll.com <welinder@troll.com> | 2004-08-12 13:40:32 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:02:38 -0700 |
| commit | bb9b7d06ff12902b1016a71576aa3f5a30082643 (patch) | |
| tree | bafb11f15b891aa2a221c3bb1048714f82c00eb5 /cgcc | |
| parent | ba4cf7e14abe23a880a8607f31136642b202f101 (diff) | |
| download | sparse-dev-bb9b7d06ff12902b1016a71576aa3f5a30082643.tar.gz | |
Wrapper to run check and gcc in series.
Diffstat (limited to 'cgcc')
| -rw-r--r-- | cgcc | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -0,0 +1,22 @@ +#!/usr/bin/perl -w +# ----------------------------------------------------------------------------- + +my $cc = $ENV{'REAL_CC'} || 'cc'; +my $check = $ENV{'CHECK'} || 'check'; + +# Look for a .c file. We don't want to run the checker on .o or .so files +# in the link run. (This simplistic check knows nothing about options +# with arguments, but it seems to do the job.) +my $seen_a_c_file = 0; +foreach (@ARGV) { + if (/^[^-].*\.c/) { + $seen_a_c_file = 1; + last; + } +} + +if ($seen_a_c_file) { + system ($check, @ARGV); +} + +exec ($cc, @ARGV); |
