diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-10-15 11:15:27 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-10-16 14:21:54 +0200 |
| commit | f78642861b4dbe396a67d5e2a750e22f83f3edd5 (patch) | |
| tree | de2808e3e9d47aa1687b259e8ab48e34731532bc /pkg/csource/gen.go | |
| parent | d158fb9d3b6e03882c60a51854f149a8d2a637a0 (diff) | |
pkg/csource: support akaros
Diffstat (limited to 'pkg/csource/gen.go')
| -rw-r--r-- | pkg/csource/gen.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/csource/gen.go b/pkg/csource/gen.go new file mode 100644 index 000000000..103a6215e --- /dev/null +++ b/pkg/csource/gen.go @@ -0,0 +1,12 @@ +// Copyright 2017 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +// I heard you like shell... + +//go:generate bash -c "echo -e '// AUTOGENERATED FROM executor/common_linux.h\npackage csource\nvar commonHeaderLinux = `' > linux_common.go; cat ../../executor/common_linux.h | sed -e '/#include \"common.h\"/ {' -e 'r ../../executor/common.h' -e 'd' -e '}' - | sed -e '/#include \"common_kvm_amd64.h\"/ {' -e 'r ../../executor/common_kvm_amd64.h' -e 'd' -e '}' - | sed -e '/#include \"common_kvm_arm64.h\"/ {' -e 'r ../../executor/common_kvm_arm64.h' -e 'd' -e '}' - | sed -e '/#include \"kvm.h\"/ {' -e 'r ../../executor/kvm.h' -e 'd' -e '}' - | sed -e '/#include \"kvm.S.h\"/ {' -e 'r ../../executor/kvm.S.h' -e 'd' -e '}' - | egrep -v '^[ ]*//' | sed '/^[ ]*\\/\\/.*/d' | sed 's#[ ]*//.*##g' >> linux_common.go; echo '`' >> linux_common.go" +//go:generate go fmt linux_common.go + +//go:generate bash -c "echo -e '// AUTOGENERATED FROM executor/common_akaros.h\npackage csource\nvar commonHeaderAkaros = `' > akaros_common.go; cat ../../executor/common_akaros.h | sed -e '/#include \"common.h\"/ {' -e 'r ../../executor/common.h' -e 'd' -e '}' - | egrep -v '^[ ]*//' | sed '/^[ ]*\\/\\/.*/d' | sed 's#[ ]*//.*##g' >> akaros_common.go; echo '`' >> akaros_common.go" +//go:generate go fmt akaros_common.go + +package csource |
