github.com/riscv/riscv-go@v0.0.0-20200123204226-124ebd6fcc8e/src/runtime/mknacl.sh (about)

     1  #!/bin/bash
     2  # Copyright 2013 The Go Authors. All rights reserved.
     3  # Use of this source code is governed by a BSD-style
     4  # license that can be found in the LICENSE file.
     5  
     6  cat /Users/rsc/pub/native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h |
     7  	awk '
     8  	BEGIN {
     9  		printf("// generated by mknacl.sh - do not edit\n")
    10  	}
    11  	NF==3 && $1=="#define" && $2~/^NACL_sys_/ {
    12  		name=$2
    13  		sub(/^NACL_sys_/, "SYS_", name)
    14  		printf("#define %s %s\n", name, $3)
    15  	}' >syscall_nacl.h