for unconditional make 
Author Message
 for unconditional make

I am making a painful transition from SGI's to SUN's and my favorite
"make -u" trick doesn't work on the SUN's. I was too lazy to read the
man pages and figure I can just write some TCL code to do what I want.
Here it is:

----------------------------------------------------------------------
#!/usr/local/bin/tclsh

set target [lindex $argv 0]
set pipe [open "| make -P $target"]
gets $pipe

set parent($target) set

while {![eof $pipe]} {
    set files [split [gets $pipe] ": "]
    set child [lindex $files 0]
    if {[info exists parent($child)] && [file exists $child]} {
        puts "rm $child"
        exec rm $child
        unset parent($child)
    }
    foreach p [lrange $files 1 end] {
        set parent($p) set
    }

Quote:
}


#

----------------------------------------------------------------------

So if you name this script umake, then just do:

        % umake foo.bar

It will force a re-generation of all the files on which foo.bar depend
on (except your source code, of course). I am not 100% sure if the
code is correct. Beware that it may delete files randomly :-)

All disclaimers apply.

Ioi



Wed, 25 Feb 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. unconditional patterns into if/else

2. Unconditional jump penalty on Pentium

3. Made a Drag & Drop File Compare (made mainly for Comma Delimited Text Data )

4. I made eight radio buttons exclusive by each other.But It made the orignal program slow down.

5. Making Python like LISP? (+making Python into Modula-3?)

6. Special Functions for APL (and making APL atractive for Science)

7. Making a Brush from a Bitmap

8. what makes the atomic rep so special?

9. Making a sorted collection to a SortedCollection

10. me and my roommates made a video, want to see

11. What makes you write ugly Smalltalk?

12. Secrets to Making Big $ with Ebay Revealed

 

 
Powered by phpBB® Forum Software