From f78642861b4dbe396a67d5e2a750e22f83f3edd5 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 15 Oct 2017 11:15:27 +0200 Subject: pkg/csource: support akaros --- pkg/csource/gen.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pkg/csource/gen.go (limited to 'pkg/csource/gen.go') 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 -- cgit mrf-deployment