changeset 89:df104b2de895

remove commnad line arguments at pmake.pl
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Thu, 17 Oct 2019 10:37:02 +0900
parents f38d8d39d617
children dd1d9ea1b7b5
files src/gearsTools/pmake.pl
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gearsTools/pmake.pl	Wed Oct 16 19:40:37 2019 +0900
+++ b/src/gearsTools/pmake.pl	Thu Oct 17 10:37:02 2019 +0900
@@ -1,6 +1,8 @@
 #!/usr/bin/env perl
 use strict;
 use warnings;
+use FindBin;
+use Cwd 'getcwd';
 
 my ($cc,$cflags,$asm,$ld,$ldflags,$libgcc,$cmake,$kernel_cflags,$kernel_ld_flags,$kernel_ld_command, $initcode_cflags, $initcode_ld_command);
 
@@ -33,6 +35,9 @@
 
 $cflags =~ s/\n//g;
 create_link_script();
+my $curdir = getcwd;
+my $xv6_src_dir = $FindBin::Bin;
+$xv6_src_dir =~  s|(.*)/gearsTools/(.*)|$1|;
 
 print_exec_system($cmake,
      "-DCBC_COM=$cc",
@@ -44,8 +49,8 @@
     "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE",
     "-DINITOCDE_CFLAGS=\"$initcode_cflags\"",
     "-DINITOCDE_LINK_EXECUTABLE=\"$initcode_ld_command\"",
-    "-S $ARGV[1]",
-$ARGV[0]);
+    "-S $xv6_src_dir",
+$curdir);
 
 system("make");
 #system("sh","link.sh");
@@ -70,7 +75,7 @@
 sub print_exec_system {
   my @query = @_;
   print(join(' ',@query), "\n");
-  system(join(' ',@query));
+  #system(join(' ',@query));
 }