Skip to content

Commit

Permalink
project: replace some disjonctions with string concatenations
Browse files Browse the repository at this point in the history
  • Loading branch information
asarhaddon committed Apr 21, 2022
1 parent 0e8be5c commit d43e0d9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 85 deletions.
128 changes: 43 additions & 85 deletions gnatcoll.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ project GnatColl is
type OS_Kind is ("windows", "unix", "osx");
OS : OS_Kind := External ("GNATCOLL_OS", "unix");

Sources := ("src", "src/os", "src/paragraph_filling");

Unix_Win32 := "";
case OS is
when "unix" | "osx" =>
Sources := Sources & ("src/os/unix");
Unix_Win32 := "unix";
when "windows" =>
Sources := Sources & ("src/os/win32");
Unix_Win32 := "win32";
end case;

for Source_Dirs use Sources;
for Source_Dirs use
("src", "src/os", "src/paragraph_filling", "src/os/" & Unix_Win32);

for Library_Kind use Library_Type;

Expand Down Expand Up @@ -174,86 +174,44 @@ project GnatColl is
for Implementation ("GNATCOLL.OS.FS.Open_Pipe")
use "gnatcoll-os-fs-open_pipe__" & OS & ".adb";

case OS is
when "unix" | "osx" =>
for Specification ("GNATCOLL.Mmap.System")
use "gnatcoll-mmap-system__unix.ads";
for Implementation ("GNATCOLL.Mmap.System")
use "gnatcoll-mmap-system__unix.adb";
for Implementation ("GNATCOLL.IO.Native.Codec")
use "gnatcoll-io-native-codec__unix.adb";
for Implementation ("GNATCOLL.Plugins")
use "gnatcoll-plugins__unix.adb";
for Implementation ("GNATCOLL.OS.Stat.Stat")
use "gnatcoll-os-stat-stat__unix.adb";
for Implementation ("GNATCOLL.OS.FS.Null_File")
use "gnatcoll-os-fs-null_file__unix.adb";
for Implementation ("GNATCOLL.OS.FS.Open")
use "gnatcoll-os-fs-open__unix.adb";
for Implementation ("GNATCOLL.OS.FS.Set_Close_On_Exec")
use "gnatcoll-os-fs-set_close_on_exec__unix.adb";
for Implementation ("GNATCOLL.OS.FS.Is_Console")
use "gnatcoll-os-fs-is_console__unix.adb";
for Implementation ("GNATCOLL.OS.Process.Wait")
use "gnatcoll-os-process-wait__unix.adb";
for Implementation ("GNATCOLL.OS.Process.Internal_Spawn")
use "gnatcoll-os-process-internal_spawn__unix.adb";
for Specification ("GNATCOLL.OS.Process_Types")
use "gnatcoll-os-process_types__unix.ads";
for Implementation ("GNATCOLL.OS.Process_Types")
use "gnatcoll-os-process_types__unix.adb";
for Implementation ("GNATCOLL.OS.Process.State")
use "gnatcoll-os-process-state__unix.adb";
for Implementation ("GNATCOLL.OS.Process.Wait_For_Processes")
use "gnatcoll-os-process-wait_for_processes__unix.adb";
for Specification ("GNATCOLL.OS.Dir_Types")
use "gnatcoll-os-dir_types__unix.ads";
for Implementation ("GNATCOLL.OS.Dir.Open")
use "gnatcoll-os-dir-open__unix.adb";
for Implementation ("GNATCOLL.OS.Dir.Close")
use "gnatcoll-os-dir-close__unix.adb";
for Implementation ("GNATCOLL.OS.Dir.Read")
use "gnatcoll-os-dir-read__unix.adb";
when "windows" =>
for Specification ("GNATCOLL.Mmap.System")
use "gnatcoll-mmap-system__win32.ads";
for Implementation ("GNATCOLL.Mmap.System")
use "gnatcoll-mmap-system__win32.adb";
for Implementation ("GNATCOLL.IO.Native.Codec")
use "gnatcoll-io-native-codec__win32.adb";
for Implementation ("GNATCOLL.Plugins")
use "gnatcoll-plugins__windows.adb";
for Implementation ("GNATCOLL.OS.Stat.Stat")
use "gnatcoll-os-stat-stat__win32.adb";
for Implementation ("GNATCOLL.OS.FS.Is_Console")
use "gnatcoll-os-fs-is_console__win32.adb";
for Implementation ("GNATCOLL.OS.FS.Null_File")
use "gnatcoll-os-fs-null_file__win32.adb";
for Implementation ("GNATCOLL.OS.FS.Open")
use "gnatcoll-os-fs-open__win32.adb";
for Implementation ("GNATCOLL.OS.FS.Set_Close_On_Exec")
use "gnatcoll-os-fs-set_close_on_exec__win32.adb";
for Specification ("GNATCOLL.OS.Process_Types")
use "gnatcoll-os-process_types__win32.ads";
for Implementation ("GNATCOLL.OS.Process_Types")
use "gnatcoll-os-process_types__win32.adb";
for Implementation ("GNATCOLL.OS.Process.Wait")
use "gnatcoll-os-process-wait__win32.adb";
for Implementation ("GNATCOLL.OS.Process.Internal_Spawn")
use "gnatcoll-os-process-internal_spawn__win32.adb";
for Implementation ("GNATCOLL.OS.Process.State")
use "gnatcoll-os-process-state__win32.adb";
for Implementation ("GNATCOLL.OS.Process.Wait_For_Processes")
use "gnatcoll-os-process-wait_for_processes__win32.adb";
for Specification ("GNATCOLL.OS.Dir_Types")
use "gnatcoll-os-dir_types__win32.ads";
for Implementation ("GNATCOLL.OS.Dir.Open")
use "gnatcoll-os-dir-open__win32.adb";
for Implementation ("GNATCOLL.OS.Dir.Close")
use "gnatcoll-os-dir-close__win32.adb";
for Implementation ("GNATCOLL.OS.Dir.Read")
use "gnatcoll-os-dir-read__win32.adb";
end case;
for Specification ("GNATCOLL.Mmap.System")
use "gnatcoll-mmap-system__" & Unix_Win32 & ".ads";
for Implementation ("GNATCOLL.Mmap.System")
use "gnatcoll-mmap-system__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.IO.Native.Codec")
use "gnatcoll-io-native-codec__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.Plugins")
use "gnatcoll-plugins__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.OS.Stat.Stat")
use "gnatcoll-os-stat-stat__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.OS.FS.Null_File")
use "gnatcoll-os-fs-null_file__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.OS.FS.Open")
use "gnatcoll-os-fs-open__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.OS.FS.Set_Close_On_Exec")
use "gnatcoll-os-fs-set_close_on_exec__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.OS.FS.Is_Console")
use "gnatcoll-os-fs-is_console__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.OS.Process.Wait")
use "gnatcoll-os-process-wait__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.OS.Process.Internal_Spawn")
use "gnatcoll-os-process-internal_spawn__" & Unix_Win32 & ".adb";
for Specification ("GNATCOLL.OS.Process_Types")
use "gnatcoll-os-process_types__" & Unix_Win32 & ".ads";
for Implementation ("GNATCOLL.OS.Process_Types")
use "gnatcoll-os-process_types__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.OS.Process.State")
use "gnatcoll-os-process-state__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.OS.Process.Wait_For_Processes")
use "gnatcoll-os-process-wait_for_processes__" & Unix_Win32 & ".adb";
for Specification ("GNATCOLL.OS.Dir_Types")
use "gnatcoll-os-dir_types__" & Unix_Win32 & ".ads";
for Implementation ("GNATCOLL.OS.Dir.Open")
use "gnatcoll-os-dir-open__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.OS.Dir.Close")
use "gnatcoll-os-dir-close__" & Unix_Win32 & ".adb";
for Implementation ("GNATCOLL.OS.Dir.Read")
use "gnatcoll-os-dir-read__" & Unix_Win32 & ".adb";

case OS is
when "unix" | "osx" =>
Expand Down
File renamed without changes.

0 comments on commit d43e0d9

Please sign in to comment.