1 bin_PROGRAMS = gcalctool gcalccmd
2 noinst_PROGRAMS = test-mp test-mp-equation
4 TESTS = test-mp test-mp-equation
7 -DUI_DIR=\""$(datadir)/gcalctool"\" \
8 -DVERSION=\""$(VERSION)"\" \
9 -DLOCALE_DIR=\""$(localedir)"\" \
10 -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
32 math-variable-popup.c \
33 math-variable-popup.h \
44 mp-equation-private.h \
47 mp-equation-parser.c \
48 mp-equation-parser.h \
77 mp-equation-parser.c \
108 test_mp_equation_SOURCES = \
120 mp-equation-parser.c \
121 mp-equation-lexer.c \
132 test_mp_equation_LDADD = \
139 mp-equation-parser.h \
140 mp-equation-parser.c \
141 mp-equation-lexer.c \
144 # Generate parser files
145 mp-equation-parser.c mp-equation-parser.h: mp-equation-parser.y mp-equation-lexer.h
146 $(AM_V_GEN)$(YACC) -d -o mp-equation-parser.c $(srcdir)/mp-equation-parser.y
148 # Generate lexer files
149 mp-equation-lexer.c mp-equation-lexer.h: mp-equation-lexer.l
150 $(AM_V_GEN)$(LEX) $(srcdir)/mp-equation-lexer.l
152 # Rebuild parser when source files change
153 mp-equation-parser.o: mp-equation-lexer.h
154 mp-equation-lexer.o: mp-equation-parser.h
155 mp-equation.c: mp-equation-lexer.h mp-equation-parser.h
157 # Generate enum types
158 mp-enums.h: mp-enums.h.template mp-serializer.h
159 $(AM_V_GEN)$(GLIB_MKENUMS) --template $(srcdir)/mp-enums.h.template $(srcdir)/mp-serializer.h > mp-enums.h
161 mp-enums.c: mp-enums.c.template mp-enums.h mp-serializer.h
162 $(AM_V_GEN)$(GLIB_MKENUMS) --template $(srcdir)/mp-enums.c.template $(srcdir)/mp-serializer.h > mp-enums.c
165 math-serializer.c: mp-enums.h
166 math-equation.c: mp-enums.h
168 # Install a symlink between gcalctool and gnome-calculator
170 test -e "$(DESTDIR)$(bindir)/gnome-calculator" \
171 || (cd "$(DESTDIR)$(bindir)" && ln -s gcalctool gnome-calculator)
173 # Remove the symlink between gcalctool and gnome-calculator
175 test -h "$(DESTDIR)$(bindir)/gnome-calculator" \
176 && rm -f "$(DESTDIR)$(bindir)/gnome-calculator"
179 mp-equation-parser.y \
180 mp-equation-lexer.l \
181 mp-enums.c.template \