diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-06-13 14:44:58 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-06-13 15:03:55 +0300 |
commit | fa5d4812fc4936dd470ded17116c9d966d0d645e (patch) | |
tree | f0efda476ed06795f3de233c440e4e8d87f2b60a /mh/Makefile.am | |
parent | 3a78309aa59c245c14e29d3e7eb953c6a2ea1035 (diff) | |
download | mailutils-fa5d4812fc4936dd470ded17116c9d966d0d645e.tar.gz mailutils-fa5d4812fc4936dd470ded17116c9d966d0d645e.tar.bz2 |
Rewrite Makefile rules for lex and bison
The aim is to get rid of the explicit rules and use the Autmake framework
as much as possible, without hurting the flexibility. To this effect, the
gylwrap tool is rewritten from scratch (in Perl). In compatibility
mode it takes the same arguments as the standard ylwrap. Additional
configuration is supplied in the configuration file gylwrap.conf, located
in the directory where the input file resides.
* mu-aux/gylwrap: Rewrite from scratch.
* configure.ac (MU_YLWRAP): New subst variable.
* libmailutils/base/.gitignore: Update.
* libmailutils/base/Makefile.am: Update.
* libmailutils/base/gylwrap.conf: New file.
* libmailutils/cfg/.gitignore: Update.
* libmailutils/cfg/Makefile.am: Use new YLWRAP
* libmailutils/cfg/cfg.h: Remove.
* libmailutils/cfg/gylwrap.conf: New file.
* libmailutils/cfg/lexer.l: Include mailutils/yyloc.h directly.
* libmailutils/cfg/parser.y: Likewise.
* libmu_sieve/Makefile.am: Use new YLWRAP
* libmu_sieve/gylwrap.conf: New file.
* libmu_sieve/sieve.y: Rename to libmu_sieve/sieve-gram.y
* libmu_sieve/sieve.l: Rename to libmu_sieve/sieve-lex.l
* mail/Makefile.am: Use new YLWRAP
* mh/.gitignore: Update.
* mh/Makefile.am: Use new YLWRAP
* mh/gylwrap.conf: New file.
* mh/mh_alias.y: Rename to mh/mh_alias_gram.y
* mh/mh_alias.l: Rename to mh/mh_alias_lex.l
* mh/pick.y: Rename to mh/pick-gram.y
* mimeview/.gitignore: Update.
* mimeview/Makefile.am: Use new YLWRAP
* mimeview/mimetypes.y: Rename to mimeview/grammar.y
* mimeview/gylwrap.conf: New file.
* mimeview/mimetypes.l: Rename to mimeview/lexer.l
* po/POTFILES.in: Update
Diffstat (limited to 'mh/Makefile.am')
-rw-r--r-- | mh/Makefile.am | 51 |
1 files changed, 14 insertions, 37 deletions
diff --git a/mh/Makefile.am b/mh/Makefile.am index fdd23f827..d4c89a892 100644 --- a/mh/Makefile.am +++ b/mh/Makefile.am @@ -68,33 +68,33 @@ noinst_LIBRARIES = libmh.a libmh_a_SOURCES= \ compcommon.c\ mboxprop.c\ - mh_alias_gram.c\ - mh_alias_lex.c\ + mh_alias_gram.y\ + mh_alias_lex.l\ mh_getopt.c\ mh_global.c\ mh_format.c\ mh_init.c\ mh_list.c\ - mh_fmtgram.c\ + mh_fmtgram.y\ mh_msgset.c\ mh_sequence.c\ mh_stream.c\ mh_whatnow.c\ mh_whom.c\ whatnowenv.c -noinst_HEADERS = mh.h mh_alias.h mh_format.h mh_getopt.h +noinst_HEADERS = mh.h mh_alias_gram.h mh_format.h mh_getopt.h -BUILT_SOURCES= \ - mh_fmtgram.c \ - pick-gram.c \ - pick-gram.h \ - mh_alias_gram.c \ - mh_alias_lex.c \ - mh_alias.h +BUILT_SOURCES=\ + mh_fmtgram.c\ + pick-gram.c\ + pick-gram.h\ + mh_alias_gram.c\ + mh_alias_gram.h\ + mh_alias_lex.c MAINTAINERCLEANFILES=$(BUILT_SOURCES) -EXTRA_DIST = mh_fmtgram.y pick.y mh_alias.y mh_alias.l +EXTRA_DIST = gylwrap.conf mhlibdir = $(pkgdatadir)/mh @@ -119,9 +119,9 @@ mh_LIBS = \ @MU_COMMON_LIBRARIES@ LDADD = $(mh_LIBS) scan_LDADD = $(mh_LIBS) @CURSES_LIBS@ -pick_SOURCES = pick.c pick.h pick-gram.c pick-gram.h +pick_SOURCES = pick.c pick.h pick-gram.y pick-gram.h -YLWRAP = $(SHELL) $(mu_aux_dir)/gylwrap +YLWRAP = @MU_YLWRAP@ AM_YFLAGS=-vt inc_LDADD = \ @@ -144,29 +144,6 @@ inc_LDADD = \ ${MU_LIB_MAILUTILS}\ @MU_COMMON_LIBRARIES@ - -pick-gram.c pick-gram.h: $(srcdir)/pick.y - $(AM_V_GEN)$(YLWRAP) "$(YACC) $(AM_YFLAGS) -d" $< \ - y.tab.c pick-gram.c y.tab.h pick-gram.h \ - y.output pick.output \ - -- -yy pick_yy - -mh_fmtgram.c: $(srcdir)/mh_fmtgram.y - $(AM_V_GEN)$(YLWRAP) "$(YACC) $(AM_YFLAGS)" $< \ - y.tab.c mh_fmtgram.c y.output fmtgram.y.output \ - -- -yy fmt_yy - -mh_alias_gram.c mh_alias.h: $(srcdir)/mh_alias.y - $(AM_V_GEN)$(YLWRAP) "$(YACC) $(AM_YFLAGS) -d" $< \ - y.tab.c mh_alias_gram.c y.tab.h mh_alias.h \ - y.output mh_alias.output \ - -- -yy ali_yy - -mh_alias_lex.c: $(srcdir)/mh_alias.l mh_alias.h - $(AM_V_GEN)$(YLWRAP) "$(LEX) $(AM_LEXFLAGS) $(LEXFLAGS)" \ - $(srcdir)/mh_alias.l lex.yy.c mh_alias_lex.c \ - -- -yy ali_yy - install-exec-hook: @here=`pwd`; \ cd $(DESTDIR)$(bindir); \ |