chiark / gitweb /
Make run_directory.c stat the place it is going to try to run.
[elogind.git] / klibc / klibc / syscalls.pl
index 1c48ce58ff623856d484ef66144fa948a3fb99e3..0575fa6648104a9537d0762abff7f2382eb62e6e 100644 (file)
@@ -18,13 +18,14 @@ for $arg ( @ARGV ) {
        push(@args, $arg);
     }
 }
-($file, $arch, $bits, $unistd, $havesyscall) = @args;
+($file, $sysstub, $arch, $bits, $unistd, $outputdir, $havesyscall) = @args;
 
-require "arch/$arch/sysstub.ph";
+require "$sysstub";
 
 if (!open(UNISTD, '<', $unistd)) {
     die "$0: $unistd: $!\n";
 }
+
 while ( defined($line = <UNISTD>) ) {
     chomp $line;
 
@@ -46,6 +47,8 @@ if (!open(FILE, '<', $file)) {
     die "$0: $file: $!\n";
 }
 
+print "syscall-objs := ";
+
 while ( defined($line = <FILE>) ) {
     chomp $line;
     $line =~ s/\s*(|[\#;].*)$//; # Strip comments and trailing blanks
@@ -104,11 +107,14 @@ while ( defined($line = <FILE>) ) {
        @args = split(/\s*\,\s*/, $argv);
 
        print HAVESYS "#define _KLIBC_HAVE_SYSCALL_${fname} ${sname}\n";
-       make_sysstub($fname, $type, $sname, $stype, @args);
+       print " \\\n\t${fname}.o";
+       make_sysstub($outputdir, $fname, $type, $sname, $stype, @args);
     } else {
        die "$file:$.: Could not parse input: \"$line\"\n";
     }
 }
 
+print "\n";
+
 print HAVESYS "\n#endif\n";
 close(HAVESYS);