Build to local directory and install as separate optional step.

This commit is contained in:
David Brown 2016-12-09 17:47:48 +00:00
parent c41cb011b6
commit d12393cc8c
12 changed files with 383 additions and 269 deletions

View file

@ -229,6 +229,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *)
LogWStr("Oberon-2 compiler v"); LogWStr(Configuration.versionLong); LogW("."); LogWLn;
LogWStr("Based on Ofront by J. Templ and Software Templ OEG."); LogWLn;
LogWStr("Further development by Norayr Chilingarian, David Brown and others."); LogWLn;
LogWStr("Loaded from "); LogWStr(Modules.BinaryDir); LogWLn;
LogWLn;
LogWStr("Usage:"); LogWLn;
LogWLn;

View file

@ -67,7 +67,7 @@ PROCEDURE LinkMain*(VAR moduleName: ARRAY OF CHAR; statically: BOOLEAN; addition
Strings.Append(Configuration.objflag, cmd);
Strings.Append(moduleName, cmd);
Strings.Append(Configuration.linkflags, cmd);
Strings.Append(Configuration.installdir, cmd);
Strings.Append(OPM.InstallDir, cmd);
Strings.Append('/lib"', cmd);
Strings.Append(Configuration.libspec, cmd);
Strings.Append('-O', cmd);

View file

@ -112,7 +112,10 @@ MODULE Modules; (* jt 6.1.96 *)
VAR i,j: INTEGER;
BEGIN
i := 0; j := CharCount(d);
(* Append delimiter c to d only if d is either empty or doesn not
already end in c. *)
IF (j > 0) & (d[j-1] # c) THEN d[j] := c; INC(j) END;
(* Append s to d *)
WHILE s[i] # 0X DO d[j] := s[i]; INC(i); INC(j) END;
d[j] := 0X;
END AppendPart;
@ -144,7 +147,9 @@ MODULE Modules; (* jt 6.1.96 *)
PROCEDURE IsFilePresent(s: ARRAY OF CHAR): BOOLEAN;
VAR identity: Platform.FileIdentity;
BEGIN RETURN Platform.IdentifyByName(s, identity) = 0
BEGIN
(*Out.String("IsFilePresent("); Out.String(s); Out.String(")."); Out.Ln;*)
RETURN Platform.IdentifyByName(s, identity) = 0
END IsFilePresent;
PROCEDURE ExtractPart(s: ARRAY OF CHAR; VAR i: INTEGER; p: ARRAY OF CHAR; VAR d: ARRAY OF CHAR);
@ -181,45 +186,50 @@ MODULE Modules; (* jt 6.1.96 *)
END;
END Trim;
PROCEDURE FindBinaryDir(VAR d: ARRAY OF CHAR);
PROCEDURE FindBinaryDir(VAR binarydir: ARRAY OF CHAR);
TYPE pathstring = ARRAY 4096 OF CHAR;
VAR
executable: pathstring;
dir: pathstring;
testpath: pathstring;
pathlist: pathstring;
arg0: pathstring; (* The command exactly as passed by the shell *)
pathlist: pathstring; (* The whole PATH environment variable *)
pathdir: pathstring; (* A single directory from the PATH *)
tempstr: pathstring;
i, j, k: INTEGER;
present: BOOLEAN;
BEGIN
IF ArgCount < 1 THEN
(* Shells and GUIs always pass the command as ARGV[0]. *)
d[0] := 0X;
(* The caller is misbehaving: Shells and GUIs always pass the command
as ARGV[0]. *)
binarydir[0] := 0X;
RETURN;
END;
(* First try ARGV[0] without looking at the PATH environment variable. *)
GetArg(0, testpath); Trim(testpath, executable);
Canonify(executable, d); present := IsFilePresent(d);
IF (~present) & (~IsAbsolute(testpath)) THEN
(* ARGV[0] alone didn't work, try non-absolute ARGV[0] with every entry in path. *)
GetArg(0, arg0); (* arg0 is the command binary file name passed by the shell. *)
i := 0; WHILE (arg0[i] # 0X) & (arg0[i] # '/') DO INC(i) END;
IF arg0[i] = '/' THEN
(* The argument contains a '/', we expect it to work without reference
to the path. *)
Trim(arg0, tempstr); Canonify(tempstr, binarydir);
present := IsFilePresent(binarydir)
ELSE
(* There are no '/'s in arg0, so search through the path. *)
Platform.GetEnv("PATH", pathlist);
i := 0;
i := 0; present := FALSE;
WHILE (~present) & (pathlist[i] # 0X) DO
ExtractPart(pathlist, i, ":;", dir); Trim(dir, testpath);
AppendPart('/', executable, testpath);
Canonify(testpath, d); present := IsFilePresent(d)
ExtractPart(pathlist, i, ":;", pathdir);
AppendPart('/', arg0, pathdir);
Trim(pathdir, tempstr); Canonify(tempstr, binarydir);
present := IsFilePresent(binarydir)
END
END;
IF present THEN
(* Remove trailing executable file name *)
k := CharCount(d);
WHILE (k > 0) & ~IsOneOf(d[k-1], '/\') DO DEC(k) END;
(* Chop off executable file name *)
IF k = 0 THEN d[k] := 0X ELSE d[k-1] := 0X END;
(* Remove trailing binarydir file name *)
k := CharCount(binarydir);
WHILE (k > 0) & ~IsOneOf(binarydir[k-1], '/\') DO DEC(k) END;
(* Chop off binarydir file name *)
IF k = 0 THEN binarydir[k] := 0X ELSE binarydir[k-1] := 0X END;
ELSE
d[0] := 0X (* Couldn't determine binary directory. *)
binarydir[0] := 0X (* Couldn't determine binary directory. *)
END
END FindBinaryDir;

View file

@ -44,6 +44,7 @@ sub logged {
print $log strftime("%H.%M.%S", localtime), " ", $line;
}
close($pipe);
print $log strftime("%H.%M.%S", localtime), " --- Make completed ---\n";
close($log);
exit;
}
@ -58,165 +59,8 @@ for my $machine (sort keys %machines) {
logged($cmd, $machine);
}
while ((my $pid = wait) > 0) {print "Child pid $pid completed.\n";}
# # All builds have completed. Now scan the logs for pass/fail and build the passing report.
my %status = ();
my $fn;
my $date;
my $time;
my $os;
my $compiler;
my $datamodel;
my $compilerok;
my $libraryok;
my $sourcechange;
my $asmchange;
my $tests;
my $key;
my $ver;
sub clearvars {
$time = ""; $branch = ""; $os = ""; $compiler = "";
$datamodel = ""; $compilerok = ""; $libraryok = ""; $sourcechange = "";
$asmchange = ""; $tests = ""; $key = ""; $ver = "";
system("perl report.pl $branch");
while ((my $pid = wait) > 0) {
print "Child pid $pid completed.\n";
system("perl report.pl $branch");
}
sub logstatus {
my ($fn) = @_;
if ($compiler ne "") {
$status{"$os-$compiler-$datamodel"} =
[$fn, $date, $time, $os, $compiler, $datamodel, $branch, $compilerok, $libraryok, $sourcechange, $asmchange, $tests];
}
clearvars();
}
sub parselog {
($fn) = @_;
clearvars();
open(my $log, $fn) // die "Couldn't open build log $fn.";
while (<$log>) {
if (/^([0-9\/]+) ([0-9.]+) .+\.log$/) {$date = $1}
if (/^([0-9.]+) /) {$time = $1}
# 19.39.58 Configuration: 1.95 [2016/07/14] for gcc LP64 on centos
if (/^[^ ]+ Configuration: ([0-9a-zA-Z.]+) \[[0-9\/]+\] for (.+) *$/) {
logstatus($fn);
$ver = $1;
printf "--- Config for $fn: $1 for $2.\n";
}
if (/^[^ ]+ --- Cleaning branch ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) ---$/) {
($branch, $os, $compiler, $datamodel) = ($1, $2, $3, $4, $5);
}
if (/^([0-9.]+) --- Compiler build started ---$/) {$compilerok = "Failed";}
if (/^([0-9.]+) --- Compiler build successfull ---$/) {$compilerok = "Built";}
if (/^([0-9.]+) --- Library build started ---$/) {$libraryok = "Failed";}
if (/^([0-9.]+) --- Library build successfull ---$/) {$libraryok = "Built";}
if (/^([0-9.]+) --- Generated c source files match bootstrap ---$/) {$sourcechange = "Unchanged";}
if (/^([0-9.]+) --- Generated c source files differ from bootstrap ---$/) {$sourcechange = "Changed";}
if (/^([0-9.]+) --- Generated code unchanged ---$/) {if ($asmchange eq "") {$asmchange = "Unchanged"}}
if (/^([0-9.]+) --- Generated code changed ---$/) {$asmchange = "Changed"}
if (/^([0-9.]+) --- Confidence tests started ---$/) {$tests = "Failed";}
if (/^([0-9.]+) --- Confidence tests passed ---$/) {$tests = "Passed";}
}
close($log);
logstatus($fn);
}
opendir DIR, "log" // die "Could not open log directory.";
my @logs = readdir DIR;
closedir DIR;
for my $logname (sort @logs) {
$logname = "log/" . $logname;
#print "Consider $logname\n";
if (-f $logname) {parselog($logname);}
}
my $fontheight = 12;
my $lineheight = 15;
sub svgtext {
my ($f, $x, $y, $colour, $msg) = @_;
print $f '<text x="', $x;
print $f '" y="', ($y+1)*$lineheight + $fontheight*0.4;
print $f '" font-family="Verdana" font-size="', $fontheight, 'px" fill="';
print $f $colour;
print $f '">';
print $f $msg;
print $f "</text>\n";
}
sub colourfor {
my ($str) = @_;
if ($str eq "Failed") {return "#e03030";}
if ($str eq "Changed") {return "#ff9d4d";}
return "#5adb5a";
}
my $rows = keys %status;
my $width = 710;
my $height = ($rows+2.2) * $lineheight;
open(my $svg, ">build-status.svg") // die "Could not create build-status.svg.";
print $svg '<svg width="', $width, '" height="', $height, '"';
print $svg ' xmlns="http://www.w3.org/2000/svg" version="1.1"';
print $svg ' xmlns:xlink="http://www.w3.org/1999/xlink"', ">\n";
print $svg '<rect x="3" y="3" width="', $width-6, '" height="', $height-6, '"';
print $svg ' rx="20" ry="20" fill="#404040"';
print $svg ' stroke="#d5850d" stroke-width="4"/>', "\n";
my $col1 = 20;
my $col2 = 97;
my $col3 = 160;
my $col4 = 220;
my $col5 = 280;
my $col6 = 330;
my $col7 = 380;
my $col8 = 440;
my $col9 = 490;
my $col10 = 570;
my $col11 = 650;
svgtext($svg, $col1, 0, "#e0e0e0", "Date");
svgtext($svg, $col3, 0, "#e0e0e0", "Branch");
svgtext($svg, $col4, 0, "#e0e0e0", "Platform");
svgtext($svg, $col7, 0, "#e0e0e0", "Compiler");
svgtext($svg, $col8, 0, "#e0e0e0", "Library");
svgtext($svg, $col9, 0, "#e0e0e0", "C Source");
svgtext($svg, $col10, 0, "#e0e0e0", "Assembler");
svgtext($svg, $col11, 0, "#e0e0e0", "Tests");
my $i=1;
for my $key (sort keys %status) {
my ($fn, $date, $time, $os, $compiler, $datamodel, $branch, $compilerok, $libraryok,
$sourcechange, $asmchange, $tests) = @{$status{$key}};
print $svg '<a xlink:href="', $fn, '">';
svgtext($svg, $col1, $i, "#c0c0c0", $date);
svgtext($svg, $col2, $i, "#c0c0c0", $time);
svgtext($svg, $col3, $i, "#c0c0c0", $branch);
svgtext($svg, $col4, $i, "#c0c0c0", $os);
svgtext($svg, $col5, $i, "#c0c0c0", $compiler);
svgtext($svg, $col6, $i, "#c0c0c0", $datamodel);
svgtext($svg, $col7, $i, colourfor($compilerok), $compilerok);
svgtext($svg, $col8, $i, colourfor($libraryok), $libraryok);
svgtext($svg, $col9, $i, colourfor($sourcechange), $sourcechange);
svgtext($svg, $col10, $i, colourfor($asmchange), $asmchange);
svgtext($svg, $col11, $i, colourfor($tests), $tests);
print $svg '</a>';
$i++;
}
print $svg "</svg>\n";
system 'chmod +r log/*';
system 'scp build-status.svg dave@hub:/var/www';
system 'scp log/* dave@hub:/var/www/log';

View file

@ -0,0 +1,176 @@
#!perl -w
use strict;
use warnings;
use POSIX "strftime";
use Cwd;
my $branch = "master";
if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]}
print "--- Running build status report on branch $branch.\n";
my %status = ();
my $fn;
my $date;
my $time;
my $os;
my $compiler;
my $datamodel;
my $compilerok;
my $libraryok;
my $sourcechange;
my $asmchange;
my $tests;
my $key;
my $ver;
sub clearvars {
$time = ""; $branch = ""; $os = ""; $compiler = "";
$datamodel = ""; $compilerok = ""; $libraryok = ""; $sourcechange = "";
$asmchange = ""; $tests = ""; $key = ""; $ver = "";
}
sub logstatus {
my ($fn) = @_;
if ($compiler ne "") {
$status{"$os-$compiler-$datamodel"} =
[$fn, $date, $time, $os, $compiler, $datamodel, $branch, $compilerok, $libraryok, $sourcechange, $asmchange, $tests];
}
clearvars();
}
sub parselog {
($fn) = @_;
clearvars();
open(my $log, $fn) // die "Couldn't open build log $fn.";
$branch = "Build on $fn started";
while (<$log>) {
if (/^([0-9\/]+) ([0-9.]+) .+\.log$/) {$date = $1}
if (/^([0-9.]+) /) {$time = $1}
# 19.39.58 Configuration: 1.95 [2016/07/14] for gcc LP64 on centos
if (/^[^ ]+ Configuration: ([0-9a-zA-Z.]+) \[[0-9\/]+\] for (.+) *$/) {
logstatus($fn);
$ver = $1;
printf "--- Config for $fn: $1 for $2.\n";
}
if (/^[^ ]+ --- Cleaning branch ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) ---$/) {
($branch, $os, $compiler, $datamodel) = ($1, $2, $3, $4, $5);
}
if (/^([0-9.]+) --- Compiler build started ---$/) {$compilerok = "Started";}
if (/^([0-9.]+) --- Compiler build successfull ---$/) {$compilerok = "Built";}
if (/^([0-9.]+) --- Library build started ---$/) {$libraryok = "Started";}
if (/^([0-9.]+) --- Library build successfull ---$/) {$libraryok = "Built";}
if (/^([0-9.]+) --- Generated c source files match bootstrap ---$/) {$sourcechange = "Unchanged";}
if (/^([0-9.]+) --- Generated c source files differ from bootstrap ---$/) {$sourcechange = "Changed";}
if (/^([0-9.]+) --- Generated code unchanged ---$/) {if ($asmchange eq "") {$asmchange = "Unchanged"}}
if (/^([0-9.]+) --- Generated code changed ---$/) {$asmchange = "Changed"}
if (/^([0-9.]+) --- Confidence tests started ---$/) {$tests = "Started";}
if (/^([0-9.]+) --- Confidence tests passed ---$/) {$tests = "Passed";}
if (/^([0-9.]+) --- Make completed ---$/) {
# Go back and convert 'Started' status to 'Failed'.
if ($branch =~ m/^Build on/) {$branch = "Build on $fn failed to start.";}
if ($compilerok eq "Started") {$compilerok = "Failed.";}
if ($libraryok eq "Started") {$libraryok = "Failed.";}
if ($tests eq "Started") {$tests = "Failed.";}
}
}
close($log);
logstatus($fn);
}
opendir DIR, "log" // die "Could not open log directory.";
my @logs = readdir DIR;
closedir DIR;
for my $logname (sort @logs) {
$logname = "log/" . $logname;
#print "Consider $logname\n";
if (-f $logname) {parselog($logname);}
}
my $fontheight = 12;
my $lineheight = 15;
sub svgtext {
my ($f, $x, $y, $colour, $msg) = @_;
print $f '<text x="', $x;
print $f '" y="', ($y+1)*$lineheight + $fontheight*0.4;
print $f '" font-family="Verdana" font-size="', $fontheight, 'px" fill="';
print $f $colour;
print $f '">';
print $f $msg;
print $f "</text>\n";
}
sub colourfor {
my ($str) = @_;
if ($str eq "Failed") {return "#e03030";}
if ($str eq "Changed") {return "#ff9d4d";}
return "#5adb5a";
}
my $rows = keys %status;
my $width = 710;
my $height = ($rows+2.2) * $lineheight;
open(my $svg, ">build-status.svg") // die "Could not create build-status.svg.";
print $svg '<svg width="', $width, '" height="', $height, '"';
print $svg ' xmlns="http://www.w3.org/2000/svg" version="1.1"';
print $svg ' xmlns:xlink="http://www.w3.org/1999/xlink"', ">\n";
print $svg '<rect x="3" y="3" width="', $width-6, '" height="', $height-6, '"';
print $svg ' rx="20" ry="20" fill="#404040"';
print $svg ' stroke="#d5850d" stroke-width="4"/>', "\n";
my $col1 = 20;
my $col2 = 97;
my $col3 = 160;
my $col4 = 220;
my $col5 = 280;
my $col6 = 330;
my $col7 = 380;
my $col8 = 440;
my $col9 = 490;
my $col10 = 570;
my $col11 = 650;
svgtext($svg, $col1, 0, "#e0e0e0", "Date");
svgtext($svg, $col3, 0, "#e0e0e0", "Branch");
svgtext($svg, $col4, 0, "#e0e0e0", "Platform");
svgtext($svg, $col7, 0, "#e0e0e0", "Compiler");
svgtext($svg, $col8, 0, "#e0e0e0", "Library");
svgtext($svg, $col9, 0, "#e0e0e0", "C Source");
svgtext($svg, $col10, 0, "#e0e0e0", "Assembler");
svgtext($svg, $col11, 0, "#e0e0e0", "Tests");
my $i=1;
for my $key (sort keys %status) {
my ($fn, $date, $time, $os, $compiler, $datamodel, $branch, $compilerok, $libraryok,
$sourcechange, $asmchange, $tests) = @{$status{$key}};
print $svg '<a xlink:href="', $fn, '">';
svgtext($svg, $col1, $i, "#c0c0c0", $date);
svgtext($svg, $col2, $i, "#c0c0c0", $time);
svgtext($svg, $col3, $i, "#c0c0c0", $branch);
svgtext($svg, $col4, $i, "#c0c0c0", $os);
svgtext($svg, $col5, $i, "#c0c0c0", $compiler);
svgtext($svg, $col6, $i, "#c0c0c0", $datamodel);
svgtext($svg, $col7, $i, colourfor($compilerok), $compilerok);
svgtext($svg, $col8, $i, colourfor($libraryok), $libraryok);
svgtext($svg, $col9, $i, colourfor($sourcechange), $sourcechange);
svgtext($svg, $col10, $i, colourfor($asmchange), $asmchange);
svgtext($svg, $col11, $i, colourfor($tests), $tests);
print $svg '</a>';
$i++;
}
print $svg "</svg>\n";
system 'chmod +r log/*';
system 'scp build-status.svg dave@hub:/var/www';
system 'scp log/* dave@hub:/var/www/log';

View file

@ -1,7 +1,7 @@
# Push buildall and postpush to postpush server
set -x
for f in postpush.pl buildall.pl build-oberon.sh; do
for f in *.pl build-oberon.sh; do
scp -P 5922 $f root@www:/var/lib/nethserver/ibay/githubhook/$f
ssh -p 5922 root@www "chmod +x /var/lib/nethserver/ibay/githubhook/$f"
done;

View file

@ -0,0 +1,28 @@
# addlibrary - shell script to install/uninstall oberon libraries
#
# $1 - "install" or "uninstall"
# $2 - location containing .so's
# $3 - oberon name
if ! which ldconfig >/dev/null 2>&1; then exit 0; fi
if test -d /etc/ld.so.conf.d; then
# Linux-like system
# Need to update the ldconfig configuration in the /etc/ld.so.conf.d dir.
if test "$1" = "install"; then
echo $2>/etc/ld.so.conf.d/lib$3.conf
else
rm -f /etc/ld.so.conf.d/lib$3.conf
fi
ldconfig
else
# BSD-like system
# Just run ldconfig -m to update the cache. It'll add-to/update/reove-from
# the cache appropraitely for whether they are present opt not.
ldconfig -m "$2"
fi

View file

@ -33,7 +33,7 @@ usage:
clean:
@printf '\n\n--- Cleaning branch $(BRANCH) $(OS) $(COMPILER) $(DATAMODEL) ---\n\n'
rm -rf $(BUILDDIR)
rm -rf $(BUILDDIR) $(ROOTDIR)/install
rm -f $(OBECOMP)
@ -142,68 +142,77 @@ browsercmd:
# makeinstalldir: Use only after a successful full build. Creates an
# installation directory image in $(BUILDDOR)/install
makeinstalldir:
@printf '\nCreating installation image at $(ROOTDIR)/install\n'
@rm -rf "$(ROOTDIR)/install"
@mkdir -p "$(ROOTDIR)/install/bin"
@cp $(OBECOMP) "$(ROOTDIR)/install/bin/$(OBECOMP)"
@-cp $(BUILDDIR)/showdef$(BINEXT) "$(ROOTDIR)/install/bin"
@mkdir -p "$(ROOTDIR)/install/2/include" && cp $(BUILDDIR)/2/*.h "$(ROOTDIR)/install/2/include/"
@mkdir -p "$(ROOTDIR)/install/2/sym" && cp $(BUILDDIR)/2/*.sym "$(ROOTDIR)/install/2/sym/"
@mkdir -p "$(ROOTDIR)/install/C/include" && cp $(BUILDDIR)/C/*.h "$(ROOTDIR)/install/C/include/"
@mkdir -p "$(ROOTDIR)/install/C/sym" && cp $(BUILDDIR)/C/*.sym "$(ROOTDIR)/install/C/sym/"
@cp $(BUILDDIR)/*.Txt "$(ROOTDIR)/install/2/sym/"
@cp $(BUILDDIR)/*.Txt "$(ROOTDIR)/install/C/sym/"
@mkdir -p "$(ROOTDIR)/install/lib"
@cp $(BUILDDIR)/2/lib$(ONAME)* "$(ROOTDIR)/install/lib/"
@cp $(BUILDDIR)/C/lib$(ONAME)* "$(ROOTDIR)/install/lib/"
# instructions: Advice on completion of local build
instructions: FORCE
@printf '\nOberon build and test complete, result is in $(ROOTDIR)/install\n'
@printf '\nYou can use the new compiler by running $(ROOTDIR)/install/bin/$(ONAME),\n'
@printf 'Or add it to your path as follows:\n'
@printf 'export PATH=\"$(ROOTDIR)/install/bin:$$PATH\"\n'
@printf '\n'
FORCE:
# installable: Check for access to the installation directory
# installable: Check for access to the installation directory
installable:
@rm -rf "S(INSTALLDIR)/test-access-qqq"
@if ! mkdir -p "$(INSTALLDIR)/test-access-qqq";then printf '\n\n Cannot write to install directory.\n Please use sudo or run as root/administrator.\n\n'; exit 1;fi
@rm -rf "S(INSTALLDIR)/test-access-qqq"
uninstall: installable
@printf '\nUninstalling from \"$(INSTALLDIR)\"\n'
rm -rf "$(INSTALLDIR)"
@sh src/tools/make/addlibrary.sh uninstall \""$(INSTALLDIR)/lib"\" $(oname)
# install: Use only after a successful full build. Installs the compiler
# and libraries in /opt/$(ONAME).
# May require root access.
install:
install: uninstall
@printf '\nInstalling into \"$(INSTALLDIR)\"\n'
@rm -rf "$(INSTALLDIR)"
@mkdir -p "$(INSTALLDIR)/bin"
@cp $(OBECOMP) "$(INSTALLDIR)/bin/$(OBECOMP)"
@-cp $(BUILDDIR)/showdef$(BINEXT) "$(INSTALLDIR)/bin"
@mkdir -p "$(INSTALLDIR)/2/include" && cp $(BUILDDIR)/2/*.h "$(INSTALLDIR)/2/include/"
@mkdir -p "$(INSTALLDIR)/2/sym" && cp $(BUILDDIR)/2/*.sym "$(INSTALLDIR)/2/sym/"
@mkdir -p "$(INSTALLDIR)/C/include" && cp $(BUILDDIR)/C/*.h "$(INSTALLDIR)/C/include/"
@mkdir -p "$(INSTALLDIR)/C/sym" && cp $(BUILDDIR)/C/*.sym "$(INSTALLDIR)/C/sym/"
@cp $(BUILDDIR)/*.Txt "$(INSTALLDIR)/2/sym/"
@cp $(BUILDDIR)/*.Txt "$(INSTALLDIR)/C/sym/"
@mkdir -p "$(INSTALLDIR)/lib"
@cp $(BUILDDIR)/2/lib$(ONAME)* "$(INSTALLDIR)/lib/"
@cp $(BUILDDIR)/C/lib$(ONAME)* "$(INSTALLDIR)/lib/"
@if which ldconfig >/dev/null 2>&1; then $(LDCONFIG); fi
# showpath: Describe how to set the PATH variable
showpath:
@cp -rf "$(ROOTDIR)/install/" "$(INSTALLDIR)"
@sh src/tools/make/addlibrary.sh install \""$(INSTALLDIR)/lib"\" $(ONAME)
@printf '\nOberon compiler installed to $(INSTALLDIR)\n'
@printf '\nNow add $(INSTALLDIR)/bin to your path, for example with the command:\n'
@printf 'export PATH=\"$(INSTALLDIR)/bin:\$$PATH\"\n'
@printf 'export PATH=\"$(INSTALLDIR)/bin:$$PATH\"\n'
@printf '\n'
uninstall:
@printf '\nUninstalling from \"$(INSTALLDIR)\"\n'
rm -rf "$(INSTALLDIR)"
rm -f /etc/ld.so.conf/lib$(ONAME)
if which ldconfig >/dev/null 2>&1; then ldconfig; fi
runtime:
runtime: FORCE
@printf '\nMaking run time library for -O$(MODEL)\n'
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Platform$(PLATFORM).Mod
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Heap.Mod
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Out.Mod
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Modules.Mod
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Strings.Mod
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Out.Mod
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/In.Mod
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/VT100.Mod
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Files.Mod
@ -387,7 +396,7 @@ sourcechanges:
RUNTEST = COMPILER=$(COMPILER) OBECOMP="$(OBECOMP) -O$(MODEL)" FLAVOUR=$(FLAVOUR) BRANCH=$(BRANCH) sh ./test.sh "$(INSTALLDIR)"
RUNTEST = COMPILER=$(COMPILER) OBECOMP="$(OBECOMP) -O$(MODEL)" FLAVOUR=$(FLAVOUR) BRANCH=$(BRANCH) sh ./test.sh "$(ROOTDIR)/install"
confidence:
@printf '\n\n--- Confidence tests ---\n\n'