Pull in updated gen-tree.awk with support for comments, and use a
special comment syntax to allow simple strtab definitions in a single
file. This allows keeping the menu label definitions together with the
menu tree, and reduces the number of generated headers to worry about.
EXTRA_LIBRARIES += libmotifui.a
libmotifui_a_SOURCES = src/motif_ui.c
$(libmotifui_a_OBJECTS): $(gnulib_headers)
EXTRA_LIBRARIES += libmotifui.a
libmotifui_a_SOURCES = src/motif_ui.c
$(libmotifui_a_OBJECTS): $(gnulib_headers)
-$(libmotifui_a_OBJECTS): src/motifgui.h src/motifstr.h
+$(libmotifui_a_OBJECTS): src/motifgui.h
EXTRA_LIBRARIES += libglohelp.a
libglohelp_a_SOURCES = common/src/help.c common/src/help.h
EXTRA_LIBRARIES += libglohelp.a
libglohelp_a_SOURCES = common/src/help.c common/src/help.h
DISTCLEANFILES += $(OPTFILES:.opt=.h)
EXTRA_DIST += $(DX_BASEDIR)/scripts/gen-options.awk $(OPTFILES)
DISTCLEANFILES += $(OPTFILES:.opt=.h)
EXTRA_DIST += $(DX_BASEDIR)/scripts/gen-options.awk $(OPTFILES)
-STRFILES = src/motifstr.str
-.str.h:
- $(AM_V_GEN) $(AWK) -f $(DX_BASEDIR)/scripts/gen-strtab.awk $< >$@.tmp
- $(AM_V_at) mv -f $@.tmp $@
-$(STRFILES:.str=.h): $(DX_BASEDIR)/scripts/gen-strtab.awk
-DISTCLEANFILES += $(STRFILES:.str=.h)
-EXTRA_DIST += $(DX_BASEDIR)/scripts/gen-strtab.awk $(STRFILES)
-
-GUIFILES = src/motifgui.dat
+TREEFILES = src/motifgui.dat
- $(AM_V_GEN) $(AWK) -f $(DX_BASEDIR)/scripts/gen-tree.awk $< >$@.tmp
- $(AM_V_at) mv -f $@.tmp $@
-$(GUIFILES:.dat=.h): $(DX_BASEDIR)/scripts/gen-tree.awk
-DISTCLEANFILES += $(GUIFILES:.dat=.h)
-EXTRA_DIST += $(DX_BASEDIR)/scripts/gen-tree.awk $(GUIFILES)
+ $(AM_V_GEN) :; { \
+ $(AWK) -f $(DX_BASEDIR)/scripts/gen-tree.awk $< && \
+ printf '%s\n' \
+ 'sub(/^#&/, "\\&") == 0 { next }' \
+ '{ has_strtab=1 } END { if (!has_strtab) { exit(0); } print "" }' \
+ | $(AWK) -f - -f $(DX_BASEDIR)/scripts/gen-strtab.awk $<; \
+ } >$@-t
+ $(AM_V_at) mv -f $@-t $@
+$(TREEFILES:.dat=.h): $(DX_BASEDIR)/scripts/gen-strtab.awk
+EXTRA_DIST += $(DX_BASEDIR)/scripts/gen-strtab.awk
+$(TREEFILES:.dat=.h): $(DX_BASEDIR)/scripts/gen-tree.awk
+EXTRA_DIST += $(DX_BASEDIR)/scripts/gen-tree.awk
+DISTCLEANFILES += $(TREEFILES:.dat=.h)
+EXTRA_DIST += $(TREEFILES)
check_PROGRAMS = t/boardmove t/boardbit t/ewmhicon t/rng-test
EXTRA_DIST += t/xos256ss.c
check_PROGRAMS = t/boardmove t/boardbit t/ewmhicon t/rng-test
EXTRA_DIST += t/xos256ss.c
-Subproject commit 4d796dabafdee54a7b726013416730efaafa905e
+Subproject commit 8cda0a6cc9cc31edf0fe94c470038f12c8dcc905
#include <Xm/XmAll.h>
#include "motif.h"
#include <Xm/XmAll.h>
#include "motif.h"
#include "motifgui.h"
#include "xcounter.h"
#include "version.h"
#include "motifgui.h"
#include "xcounter.h"
#include "version.h"
aboutDialog, aboutDialog_OFFSET, widgetUnmanaged|widgetMessageDialog
licenseBlurb, 0, widgetScrolledText
aboutDialog, aboutDialog_OFFSET, widgetUnmanaged|widgetMessageDialog
licenseBlurb, 0, widgetScrolledText
+#&gameMenuLabel G|Game
+#&gameNewLabel N|New
+#&gameExitLabel x|Exit
+#&helpMenuLabel H|Help
+#&helpAboutLabel A|About RRace
+
MAINMENU
gameMenu, gameMenu_OFFSET, widgetCascadeButton, gameMenuLabel
gameNew, 0, widgetPushButton, gameNewLabel
MAINMENU
gameMenu, gameMenu_OFFSET, widgetCascadeButton, gameMenuLabel
gameNew, 0, widgetPushButton, gameNewLabel
+++ /dev/null
-&gameMenuLabel G|Game
-&gameNewLabel N|New
-&gameExitLabel x|Exit
-&helpMenuLabel H|Help
-&helpAboutLabel A|About RRace