diff options
author | Frans Kaashoek <[email protected]> | 2019-07-24 09:05:05 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2019-07-24 09:05:05 -0400 |
commit | e6276088107e814bea95aee42868065dc41c1e8b (patch) | |
tree | 6204c027e2fe5c80df8629ba0048c7b6ba0e86fe /cuth | |
parent | 6f3a441c10ca714041c0ace01b0e7d92d5846768 (diff) | |
download | xv6-labs-e6276088107e814bea95aee42868065dc41c1e8b.tar.gz xv6-labs-e6276088107e814bea95aee42868065dc41c1e8b.tar.bz2 xv6-labs-e6276088107e814bea95aee42868065dc41c1e8b.zip |
Delete a few other no-longer relevant files
Diffstat (limited to 'cuth')
-rwxr-xr-x | cuth | 48 |
1 files changed, 0 insertions, 48 deletions
@@ -1,48 +0,0 @@ -#!/usr/bin/perl - -$| = 1; - -sub writefile($@){ - my ($file, @lines) = @_; - - sleep(1); - open(F, ">$file") || die "open >$file: $!"; - print F @lines; - close(F); -} - -# Cut out #include lines that don't contribute anything. -for($i=0; $i<@ARGV; $i++){ - $file = $ARGV[$i]; - if(!open(F, $file)){ - print STDERR "open $file: $!\n"; - next; - } - @lines = <F>; - close(F); - - $obj = "$file.o"; - $obj =~ s/\.c\.o$/.o/; - system("touch $file"); - - if(system("make CC='gcc -Werror' $obj >/dev/null 2>\&1") != 0){ - print STDERR "make $obj failed: $rv\n"; - next; - } - - system("cp $file =$file"); - for($j=@lines-1; $j>=0; $j--){ - if($lines[$j] =~ /^#include/){ - $old = $lines[$j]; - $lines[$j] = "/* CUT-H */\n"; - writefile($file, @lines); - if(system("make CC='gcc -Werror' $obj >/dev/null 2>\&1") != 0){ - $lines[$j] = $old; - }else{ - print STDERR "$file $old"; - } - } - } - writefile($file, grep {!/CUT-H/} @lines); - system("rm =$file"); -} |