File: gennltvals.sh

package info (click to toggle)
gdb 4.17-4.m68k.objc.threads.hwwp.fpu.gnat.3.1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 43,580 kB
  • ctags: 65,939
  • sloc: ansic: 545,979; exp: 17,626; makefile: 7,522; yacc: 6,119; sh: 6,001; asm: 2,813; cpp: 2,051; lisp: 1,820; sed: 527; lex: 518; awk: 170; fortran: 5
file content (39 lines) | stat: -rw-r--r-- 1,423 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /bin/sh
# Generate nltvals.def, a file that describes various newlib/libgloss
# target values used by the host/target interface.
#
# Syntax: /bin/sh gennltvals.sh shell srcroot cpp

shell=$1
srcroot=$2
cpp=$3

srccom=$srcroot/sim/common

echo '/* Newlib/libgloss macro values needed by remote target support.  */'
echo '/* This file is machine generated by gennltvals.sh.  */'

$shell ${srccom}/gentvals.sh "" errno ${srcroot}/newlib/libc/include \
	"errno.h sys/errno.h" 'E[A-Z0-9]*' "${cpp}"

$shell ${srccom}/gentvals.sh "" signal ${srcroot}/newlib/libc/include \
	"signal.h sys/signal.h" 'SIG[A-Z0-9]*' "${cpp}"

$shell ${srccom}/gentvals.sh "" open ${srcroot}/newlib/libc/include \
	"fcntl.h sys/fcntl.h" 'O_[A-Z0-9]*' "${cpp}"

# Unfortunately, each newlib/libgloss port has seen fit to define their own
# syscall.h file.  This means that system call numbers can vary for each port.
# Support for all this crud is kept here, rather than trying to get too fancy.
# If you want to try to improve this, please do, but don't break anything.
# Note that there is a standard syscall.h file (libgloss/syscall.h) now which
# hopefully more targets can use.


dir=libgloss/m32r/sys target=m32r
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
	"syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"

dir=libgloss target=sparc
$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
	"syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"