[SCM] Lisaac compiler branch, master, updated. lisaac-0.12-453-gfd2f9c4
Jeremy Cowgar
jeremy at cowgar.com
Tue Aug 25 03:04:12 UTC 2009
The following commit has been merged in the master branch:
commit 65566095e081669f572ff070a5f89fa5bd643a4f
Author: Jeremy Cowgar <jeremy at cowgar.com>
Date: Mon Aug 24 23:01:56 2009 -0400
Made add_lib function on windows as well. Some escaping was not necessary,
redirect to /dev/null was incorrect and file delete commands were also
incorrect. It should now function on Windows and unices.
diff --git a/make.lip b/make.lip
index bb32b29..5803e0a 100644
--- a/make.lip
+++ b/make.lip
@@ -122,15 +122,27 @@ Section Private
- 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 <-
--
Lisaac compiler
More information about the Lisaac-commits
mailing list