#!/usr/bin/perl # # RTLGnat installation script $SCRIPT_NAME="install"; $SCRIPT_VERSION="0.1"; # print "$SCRIPT_NAME V$SCRIPT_VERSION\n"; # print "Copyright (C) Sept, 2003 OCERA Consortium.\n"; use Cwd; # Set current PATH $CPATH = cwd; $RTLINUX_DIR="../../../kernel/rtlinux/"; $GCC_DIR="/usr/bin/"; $GNAT_PATH="/usr/bin/"; print "Welcome to RTLGNAT installation "; print "\nRTLinux source is supposed to be installed in:\n". " $RTLINUX_DIR\n" . "Is this OK? (Y,n)"; if ( =~ /^[N,n]/) { print "RTLinux installation path?..."; chop ($RTLINUX_DIR = ); } (-e $RTLINUX_DIR) or die "Error: directory $RTLINUX_DIR doesn't exist"; print "\nGnat 3.14 is supposed to be installed in:\n". " $GNAT_PATH\n" . "Is this OK? (Y,n)"; if ( =~ /^[N,n]/) { print "Gnat installation path?..."; chop ($GNAT_PATH = ); } (-e $GNAT_PATH) or die "Error: directory $GNAT_PATH doesn't exist"; print "\ngcc 2.95.3 or above is supposed to be installed in:\n". " $GCC_DIR\n" . "Is this OK? (Y,n)"; if ( =~ /^[N,n]/) { print "gcc installation path?..."; chop ($RTLINUX_DIR = ); } (-e $RTLINUX_DIR) or die "Error: directory $GCC_DIR doesn't exist"; # Make scripts print "\nMaking scripts...\n"; system ("utils/rtinstall_scripts $CPATH $GNAT_PATH $GCC_DIR $RTLINUX_DIR") == 0 or die "Can't make rtinstall_scripts"; # Make rtlg print "\nMaking rtgl...\n"; system ("utils/rtmkrtgl") == 0 or die "Can't make rtmkrtgl"; print "\nDON'T FORGET PUT $GNAT_PATH IN YOUR PATH ". "AND COMPILE USING rtgnatmake\n";