#!/bin/sh #1 -> $(builddir) #2 -> $(top_builddir) #3 -> $(motif_srcdir) echo "#define variables(value, arg) \\" > $1/variables.h echo "do { if (0) { } else \\" >> $1/variables.h $2/rplawk/rplawk 'BEGIN { c = 0; } \ /\/\*/ { c = 1; } /\*\// { c = 0; } /^#define XmN/ \ { if (c == 0) { printf("if (strcmp(\"%s\", value) == 0) \\\ { arg = %s; } else \\\n", $2, $2); } } \ END { printf("{ executionError(\"Unknown directive\"); } } \\\ while(0)\n"); }' \ $3/lib/Xm/XmStrDefs.h >> $1/variables.h exit 0