Changeset 28226


Ignore:
Timestamp:
Aug 25, 2007, 3:24:47 PM (13 years ago)
Author:
mww@…
Message:

add a very simple wrapper for merge.rb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r28091 r28226  
    19401940}
    19411941
     1942
     1943# simple wrapper for calling merge.rb - for creating universal binaries (etc.)
     1944# this is intended to be called during destroot, e.g. 'merge i386 ppc'
     1945# this will merge the directories $destroot/i386 & $destroot/ppc into $destroot
     1946proc merge args {
     1947        global workpath prefix destroot
     1948        set all_args "-i ${destroot} -o ${destroot} -v debug"
     1949        set architectures ""
     1950
     1951        # check existance of given architectures in $destroot
     1952        foreach arg $args {
     1953                if [file exists ${destroot}/${arg}] {
     1954                        ui_debug "found architecture '${arg}'"
     1955                        set architectures "${architectures} $arg"
     1956                } else {
     1957                        ui_error "could not find directory for architecture '${arg}'"
     1958                }
     1959        }
     1960        set all_args "${all_args} ${architectures}"
     1961
     1962        # call merge.rb
     1963        ui_debug "executing merge.rb with '${all_args}'"
     1964        set fullcmdstring "${prefix}/bin/merge.rb $all_args"
     1965        set code [catch {system $fullcmdstring} result]
     1966        ui_debug "merge returned: '${result}'"
     1967
     1968        foreach arg ${architectures} {
     1969                ui_debug "removing arch directory \"$arg\""
     1970                file delete -force ${destroot}/${arg}
     1971        }
     1972
     1973        return -code $code $result
     1974}
     1975
Note: See TracChangeset for help on using the changeset viewer.