[Rant] First working implemention of md5 checksum file change recognition

Stefan Lang langstefan at gmx.at
Sat Jul 23 18:26:40 EDT 2005


Excellent news!
Nothing beats Ruby. After a few hours of work, the following is possible.

    # automatically imports "signature/md5" and "metadata"
    # since we didn't so explicitely
    import "signedfile"
    
    # this normal file task...
    file "a" => ["f1", "f2", "f3"] do |t|
        sys "cat f1 f2 f3 > #{t.name}"
    end

    # ...is equivalent to the following task
    gen SignedFile, "b" => ["f1", "f2", "f3"] do |t|
        sys "cat f1 f2 f3 > #{t.name}"
    end

Now, file task "a" works with modification times and
file task "b" with md5 checksums.

If all goes well, tomorrow we'll have:

    import "signall"

    # and now, all file task use a SignedFile instead
    # of a normal FileTask
    file "a" => ["f1", "f2", "f3"] ...

I haven't tested it much but I made a primitive benchmark:
On my Athlon 900 Rant needs about 0.5 s to do the dependency
checking for a file task with about 200 files (with a total size
of about 12.5 MB) as prerequisites (i.e. source files).
Should be acceptable?

-- 
Stefan


More information about the make-cafe mailing list