OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [mpw-build.in] - Diff between revs 40 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 40 Rev 1765
# Top-level script fragment to build everything for MPW.
# Top-level script fragment to build everything for MPW.
Set savedir "`Directory`"
Set savedir "`Directory`"
#Set Echo 1
#Set Echo 1
Set ThisScript "{0}"
Set ThisScript "{0}"
Set objdir ":"
Set objdir ":"
Set verify 0
Set verify 0
Set BuildTarget "none"
Set BuildTarget "none"
# Parse arguments.
# Parse arguments.
Loop
Loop
        Break If {#} == 0
        Break If {#} == 0
                If "{BuildTarget}" =~ /none/
                If "{BuildTarget}" =~ /none/
                        Set BuildTarget "{1}"
                        Set BuildTarget "{1}"
                Else
                Else
                        Echo Only one build target allowed, ignoring "{1}"
                        Echo Only one build target allowed, ignoring "{1}"
                End If
                End If
        Shift 1
        Shift 1
End Loop
End Loop
If "{BuildTarget}" =~ /none/
If "{BuildTarget}" =~ /none/
        Set BuildTarget "all"
        Set BuildTarget "all"
End If
End If
If {verify} == 1
If {verify} == 1
        Echo "#" Doing "{ThisScript}" "{BuildTarget}" in "`Directory`" ...
        Echo "#" Doing "{ThisScript}" "{BuildTarget}" in "`Directory`" ...
End If
End If
Set ranmake 0
Set ranmake 0
If "`Exists Makefile`" != ""
If "`Exists Makefile`" != ""
        Echo "Set Echo 1" >{BuildTarget}.makeout
        Echo "Set Echo 1" >{BuildTarget}.makeout
        Make -f Makefile {BuildTarget} >>{BuildTarget}.makeout
        Make -f Makefile {BuildTarget} >>{BuildTarget}.makeout
        {BuildTarget}.makeout
        {BuildTarget}.makeout
        Delete {BuildTarget}.makeout
        Delete {BuildTarget}.makeout
        Set ranmake 1
        Set ranmake 1
End If
End If
If "`Exists Makefile.PPC`" != ""
If "`Exists Makefile.PPC`" != ""
        Echo "Set Echo 1" >{BuildTarget}.makeout.ppc
        Echo "Set Echo 1" >{BuildTarget}.makeout.ppc
        Make -f Makefile.PPC {BuildTarget} >>{BuildTarget}.makeout.ppc
        Make -f Makefile.PPC {BuildTarget} >>{BuildTarget}.makeout.ppc
        {BuildTarget}.makeout.ppc
        {BuildTarget}.makeout.ppc
        Delete {BuildTarget}.makeout.ppc
        Delete {BuildTarget}.makeout.ppc
        Set ranmake 1
        Set ranmake 1
End If
End If
If {ranmake} == 1
If {ranmake} == 1
        Exit
        Exit
End If
End If
# Dispatch on various pseudo-targets.
# Dispatch on various pseudo-targets.
If "{BuildTarget}" =~ /all/
If "{BuildTarget}" =~ /all/
        Echo Started `Date`
        Echo Started `Date`
        "{ThisScript}" all-gcc
        "{ThisScript}" all-gcc
        "{ThisScript}" all-gdb
        "{ThisScript}" all-gdb
        Echo Finished `Date`
        Echo Finished `Date`
Else If "{BuildTarget}" =~ /all-libiberty/
Else If "{BuildTarget}" =~ /all-libiberty/
        "{ThisScript}" do-libiberty
        "{ThisScript}" do-libiberty
Else If "{BuildTarget}" =~ /all-bfd/
Else If "{BuildTarget}" =~ /all-bfd/
        "{ThisScript}" do-bfd
        "{ThisScript}" do-bfd
Else If "{BuildTarget}" =~ /all-opcodes/
Else If "{BuildTarget}" =~ /all-opcodes/
        "{ThisScript}" do-opcodes
        "{ThisScript}" do-opcodes
Else If "{BuildTarget}" =~ /all-byacc/
Else If "{BuildTarget}" =~ /all-byacc/
        "{ThisScript}" do-byacc
        "{ThisScript}" do-byacc
Else If "{BuildTarget}" =~ /all-flex/
Else If "{BuildTarget}" =~ /all-flex/
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-libiberty
        "{ThisScript}" do-flex
        "{ThisScript}" do-flex
Else If "{BuildTarget}" =~ /all-binutils/
Else If "{BuildTarget}" =~ /all-binutils/
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-bfd
        "{ThisScript}" all-bfd
        "{ThisScript}" all-opcodes
        "{ThisScript}" all-opcodes
        "{ThisScript}" do-binutils
        "{ThisScript}" do-binutils
Else If "{BuildTarget}" =~ /all-gas/
Else If "{BuildTarget}" =~ /all-gas/
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-bfd
        "{ThisScript}" all-bfd
        "{ThisScript}" all-opcodes
        "{ThisScript}" all-opcodes
        "{ThisScript}" do-gas
        "{ThisScript}" do-gas
Else If "{BuildTarget}" =~ /all-gcc/
Else If "{BuildTarget}" =~ /all-gcc/
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-gas
        "{ThisScript}" all-gas
        "{ThisScript}" all-binutils
        "{ThisScript}" all-binutils
        "{ThisScript}" all-ld
        "{ThisScript}" all-ld
        "{ThisScript}" do-gcc
        "{ThisScript}" do-gcc
Else If "{BuildTarget}" =~ /all-gdb/
Else If "{BuildTarget}" =~ /all-gdb/
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-bfd
        "{ThisScript}" all-bfd
        "{ThisScript}" all-opcodes
        "{ThisScript}" all-opcodes
        "{ThisScript}" do-gdb
        "{ThisScript}" do-gdb
Else If "{BuildTarget}" =~ /all-grez/
Else If "{BuildTarget}" =~ /all-grez/
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-bfd
        "{ThisScript}" all-bfd
        "{ThisScript}" do-grez
        "{ThisScript}" do-grez
Else If "{BuildTarget}" =~ /all-ld/
Else If "{BuildTarget}" =~ /all-ld/
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-libiberty
        "{ThisScript}" all-bfd
        "{ThisScript}" all-bfd
        "{ThisScript}" all-opcodes
        "{ThisScript}" all-opcodes
        "{ThisScript}" do-ld
        "{ThisScript}" do-ld
Else If "{BuildTarget}" =~ /do-byacc/
Else If "{BuildTarget}" =~ /do-byacc/
        SetDirectory :byacc:
        SetDirectory :byacc:
        ::mpw-build all
        ::mpw-build all
Else If "{BuildTarget}" =~ /do-flex/
Else If "{BuildTarget}" =~ /do-flex/
        SetDirectory :flex:
        SetDirectory :flex:
        ::mpw-build _bootstrap
        ::mpw-build _bootstrap
        ::mpw-build all
        ::mpw-build all
Else If "{BuildTarget}" =~ /do-bfd/
Else If "{BuildTarget}" =~ /do-bfd/
        SetDirectory :bfd:
        SetDirectory :bfd:
        ::mpw-build all
        ::mpw-build all
Else If "{BuildTarget}" =~ /do-libiberty/
Else If "{BuildTarget}" =~ /do-libiberty/
        SetDirectory :libiberty:
        SetDirectory :libiberty:
        ::mpw-build all
        ::mpw-build all
Else If "{BuildTarget}" =~ /do-opcodes/
Else If "{BuildTarget}" =~ /do-opcodes/
        SetDirectory :opcodes:
        SetDirectory :opcodes:
        ::mpw-build all
        ::mpw-build all
Else If "{BuildTarget}" =~ /do-binutils/
Else If "{BuildTarget}" =~ /do-binutils/
        SetDirectory :binutils:
        SetDirectory :binutils:
        ::mpw-build stamps
        ::mpw-build stamps
        ::mpw-build all
        ::mpw-build all
Else If "{BuildTarget}" =~ /do-gas/
Else If "{BuildTarget}" =~ /do-gas/
        SetDirectory :gas:
        SetDirectory :gas:
        ::mpw-build stamps
        ::mpw-build stamps
        ::mpw-build all
        ::mpw-build all
Else If "{BuildTarget}" =~ /do-gcc/
Else If "{BuildTarget}" =~ /do-gcc/
        SetDirectory :gcc:
        SetDirectory :gcc:
        :mpw-build all
        :mpw-build all
Else If "{BuildTarget}" =~ /do-gdb/
Else If "{BuildTarget}" =~ /do-gdb/
        SetDirectory :gdb:
        SetDirectory :gdb:
        ::mpw-build all
        ::mpw-build all
Else If "{BuildTarget}" =~ /do-grez/
Else If "{BuildTarget}" =~ /do-grez/
        SetDirectory :grez:
        SetDirectory :grez:
        ::mpw-build all
        ::mpw-build all
Else If "{BuildTarget}" =~ /do-ld/
Else If "{BuildTarget}" =~ /do-ld/
        SetDirectory :ld:
        SetDirectory :ld:
        ::mpw-build all
        ::mpw-build all
Else If "{BuildTarget}" =~ /do-newlib/
Else If "{BuildTarget}" =~ /do-newlib/
        SetDirectory :newlib:
        SetDirectory :newlib:
        ::mpw-build all
        ::mpw-build all
Else If "{BuildTarget}" =~ /install/
Else If "{BuildTarget}" =~ /install/
        "{ThisScript}" install-only-top
        "{ThisScript}" install-only-top
        "{ThisScript}" install-binutils
        "{ThisScript}" install-binutils
        "{ThisScript}" install-gas
        "{ThisScript}" install-gas
        "{ThisScript}" install-gcc
        "{ThisScript}" install-gcc
        "{ThisScript}" install-ld
        "{ThisScript}" install-ld
        "{ThisScript}" install-gdb
        "{ThisScript}" install-gdb
Else If "{BuildTarget}" =~ /install-binutils/
Else If "{BuildTarget}" =~ /install-binutils/
        SetDirectory :binutils:
        SetDirectory :binutils:
        ::mpw-build install
        ::mpw-build install
Else If "{BuildTarget}" =~ /install-gas/
Else If "{BuildTarget}" =~ /install-gas/
        SetDirectory :gas:
        SetDirectory :gas:
        ::mpw-build install
        ::mpw-build install
Else If "{BuildTarget}" =~ /install-gcc/
Else If "{BuildTarget}" =~ /install-gcc/
        SetDirectory :gcc:
        SetDirectory :gcc:
        :mpw-build install
        :mpw-build install
Else If "{BuildTarget}" =~ /install-gdb/
Else If "{BuildTarget}" =~ /install-gdb/
        SetDirectory :gdb:
        SetDirectory :gdb:
        ::mpw-build install
        ::mpw-build install
Else If "{BuildTarget}" =~ /install-grez/
Else If "{BuildTarget}" =~ /install-grez/
        SetDirectory :grez:
        SetDirectory :grez:
        ::mpw-build install
        ::mpw-build install
Else If "{BuildTarget}" =~ /install-ld/
Else If "{BuildTarget}" =~ /install-ld/
        SetDirectory :ld:
        SetDirectory :ld:
        ::mpw-build install
        ::mpw-build install
Else If "{BuildTarget}" =~ /install-only/
Else If "{BuildTarget}" =~ /install-only/
        "{ThisScript}" install-only-top
        "{ThisScript}" install-only-top
        "{ThisScript}" install-only-binutils
        "{ThisScript}" install-only-binutils
        "{ThisScript}" install-only-gas
        "{ThisScript}" install-only-gas
        "{ThisScript}" install-only-gcc
        "{ThisScript}" install-only-gcc
        "{ThisScript}" install-only-gdb
        "{ThisScript}" install-only-gdb
        "{ThisScript}" install-only-ld
        "{ThisScript}" install-only-ld
Else If "{BuildTarget}" =~ /install-only-binutils/
Else If "{BuildTarget}" =~ /install-only-binutils/
        SetDirectory :binutils:
        SetDirectory :binutils:
        ::mpw-build install-only
        ::mpw-build install-only
Else If "{BuildTarget}" =~ /install-only-gas/
Else If "{BuildTarget}" =~ /install-only-gas/
        SetDirectory :gas:
        SetDirectory :gas:
        ::mpw-build install-only
        ::mpw-build install-only
Else If "{BuildTarget}" =~ /install-only-gcc/
Else If "{BuildTarget}" =~ /install-only-gcc/
        SetDirectory :gcc:
        SetDirectory :gcc:
        :mpw-build install-only
        :mpw-build install-only
Else If "{BuildTarget}" =~ /install-only-gdb/
Else If "{BuildTarget}" =~ /install-only-gdb/
        SetDirectory :gdb:
        SetDirectory :gdb:
        ::mpw-build install-only
        ::mpw-build install-only
Else If "{BuildTarget}" =~ /install-only-grez/
Else If "{BuildTarget}" =~ /install-only-grez/
        SetDirectory :grez:
        SetDirectory :grez:
        ::mpw-build install-only
        ::mpw-build install-only
Else If "{BuildTarget}" =~ /install-only-ld/
Else If "{BuildTarget}" =~ /install-only-ld/
        SetDirectory :ld:
        SetDirectory :ld:
        ::mpw-build install-only
        ::mpw-build install-only
Else If "{BuildTarget}" =~ /install-only-top/
Else If "{BuildTarget}" =~ /install-only-top/
        NewFolderRecursive "{prefix}"
        NewFolderRecursive "{prefix}"
        If "{prefix}" != "`Directory`"
        If "{prefix}" != "`Directory`"
                Duplicate -y 'Read Me for MPW' "{prefix}"'Read Me for MPW'
                Duplicate -y 'Read Me for MPW' "{prefix}"'Read Me for MPW'
                Duplicate -y Install "{prefix}"Install
                Duplicate -y Install "{prefix}"Install
        End If
        End If
Else
Else
        Echo {BuildTarget} not understood, ignoring
        Echo {BuildTarget} not understood, ignoring
End If
End If
SetDirectory "{savedir}"
SetDirectory "{savedir}"
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.