diff --git a/bootstrap/Stage1.sml b/bootstrap/Stage1.sml index 308c8cbc..8c1847b7 100644 --- a/bootstrap/Stage1.sml +++ b/bootstrap/Stage1.sml @@ -1,23 +1,28 @@ (* Title: First stage bootstrap from interpreted code. Copyright David Matthews 2020 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *) (* Build the main basis library. *) val () = Bootstrap.use "basis/build.sml"; +val args = CommandLine.arguments() +fun getPath [] = "." (* Default path *) +| getPath ("-I" :: path :: _) = path +| getPath (_::tl) = getPath tl +val path = OS.Path.concat(getPath args, "bootstrap/Stage2.sml"); (* We've now set up the new name space. Compile the compiler. *) -PolyML.use "bootstrap/Stage2.sml"; +PolyML.use path; diff --git a/bootstrap/Stage3.sml b/bootstrap/Stage3.sml index 8d11df2e..bec5c8ac 100644 --- a/bootstrap/Stage3.sml +++ b/bootstrap/Stage3.sml @@ -1,23 +1,28 @@ (* Title: Third stage bootstrap from interpreted code. Copyright David Matthews 2020 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *) val () = Bootstrap.use "basis/build.sml"; - +val args = CommandLine.arguments() +fun getPath [] = "." (* Default path *) +| getPath ("-I" :: path :: _) = path +| getPath (_::tl) = getPath tl +val path = OS.Path.concat(getPath args, "bootstrap/Stage4.sml"); (* We've now set up the new name space. Compile the compiler. *) -PolyML.use "bootstrap/Stage4.sml"; +PolyML.use path; + diff --git a/bootstrap/Stage5.sml b/bootstrap/Stage5.sml index 1b982425..653ad0e0 100644 --- a/bootstrap/Stage5.sml +++ b/bootstrap/Stage5.sml @@ -1,23 +1,28 @@ (* Title: Fifth stage bootstrap from interpreted code. Copyright David Matthews 2020 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *) val () = Bootstrap.use "basis/build.sml"; - +val args = CommandLine.arguments() +fun getPath [] = "." (* Default path *) +| getPath ("-I" :: path :: _) = path +| getPath (_::tl) = getPath tl +val path = OS.Path.concat(getPath args, "bootstrap/Stage6.sml"); (* We've now set up the new name space. Compile the compiler. *) -PolyML.use "bootstrap/Stage6.sml"; +PolyML.use path; +