diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
commit | 3df4acfa816441fc28a95dee6d0191a927145d95 (patch) | |
tree | b5ae7ca44662cfd8e5c95f1826e4406021a606f5 /docs/tutorials/fix.Makefile | |
parent | 60a5612b83d856fc0adc52b9f39fac9960ec9818 (diff) | |
download | ATCD-pre-subset.tar.gz |
This commit was manufactured by cvs2svn to create tag 'pre-subset'.pre-subset
Diffstat (limited to 'docs/tutorials/fix.Makefile')
-rwxr-xr-x | docs/tutorials/fix.Makefile | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/docs/tutorials/fix.Makefile b/docs/tutorials/fix.Makefile deleted file mode 100755 index 8e3d2ac9187..00000000000 --- a/docs/tutorials/fix.Makefile +++ /dev/null @@ -1,68 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -require "getopts.pl"; -&Getopts("f:o:"); - -$opt_f = "Makefile" if( ! $opt_f ); -$opt_o = ".depend" if( ! $opt_o ); - - # Open the Makefile that has been mangled by 'make depend' - # and suck it into a perl array. -open(IF,"<$opt_f") || die; -@makefile = <IF>; -close(IF); - - # Now open our .depend file and a temporary Makefile. - # We'll split the original Makefile between these two. -open(DF,">$opt_o") || die; -open(MF,">$opt_f.tmp") || die; - - # For each line we read out of the original file... -foreach (@makefile) { - - # If we're into the dependency section, write the line - # into the .depend file. - # - if( $depend ) { - print DF $_; - } - else { - # If we haven't gotten to the dependency section yet - # then see if the current line is the separator that - # "make depend" causes to be inserted. - # - if( m/^\Q# DO NOT DELETE THIS LINE -- g++dep uses it.\E/ ) { - - # If so, change our "mode" and skip this line. - ++$depend; - next; - } - - # Also skip the "include .depend" that we insert. If we - # don't do this, it is possible to have a bunch of these - # inserted into the output when we read an unmangled Makefile - next if( m/^include $opt_o/ ); - - # Print the non-dependency info to the temporary Makefile - print MF $_; - } -} - -# Tell our new Makefile to include the dependency file -print MF "include $opt_o\n"; - -# Close the two output files... -close(DF); -close(MF); - -# Unlink (remove) the original Makefile and rename our -# temporary file. There's obviously room for error checking -# here but we've got the Makefile checked into some revision -# control system anyway. Don't we? - -unlink("$opt_f"); -rename("$opt_f.tmp","$opt_f"); - -exit(0); |