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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [mpw-install] - Diff between revs 40 and 1765

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

Rev 40 Rev 1765
# GNU Install script for MPW.
# GNU Install script for MPW.
Set OldExit "{Exit}"
Set OldExit "{Exit}"
Set Exit 0
Set Exit 0
Set TempUserStartup "{TempFolder}"__temp__UserStartup
Set TempUserStartup "{TempFolder}"__temp__UserStartup
Echo '# UserStartup generated by GNU Install script' > "{TempUserStartup}"
Echo '# UserStartup generated by GNU Install script' > "{TempUserStartup}"
Echo ''                                         >> "{TempUserStartup}"
Echo ''                                         >> "{TempUserStartup}"
# (should) Check that disk space is sufficient for installation.
# (should) Check that disk space is sufficient for installation.
# Assume that the install script is where everything else is.
# Assume that the install script is where everything else is.
Set thisdir "`Directory`"
Set thisdir "`Directory`"
# Copy the binaries to the desired place.
# Copy the binaries to the desired place.
Confirm -t "Copy the binaries to somewhere else?"
Confirm -t "Copy the binaries to somewhere else?"
Set TmpStatus {Status}
Set TmpStatus {Status}
If {TmpStatus} == 0
If {TmpStatus} == 0
        Set bindest "`GetFileName -d -m "Where to install the binaries?"`"
        Set bindest "`GetFileName -d -m "Where to install the binaries?"`"
        If {Status} == 0
        If {Status} == 0
                If "`Exists "{thisdir}bin"`" != ""
                If "`Exists "{thisdir}bin"`" != ""
                        For afile In "{thisdir}"bin:\Option-x
                        For afile In "{thisdir}"bin:\Option-x
                                Duplicate -y "{afile}" "{bindest}"
                                Duplicate -y "{afile}" "{bindest}"
                        End For
                        End For
                Else
                Else
                        Echo "bin directory not found, exiting"
                        Echo "bin directory not found, exiting"
                        Exit 1
                        Exit 1
                End If
                End If
        Else
        Else
                Echo "No destination supplied, exiting"
                Echo "No destination supplied, exiting"
                Exit 1
                Exit 1
        End If
        End If
Else If {TmpStatus} == 4
Else If {TmpStatus} == 4
        # Use the existing directory.
        # Use the existing directory.
        Set bindest "{thisdir}bin:"
        Set bindest "{thisdir}bin:"
Else
Else
        # Cancelled from confirmation, escape altogether.
        # Cancelled from confirmation, escape altogether.
        Exit 1
        Exit 1
End If
End If
# Copy the libraries to the desired place.
# Copy the libraries to the desired place.
Confirm -t "Copy the libraries to somewhere else?"
Confirm -t "Copy the libraries to somewhere else?"
Set TmpStatus {Status}
Set TmpStatus {Status}
If {TmpStatus} == 0
If {TmpStatus} == 0
        Set libdest "`GetFileName -d -m "Where to install the libraries?"`"
        Set libdest "`GetFileName -d -m "Where to install the libraries?"`"
        If {Status} == 0
        If {Status} == 0
                If "`Exists "{thisdir}lib:"`" != ""
                If "`Exists "{thisdir}lib:"`" != ""
                        For afile In "{thisdir}"lib:\Option-x
                        For afile In "{thisdir}"lib:\Option-x
                                Duplicate -y "{afile}" "{libdest}"
                                Duplicate -y "{afile}" "{libdest}"
                        End For
                        End For
                Else
                Else
                        Echo "lib directory not found, exiting"
                        Echo "lib directory not found, exiting"
                        Exit 1
                        Exit 1
                End If
                End If
        Else
        Else
                Echo "No destination supplied, exiting"
                Echo "No destination supplied, exiting"
                Exit 1
                Exit 1
        End If
        End If
Else If {TmpStatus} == 4
Else If {TmpStatus} == 4
        # Use the existing directory.
        # Use the existing directory.
        Set libdest "{thisdir}lib:"
        Set libdest "{thisdir}lib:"
Else
Else
        # Cancelled from confirmation, escape altogether.
        # Cancelled from confirmation, escape altogether.
        Exit 1
        Exit 1
