Annotation of rpl/modules/motif/definitions.sh, revision 1.6
1.1 bertrand 1: #!/bin/sh
2: #1 -> $(builddir)
3: #2 -> $(top_builddir)
4: #3 -> $(motif_srcdir)
5:
1.2 bertrand 6: echo "#define XmN_constants(value, arg) \\" > $1/variables.h
1.1 bertrand 7: echo "do { if (0) { } else \\" >> $1/variables.h
8: $2/rplawk/rplawk 'BEGIN { c = 0; } \
9: /\/\*/ { c = 1; }
10: /\*\// { c = 0; }
11: /^#define XmN/ \
12: { if (c == 0) { printf("if (strcmp(\"%s\", value) == 0) \\\
13: { arg = %s; } else \\\n", $2, $2); } } \
14: END { printf("{ executionError(\"Unknown directive\"); } } \\\
15: while(0)\n"); }' \
1.5 bertrand 16: $3/Xm/XmStrDefs.h >> $1/variables.h
1.1 bertrand 17:
1.2 bertrand 18: echo "#define Xm_widgets_classes(value, arg) \\" >> $1/variables.h
1.3 bertrand 19: cpp -E /usr/include/X11/Shell.h | sed 's/;/ /g' | \
1.5 bertrand 20: $2/rplawk/rplawk 'BEGIN { printf("{ "); } \
21: /^[\t ]*WidgetClass.*WidgetClass[\t ]*$/ \
1.3 bertrand 22: { printf("if (strcmp(\"%s\", value) == 0) \\\
23: { arg = %s; } else \\\n", $2, $2); } ' >> $1/variables.h
1.6 ! bertrand 24: cpp -E $3/Xm/XmAll.h -I $3 | sed 's/;/ /g' | \
1.5 bertrand 25: $2/rplawk/rplawk '/^[\t ]*WidgetClass xm.*[\t ]*$/ \
26: { printf("if (strcmp(\"%s\", value) == 0) \\\
27: { arg = %s; } else \\\n", $2, $2); } \
28: /^[\t ]*extern WidgetClass xm.*[\t ]*$/ \
1.2 bertrand 29: { printf("if (strcmp(\"%s\", value) == 0) \\\
30: { arg = %s; } else \\\n", $3, $3); } \
1.4 bertrand 31: END { printf("{ executionError(\"Class not found\"); } } \\\
1.2 bertrand 32: while(0)\n"); }' >> $1/variables.h
1.3 bertrand 33:
1.1 bertrand 34: exit 0
CVSweb interface <joel.bertrand@systella.fr>