Skip to content
Snippets Groups Projects
Commit 52d84821 authored by sof's avatar sof
Browse files

[project @ 1997-09-03 23:29:55 by sof]

Added clean up signal handlers
parent a788fb0b
No related branches found
No related tags found
No related merge requests found
...@@ -156,15 +156,20 @@ print STDERR "Include_dirs=@Include_dirs\n" if $Verbose; ...@@ -156,15 +156,20 @@ print STDERR "Include_dirs=@Include_dirs\n" if $Verbose;
@Depend_lines = (); @Depend_lines = ();
# Delete temp. file if script is halted.
sub quit_upon_signal { print STDERR "Deleting $Tmp_prefix.hs .. \n"; unlink "$Tmp_prefix.hs"; }
$SIG{'INT'} = 'quit_upon_signal';
$SIG{'QUIT'} = 'quit_upon_signal';
foreach $sf (@Src_files) { foreach $sf (@Src_files) {
# just like lit-inputter # just like lit-inputter
# except it puts each file through CPP and # except it puts each file through CPP and
# a de-commenter (not implemented); # a de-commenter (not implemented);
# builds up @Depend_lines # builds up @Depend_lines
print STDERR "Here we go for source file: $sf\n" if $Verbose; print STDERR "Here we go for source file: $sf\n" if $Verbose;
($bf = $sf) =~ s/\.l?(hs|y)$//; ($bf = $sf) =~ s/\.l?(hs|y)$//;
#push(@Depend_lines, "$bf.$Obj_suffix $bf.hi : $sf\n");
#push(@Depend_lines, "$bf.$Obj_suffix : $sf\n");
local($str)=""; local($str)="";
foreach $obj (@Obj_suffix) { foreach $obj (@Obj_suffix) {
$str .= "$bf.$obj "; $str .= "$bf.$obj ";
...@@ -188,6 +193,7 @@ foreach $sf (@Src_files) { ...@@ -188,6 +193,7 @@ foreach $sf (@Src_files) {
} }
} }
# OK, mangle the Makefile # OK, mangle the Makefile
unlink("$Makefile.bak"); unlink("$Makefile.bak");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment