# HG changeset patch # User anatofuz # Date 1571276222 -32400 # Node ID df104b2de8951d5d8de17c6dfa60607170854154 # Parent f38d8d39d617d8947d052fec00ad44f712c07d09 remove commnad line arguments at pmake.pl diff -r f38d8d39d617 -r df104b2de895 src/gearsTools/pmake.pl --- 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)); }