[SCM] Lisaac compiler branch, mildred-projects, updated. lisaac-0.12-513-gf79661b

Mildred Ki'Lya silkensedai at online.fr
Tue Aug 25 22:08:15 UTC 2009


The following commit has been merged in the mildred-projects branch:
commit f79661bcc17009813b85dc4da192aa80055ae99a
Merge: adbd386c61091ac6931edf0b9e2a55b1e4fb664f bcfd7ae27bd2d1b125ce07a0255f27cbd44df676
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date:   Wed Aug 26 00:00:56 2009 +0200

    Merge commit 'origin/master' into mildred-projects

diff --combined make.lip
index 853d8d8,64658a0..8203772
--- a/make.lip
+++ b/make.lip
@@@ -57,51 -57,14 +57,51 @@@ Section Privat
    
    + target:STRING := "unix";
    
 +  + lib_std :PROJECT;
 +  + parent_project :PROJECT;
 +
 +  //
 +  // Code
 +  //
 +
 +  - default_init prj:PROJECT <-
 +  // Initialize the library
 +  (
 +    "Initialize project ".print; Self.print;
 +    prj.if { " from ".print; prj.print; };
 +    "\n".print;
 +
 +    parent_project := prj;
 +    parent_project.if {
 +      lisaac          := parent_project.lisaac;
 +      target          := parent_project.target;
 +      debug_level     := parent_project.debug_level;
 +      debug_with_code := parent_project.debug_with_code;
 +      is_all_warning  := parent_project.is_all_warning;
 +      is_optimization := parent_project.is_optimization;
 +      inline_level    := parent_project.inline_level;
 +      is_java         := parent_project.is_java;
 +      is_cop          := parent_project.is_cop;
 +      is_statistic    := parent_project.is_statistic;
 +      is_quiet        := parent_project.is_quiet;
 +    };
 +  );
 +
 +  - init prj:PROJECT <-
 +  // Initialize the library
 +  (
 +    default_init prj;
 +  );
 +  
    //
    // Directory.
    //
    
    - standard_path <-
    // Standard library.
 -  ( 
 -    path (lisaac + "lib/*");    
 +  (
 +    lib_std := lib_std.create("STD");
 +    lib_std := lib_std.load("lib.lip");
    );
    
    //
@@@ -110,18 -73,31 +110,18 @@@
    
    - unix_target <-
    (
 -    path (lisaac + "lib_os/unix/system/");
 -    path (lisaac + "lib_os/unix/file_system/");
 -    path (lisaac + "lib_os/unix/video/");
    );
    
    - windows_target <-
    (
 -    path (lisaac + "lib_os/unix/system/");
 -    path (lisaac + "lib_os/windows/file_system/");
 -    path (lisaac + "lib_os/unix/file_system/");  // BSBS: ??
 -    path (lisaac + "lib_os/windows/video/");
    );
  
    - dos_target <-
    (
 -    path (lisaac + "lib_os/unix/system/");
 -    path (lisaac + "lib_os/unix/file_system/"); // BSBS: ??    
 -    path (lisaac + "lib_os/dos/file_system/");
 -    path (lisaac + "lib_os/dos/video/");
    );
    
    - java_target <-
    (
 -    path (lisaac + "lib_os/java/system/");
 -    path (lisaac + "lib_os/java/file_system/");
    );
    
    - get_target <-
@@@ -140,21 -116,33 +140,33 @@@
      };
      (target = "").if {
        "Target code needed.\n".print;
 -      exit;
 +      exit 1;
      };
    );
        
    - add_lib lib:STRING <-
    (
-     run "echo \"int main(){ return(1); }\" > __tmp__.c";    
-     (run ("gcc __tmp__.c -o __tmp__ " + lib + " 2> /dev/null") = 0).if {
-       lib_gcc := lib_gcc + " " + lib;
-       run "rm __tmp__.c __tmp__";
+     (target = "windows").if {
+       run "echo int main(){ return(1); } > __tmp__.c";    
+       (run ("gcc __tmp__.c -o __tmp__ " + lib + " > NUL") = 0).if {
+         lib_gcc := lib_gcc + " " + lib;
+         run "del __tmp__.c __tmp__.exe";
+       } else {
+         "\nERROR: `" + lib + "' library for GCC not found.\n".print;
+         run "del __tmp__.c";
+         exit;
+       };    
      } else {
-       "\nERROR: `" + lib + "' library for GCC not found.\n".print;
-       run "rm __tmp__.c";
-       exit;
-     };    
+       run "echo \"int main(){ return(1); }\" > __tmp__.c";    
+       (run ("gcc __tmp__.c -o __tmp__ " + lib + " 2> /dev/null") = 0).if {
+         lib_gcc := lib_gcc + " " + lib;
+         run "rm __tmp__.c __tmp__";
+       } else {
+         "\nERROR: `" + lib + "' library for GCC not found.\n".print;
+         run "rm __tmp__.c";
+         exit;
+       };    
+     };
    );
    
    - execute cmd:STRING <-
@@@ -203,7 -191,7 +215,7 @@@
        (is_cop).if {
          lib_gcc := lib_gcc + " -lpthread";
        };
-       execute ("gcc " + input_file + ".c -o " + input_file + " -lm -lX11 " + option_gcc + lib_gcc);
+       execute ("gcc " + input_file + ".c -o " + input_file + " -lm " + option_gcc + lib_gcc);
      };
    );
    
@@@ -218,12 -206,6 +230,12 @@@
    (
      general_back_end;
    );
 +
 +  - print_info <-
 +  // Print information about the project
 +  (
 +    info_project.print;
 +  );
    
  Section Public
    
@@@ -309,15 -291,7 +321,15 @@@
    //
    // Other.
    //
 -  
 +
 +  - info <-
 +  // Information about the project
 +  (
 +    front_end;
 +    print_info;
 +    exit;
 +  );
 +
    - q <-
    // Quiet operation.
    (

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list