comparison rlm/swank-all.pl @ 7:913acb5a675b

repaired old repl script using changes from dylan
author Robert McIntyre <rlm@mit.edu>
date Thu, 01 Mar 2012 06:28:39 -0700
parents e22ae14fa9d5
children 00524751595b
comparison
equal deleted inserted replaced
6:e22ae14fa9d5 7:913acb5a675b
1 #!/usr/bin/perl 1 #!/usr/bin/perl
2
3 $replP = $ARGV[0];
2 4
3 @JVM_options = 5 @JVM_options =
4 ("-verbose:gc", 6 ("-verbose:gc",
5 "-Xmn500M", 7 "-Xmn500M",
6 "-Xms3000M", 8 "-Xms3000M",
74 $JVM_options = join " ", @JVM_options; 76 $JVM_options = join " ", @JVM_options;
75 $classpath_projects = join ":", @classpath_projects; 77 $classpath_projects = join ":", @classpath_projects;
76 $classpath_libs = join ":", @classpath_libs; 78 $classpath_libs = join ":", @classpath_libs;
77 $C_libs = join ":", @C_libs; 79 $C_libs = join ":", @C_libs;
78 80
79 $clojure_launch ="clojure.main"; 81 $swank_launch ="clojure.main";
80 $clojure_launch .= " -e "; 82 $swank_launch .= " -e ";
81 $clojure_launch .= '"'; 83 $swank_launch .= '"';
82 $clojure_launch .= "(do (require 'swank.swank)"; 84 $swank_launch .= "(do (require 'swank.swank)";
83 $clojure_launch .= "(require 'rlm.rlm-commands)"; 85 $swank_launch .= "(require 'rlm.rlm-commands)";
84 $clojure_launch .= "(swank.swank/start-repl 4005))"; 86 $swank_launch .= "(swank.swank/start-repl 4005))";
85 $clojure_launch .= '"'; 87 $swank_launch .= '"';
86 88
87 $command = "java ".$JVM_options." -cp ".$classpath_projects.":".$classpath_libs 89 $repl_launch = "clojure.main";
88 ." -Djava.library.path=".$C_libs." ".$clojure_launch; 90
91 $clojure_command = $swank_launch;
92
93 if ($replP eq "--repl") {$clojure_command = $repl_launch;}
94
95 $command = "java $JVM_options -cp $classpath_projects:$classpath_libs" .
96 " -Djava.library.path=$C_libs $clojure_command";
89 97
90 print "$command\n"; 98 print "$command\n";
91 99
92 system($command); 100 system($command);
93 101