File:  [local] / rpl / modules / motif / definitions.sh
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Mon Jul 10 14:47:59 2017 UTC (6 years, 11 months ago) by bertrand
Branches: MAIN
CVS tags: HEAD
Patches pour motif.

    1: #!/bin/sh
    2: #1 -> $(builddir)
    3: #2 -> $(top_builddir)
    4: #3 -> $(motif_srcdir)
    5: 
    6: echo "#define XmN_constants(value, arg) \\" > $1/variables.h
    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"); }' \
   16:         $3/lib/Xm/XmStrDefs.h >> $1/variables.h
   17: 
   18: echo "#define Xm_widgets_classes(value, arg) \\" >> $1/variables.h
   19: cpp -E /usr/include/X11/Shell.h | sed 's/;/ /g' | \
   20:         $2/rplawk/rplawk '/^[\t ]+WidgetClass.*WidgetClass[\t ]*$/ \
   21:         { printf("if (strcmp(\"%s\", value) == 0) \\\
   22:         { arg = %s; } else \\\n", $2, $2); } ' >> $1/variables.h
   23: cpp -E $3/lib/Xm/XmAll.h | sed 's/;/ /g' | \
   24:         $2/rplawk/rplawk '/^extern WidgetClass xm/ \
   25:         { printf("if (strcmp(\"%s\", value) == 0) \\\
   26:         { arg = %s; } else \\\n", $3, $3); } \
   27:         END { printf("{ executionError(\"Class not found\"); } \\\
   28:         while(0)\n"); }' >> $1/variables.h
   29: 
   30: exit 0

CVSweb interface <joel.bertrand@systella.fr>