annotate src/mkbuiltins @ 2968:e330cb788508

[project @ 1997-05-15 17:40:29 by jwe]
author jwe
date Thu, 15 May 1997 17:54:17 +0000
parents 1da1af95082e
children 7aae2c3636a7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
1 #!/bin/sh
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
2
2907
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
3 if test $# -ne 2; then
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
4 echo "usage: mkbuiltins f1 f2" 1>&2
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
5 exit 1
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
6 fi
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
7
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
8 DEF_FILES=`cat $1`
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
9 VAR_FILES=`cat $2`
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
10
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
11 if test -z "$DEF_FILES"; then
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
12 echo "mkbuiltins: DEF_FILES is empty!" 1>&2
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
13 exit 1
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
14 fi
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
15
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
16 if test -z "$VAR_FILES"; then
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
17 echo "mkbuiltins: VAR_FILES is empty!" 1>&2
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
18 exit 1
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
19 fi
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
20
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
21 cat << \EOF
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
22 // DO NOT EDIT! Generated automatically by mkbuiltins.
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
23
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
24 #ifdef HAVE_CONFIG_H
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
25 #include "config.h"
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
26 #endif
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
27
2968
e330cb788508 [project @ 1997-05-15 17:40:29 by jwe]
jwe
parents: 2910
diff changeset
28 #include "defun.h"
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
29 #include "oct-obj.h"
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
30 #include "variables.h"
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
31
2373
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
32 EOF
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
33
2907
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
34 for file in $DEF_FILES; do
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
35 fcn=`echo $file | sed 's/\.df//; s/-/_/g'`
2373
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
36 echo "static void"
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
37 echo "install_${fcn}_fcns (void)"
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
38 echo "{"
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
39 cat $file
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
40 echo "}"
2907
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
41 echo ""
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
42 done
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
43
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
44 for file in $VAR_FILES; do
2909
057273789b87 [project @ 1997-04-30 06:34:32 by jwe]
jwe
parents: 2907
diff changeset
45 f=`echo $file | sed 's/-/_/g'`
057273789b87 [project @ 1997-04-30 06:34:32 by jwe]
jwe
parents: 2907
diff changeset
46 echo "extern void symbols_of_${f} (void);"
2373
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
47 done
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
48
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
49 cat << \EOF
2907
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
50
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
51 static void
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
52 install_builtin_variables (void)
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
53 {
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
54 EOF
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
55
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
56 for file in $VAR_FILES; do
2909
057273789b87 [project @ 1997-04-30 06:34:32 by jwe]
jwe
parents: 2907
diff changeset
57 f=`echo $file | sed 's/-/_/g'`
057273789b87 [project @ 1997-04-30 06:34:32 by jwe]
jwe
parents: 2907
diff changeset
58 echo " symbols_of_${f} ();"
2907
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
59 done
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
60
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
61 cat << \EOF
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
62 }
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
63
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
64 static void
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
65 install_builtin_functions (void)
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
66 {
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
67 EOF
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
68
2907
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
69 for file in $DEF_FILES; do
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
70 fcn=`echo $file | sed 's/\.df//; s/-/_/g'`
2373
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
71 echo " install_${fcn}_fcns ();"
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
72 done
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
73
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
74 cat << \EOF
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
75 }
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
76
2910
1da1af95082e [project @ 1997-04-30 06:42:17 by jwe]
jwe
parents: 2909
diff changeset
77 extern void install_mapper_functions (void);
1da1af95082e [project @ 1997-04-30 06:42:17 by jwe]
jwe
parents: 2909
diff changeset
78
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
79 void
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
80 install_builtins (void)
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
81 {
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
82 install_builtin_variables ();
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
83 install_mapper_functions ();
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
84 install_builtin_functions ();
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
85 }
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
86 EOF
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
87
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
88 exit 0