Amend the "mkall.sh -syscalls" implementation to
- prepend ./ before mksyscalls.pl;
- accept the optional file list argument.
This is a preparation for CL 416115.
Change-Id: Ib4dc2b4aa0d2dd22a256414864e92f2d2fd957a5
Reviewed-on: https://go-review.googlesource.com/c/go/+/423676
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
case "$1" in
-syscalls)
- for i in zsyscall*go
+ shift
+ for i in ${@:-zsyscall*go}
do
# Run the command line that appears in the first line
# of the generated file to regenerate it.
- sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i
+ sed 1q $i | sed 's;^// ;./;' | sh > _$i && gofmt < _$i > $i
rm _$i
done
exit 0