|
|
|
# $Id$
|
|
|
|
|
|
|
|
# These utility programs have to be built for BUILD host in cross-build.
|
|
|
|
# This makes things rather non-standard automake
|
|
|
|
|
|
|
|
noinst_PROGRAMS += re2c
|
|
|
|
|
|
|
|
re2c_SOURCES =
|
|
|
|
EXTRA_DIST += tools/re2c/main.c
|
|
|
|
EXTRA_DIST += tools/re2c/basics.h
|
|
|
|
EXTRA_DIST += tools/re2c/globals.h
|
|
|
|
EXTRA_DIST += tools/re2c/ins.h
|
|
|
|
EXTRA_DIST += tools/re2c/re.h
|
|
|
|
EXTRA_DIST += tools/re2c/token.h
|
|
|
|
EXTRA_DIST += tools/re2c/code.c
|
|
|
|
EXTRA_DIST += tools/re2c/dfa.h
|
|
|
|
EXTRA_DIST += tools/re2c/dfa.c
|
|
|
|
EXTRA_DIST += tools/re2c/parse.h
|
|
|
|
EXTRA_DIST += tools/re2c/re2c-parser.y
|
|
|
|
EXTRA_DIST += tools/re2c/actions.c
|
|
|
|
EXTRA_DIST += tools/re2c/scanner.h
|
|
|
|
EXTRA_DIST += tools/re2c/scanner.c
|
|
|
|
EXTRA_DIST += tools/re2c/mbo_getopt.h
|
|
|
|
EXTRA_DIST += tools/re2c/mbo_getopt.c
|
|
|
|
EXTRA_DIST += tools/re2c/substr.h
|
|
|
|
EXTRA_DIST += tools/re2c/substr.c
|
|
|
|
EXTRA_DIST += tools/re2c/translate.c
|
|
|
|
re2c_LDADD = re2c-main.$(OBJEXT)
|
|
|
|
re2c_LDADD += re2c-code.$(OBJEXT)
|
|
|
|
re2c_LDADD += re2c-dfa.$(OBJEXT)
|
|
|
|
re2c_LDADD += re2c-parser.$(OBJEXT)
|
|
|
|
re2c_LDADD += re2c-actions.$(OBJEXT)
|
|
|
|
re2c_LDADD += re2c-scanner.$(OBJEXT)
|
|
|
|
re2c_LDADD += re2c-mbo_getopt.$(OBJEXT)
|
|
|
|
re2c_LDADD += re2c-substr.$(OBJEXT)
|
|
|
|
re2c_LDADD += re2c-translate.$(OBJEXT)
|
|
|
|
re2c_LINK = $(CCLD_FOR_BUILD) -o $@
|
|
|
|
|
|
|
|
re2c-main.$(OBJEXT): tools/re2c/main.c
|
|
|
|
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/main.c || echo '$(srcdir)/'`tools/re2c/main.c
|
|
|
|
|
|
|
|
re2c-code.$(OBJEXT): tools/re2c/code.c
|
|
|
|
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/code.c || echo '$(srcdir)/'`tools/re2c/code.c
|
|
|
|
|
|
|
|
re2c-dfa.$(OBJEXT): tools/re2c/dfa.c
|
|
|
|
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/dfa.c || echo '$(srcdir)/'`tools/re2c/dfa.c
|
|
|
|
|
|
|
|
re2c-parser.$(OBJEXT): re2c-parser.c
|
|
|
|
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f re2c-parser.c || echo '$(srcdir)/'`re2c-parser.c
|
|
|
|
|
|
|
|
re2c-actions.$(OBJEXT): tools/re2c/actions.c
|
|
|
|
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/actions.c || echo '$(srcdir)/'`tools/re2c/actions.c
|
|
|
|
|
|
|
|
re2c-scanner.$(OBJEXT): tools/re2c/scanner.c
|
|
|
|
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/scanner.c || echo '$(srcdir)/'`tools/re2c/scanner.c
|
|
|
|
|
|
|
|
re2c-mbo_getopt.$(OBJEXT): tools/re2c/mbo_getopt.c
|
|
|
|
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/mbo_getopt.c || echo '$(srcdir)/'`tools/re2c/mbo_getopt.c
|
|
|
|
|
|
|
|
re2c-substr.$(OBJEXT): tools/re2c/substr.c
|
|
|
|
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/substr.c || echo '$(srcdir)/'`tools/re2c/substr.c
|
|
|
|
|
|
|
|
re2c-translate.$(OBJEXT): tools/re2c/translate.c
|
|
|
|
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/re2c/translate.c || echo '$(srcdir)/'`tools/re2c/translate.c
|
|
|
|
|
|
|
|
re2c-parser.c: tools/re2c/re2c-parser.y
|
|
|
|
$(YACC) $(YFLAGS) $(AM_YFLAGS) `test -f 'tools/re2c/re2c-parser.y' || echo '$(srcdir)/'`tools/re2c/re2c-parser.y
|
|
|
|
if test -f y.tab.h; then \
|
|
|
|
to=`echo "re2c-parser_H" | sed \
|
|
|
|
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
|
|
|
|
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \
|
|
|
|
sed "/^#/ s/Y_TAB_H/$$to/g" y.tab.h >re2c-parser.ht; \
|
|
|
|
rm -f y.tab.h; \
|
|
|
|
if cmp -s re2c-parser.ht re2c-parser.h; then \
|
|
|
|
rm -f re2c-parser.ht ;\
|
|
|
|
else \
|
|
|
|
mv re2c-parser.ht re2c-parser.h; \
|
|
|
|
fi; \
|
|
|
|
fi
|
|
|
|
if test -f y.output; then \
|
|
|
|
mv y.output re2c-parser.output; \
|
|
|
|
fi
|
|
|
|
sed '/^#/ s|y\.tab\.c|re2c-parser.c|' y.tab.c >re2c-parser.ct && mv re2c-parser.ct re2c-parser.c
|
|
|
|
rm -f y.tab.c
|
|
|
|
|
|
|
|
re2c-parser.h: re2c-parser.c
|
|
|
|
@if test ! -f $@; then \
|
|
|
|
rm -f re2c-parser.c; \
|
|
|
|
$(MAKE) re2c-parser.c; \
|
|
|
|
else :; fi
|
|
|
|
|
|
|
|
BUILT_SOURCES += re2c-parser.c
|
|
|
|
BUILT_SOURCES += re2c-parser.h
|
|
|
|
|
|
|
|
CLEANFILES += re2c-parser.c
|
|
|
|
CLEANFILES += re2c-parser.h
|
|
|
|
|
|
|
|
EXTRA_DIST += re2c-parser.c
|
|
|
|
EXTRA_DIST += re2c-parser.h
|
|
|
|
|
|
|
|
EXTRA_DIST += tools/re2c/CHANGELOG
|
|
|
|
EXTRA_DIST += tools/re2c/NO_WARRANTY
|
|
|
|
EXTRA_DIST += tools/re2c/README
|
|
|
|
EXTRA_DIST += tools/re2c/scanner.re
|
|
|
|
EXTRA_DIST += tools/re2c/re2c.1
|
|
|
|
EXTRA_DIST += tools/re2c/bootstrap/scanner.c
|
|
|
|
EXTRA_DIST += tools/re2c/doc/loplas.ps.gz
|
|
|
|
EXTRA_DIST += tools/re2c/doc/sample.bib
|
|
|
|
EXTRA_DIST += tools/re2c/examples/basemmap.c
|
|
|
|
EXTRA_DIST += tools/re2c/examples/c.re
|
|
|
|
EXTRA_DIST += tools/re2c/examples/cmmap.re
|
|
|
|
EXTRA_DIST += tools/re2c/examples/cnokw.re
|
|
|
|
EXTRA_DIST += tools/re2c/examples/cunroll.re
|
|
|
|
EXTRA_DIST += tools/re2c/examples/modula.re
|
|
|
|
EXTRA_DIST += tools/re2c/examples/repeater.re
|
|
|
|
EXTRA_DIST += tools/re2c/examples/sample.re
|
|
|
|
EXTRA_DIST += tools/re2c/examples/simple.re
|
|
|
|
EXTRA_DIST += tools/re2c/examples/rexx/README
|
|
|
|
EXTRA_DIST += tools/re2c/examples/rexx/rexx.l
|
|
|
|
EXTRA_DIST += tools/re2c/examples/rexx/scanio.c
|