Annotation of protozilla/ipc/makemake, revision 1.1

1.1     ! saravn      1: #!/bin/csh
        !             2: # makemake: Dumb script to make Makefile from Makefile.in
        !             3: #           (recursively, if -r is specified)
        !             4: # Usage: makemake [-r]
        !             5: 
        !             6: if ($#argv == 0) then
        !             7:    set makelist = (./Makefile.in)
        !             8: else
        !             9:    set makelist = (`find . -name Makefile.in -print`)
        !            10: endif
        !            11: 
        !            12: foreach makefile ($makelist)
        !            13:    set dir=${makefile:h}
        !            14:    pushd $dir
        !            15: 
        !            16:    set wd=`pwd`
        !            17:    echo $wd
        !            18: 
        !            19:    set top_srcdir = ""
        !            20:    while (("$wd" != "") && (${wd:t} != "mozilla"))
        !            21:       if ("$top_srcdir" == "") then
        !            22:          set top_srcdir = ".."
        !            23:       else
        !            24:          set top_srcdir = "../$top_srcdir"
        !            25:       endif
        !            26:       set wd=${wd:h}
        !            27:    end
        !            28: 
        !            29:    /bin/cp Makefile.in Makefile
        !            30:    ex -s Makefile << /EOF
        !            31: set nomagic
        !            32: g%@srcdir@%s%@srcdir@%.%gp
        !            33: g%@top_srcdir@%s%@top_srcdir@%${top_srcdir}%gp
        !            34: wq
        !            35: /EOF
        !            36: 
        !            37:    popd
        !            38: end

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>