Introduce new module to create search paths of dynamic strings.
authorGaius Mulley <gaiusmod2@gmail.com>
Tue, 24 Jan 2023 22:41:45 +0000 (22:41 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Tue, 24 Jan 2023 22:41:45 +0000 (22:41 +0000)
commitf235d695729cc745cf15a00fb8b2cfaded80fd1e
tree1b01e42b4195c3752567d96a75a52e4e056f1cce
parent327d45c57ebd2655a7599df0f01b8b5e2f82eda7
Introduce new module to create search paths of dynamic strings.

Introduce a simple DynamicStringPath module to allow the front end
to create and modify a search path from dynamic strings.

gcc/m2/ChangeLog:

* Make-lang.in (GM2-COMP-BOOT-DEFS): Add
DynamicStringPath.def.
(GM2-COMP-BOOT-MODS): Add DynamicStringPath.mod.
(GM2-COMP-DEFS): Add DynamicStringPath.def.
(GM2-COMP-MODS): Add DynamicStringPath.mod.
($(objdir)/m2/gm2-libs-min/SYSTEM.def): Split path into
multiple -I components.
($(objdir)/m2/gm2-libs/SYSTEM.def): Ditto.
($(objdir)/m2/gm2-libs-coroutines/SYSTEM.def): Ditto.
* gm2-compiler/M2Options.mod: Import DynamicStringPath.
(SetSearchPath): Reimplement using DynamicStringPath
procedures.
* gm2-compiler/M2Search.def (InitSearchPath): Remove.
(PrependSearchPath): Remove.
* gm2-compiler/M2Search.mod (SFIO): Remove import.
(DynamicStringPath): Add import.
(Directory): Remove.
(UserPath): Remove.
(InitialPath): Remove.
(InitSearchPath): Remove.
(PrependSearchPath): Remove.
(FindSourceFile): Re-implement.
(FindSourceDefFile): Re-implement.
(FindSourceModFile): Re-implement.
* gm2-gcc/init.cc (_M2_DynamicStringPath_init):
New prototype.
(init_FrontEndInit): Call _M2_DynamicStringPath_init.
* tools-src/makeSystem: Allow multiple -I paths.
* gm2-compiler/DynamicStringPath.def: New file.
* gm2-compiler/DynamicStringPath.mod: New file.
* gm2-gcc/m2options.h (M2Options_SetMakeIncludePath): Add
prototype.
    Co-Authored by: Iain Sandoe  <iain@sandoe.co.uk>

libgm2/ChangeLog:

* libm2cor/Makefile.am (SYSTEM.def): Split path into
multiple -I components.
* libm2cor/Makefile.in: Rebuild.
* libm2min/Makefile.am (SYSTEM.def): Split path into
multiple -I components.
* libm2min/Makefile.in: Rebuild.
* libm2iso/Makefile.am (SYSTEM.def): Split path into
multiple -I components.
* libm2iso/Makefile.in: Rebuild.
    Co-Authored by: Iain Sandoe  <iain@sandoe.co.uk>

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
15 files changed:
gcc/m2/Make-lang.in
gcc/m2/gm2-compiler/DynamicStringPath.def [new file with mode: 0644]
gcc/m2/gm2-compiler/DynamicStringPath.mod [new file with mode: 0644]
gcc/m2/gm2-compiler/M2Options.mod
gcc/m2/gm2-compiler/M2Search.def
gcc/m2/gm2-compiler/M2Search.mod
gcc/m2/gm2-gcc/init.cc
gcc/m2/gm2-gcc/m2options.h
gcc/m2/tools-src/makeSystem
libgm2/libm2cor/Makefile.am
libgm2/libm2cor/Makefile.in
libgm2/libm2iso/Makefile.am
libgm2/libm2iso/Makefile.in
libgm2/libm2min/Makefile.am
libgm2/libm2min/Makefile.in