End If
End If
# Add the location of the binaries to the command path.
# Add the location of the binaries to the command path.
Echo -n 'Set Commands "'                        >> "{TempUserStartup}"
Echo -n 'Set Commands "'                        >> "{TempUserStartup}"
Echo -n "{bindest}"                             >> "{TempUserStartup}"
Echo -n "{bindest}"                             >> "{TempUserStartup}"
Echo    ',{Commands}"'                          >> "{TempUserStartup}"
Echo    ',{Commands}"'                          >> "{TempUserStartup}"
Echo ''                                         >> "{TempUserStartup}"
Echo ''                                         >> "{TempUserStartup}"
# Set up GCC exec prefix.
# Set up GCC exec prefix.
Set gcclibdir "{libdest}"gcc-lib:
Set gcclibdir "{libdest}"gcc-lib:
Echo -n 'Set GCC_EXEC_PREFIX "'                 >> "{TempUserStartup}"
Echo -n 'Set GCC_EXEC_PREFIX "'                 >> "{TempUserStartup}"
Echo -n "{gcclibdir}"                           >> "{TempUserStartup}"
Echo -n "{gcclibdir}"                           >> "{TempUserStartup}"
Echo    '"'                                     >> "{TempUserStartup}"
Echo    '"'                                     >> "{TempUserStartup}"
Echo "Export GCC_EXEC_PREFIX"                   >> "{TempUserStartup}"
Echo "Export GCC_EXEC_PREFIX"                   >> "{TempUserStartup}"
Echo ''                                         >> "{TempUserStartup}"
Echo ''                                         >> "{TempUserStartup}"
# Set up path to libgcc.xcoff etc.
# Set up path to libgcc.xcoff etc.
Echo -n 'Set GCCPPCLibraries "'                 >> "{TempUserStartup}"
Echo -n 'Set GCCPPCLibraries "'                 >> "{TempUserStartup}"
Echo -n "{libdest}"                             >> "{TempUserStartup}"
Echo -n "{libdest}"                             >> "{TempUserStartup}"
Echo    '"'                                     >> "{TempUserStartup}"
Echo    '"'                                     >> "{TempUserStartup}"
Echo "Export GCCPPCLibraries"                   >> "{TempUserStartup}"
Echo "Export GCCPPCLibraries"                   >> "{TempUserStartup}"
Echo ''                                         >> "{TempUserStartup}"
Echo ''                                         >> "{TempUserStartup}"
# Display contents of UserStartup, confirm installation.
# Display contents of UserStartup, confirm installation.
Set UserStartupName "UserStartup\Option-8GNU"
Set UserStartupName "UserStartup\Option-8GNU"
Echo "Contents of" {UserStartupName} "will be:"
Echo "Contents of" {UserStartupName} "will be:"
Catenate "{TempUserStartup}"
Catenate "{TempUserStartup}"
Confirm "Install {UserStartupName} into the MPW folder {MPW} ?"
Confirm "Install {UserStartupName} into the MPW folder {MPW} ?"
If {Status} == 0
If {Status} == 0
        Duplicate "{TempUserStartup}" "{MPW}{UserStartupName}"
        Duplicate "{TempUserStartup}" "{MPW}{UserStartupName}"
        Delete -y "{TempUserStartup}"
        Delete -y "{TempUserStartup}"
Else
Else
        Echo "{UserStartupName} file not installed"
        Echo "{UserStartupName} file not installed"
End If
End If
# (should) Check HEXA resource, warn if low.
# (should) Check HEXA resource, warn if low.
# (should) Check for spaces in pathnames, warn if found.
# (should) Check for spaces in pathnames, warn if found.
Echo "Installation was successful."
Echo "Installation was successful."
Echo ""
Echo ""
Echo "Be sure to review the usage notes in 'Read Me for MPW' before proceeding!"
Echo "Be sure to review the usage notes in 'Read Me for MPW' before proceeding!"
# Restore previous settings.
# Restore previous settings.
Set Exit "{OldExit}"
Set Exit "{OldExit}"
 
 

powered by: WebSVN 2.1.0

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