You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
459 B

  1. #!/bin/sh
  2. # Copyright 2009 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. COMMAND="mksysnum_plan9.sh $@"
  6. cat <<EOF
  7. // $COMMAND
  8. // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
  9. package plan9
  10. const(
  11. EOF
  12. SP='[ ]' # space or tab
  13. sed "s/^#define${SP}\\([A-Z0-9_][A-Z0-9_]*\\)${SP}${SP}*\\([0-9][0-9]*\\)/SYS_\\1=\\2/g" \
  14. < $1 | grep -v SYS__
  15. cat <<EOF
  16. )
  17. EOF