Annotation of OpenXM_contrib/gmp/demos/calc/Makefile.am, Revision 1.1.1.1
1.1 ohara 1: ## Process this file with automake to generate Makefile.in
2:
3: # Copyright 2000, 2001 Free Software Foundation, Inc.
4: #
5: # This file is part of the GNU MP Library.
6: #
7: # The GNU MP Library is free software; you can redistribute it and/or modify
8: # it under the terms of the GNU Lesser General Public License as published by
9: # the Free Software Foundation; either version 2.1 of the License, or (at your
10: # option) any later version.
11: #
12: # The GNU MP Library is distributed in the hope that it will be useful, but
13: # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14: # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15: # License for more details.
16: #
17: # You should have received a copy of the GNU Lesser General Public License
18: # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
19: # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20: # MA 02111-1307, USA.
21:
22:
23: AUTOMAKE_OPTIONS = gnu no-dependencies $(top_builddir)/ansi2knr
24:
25: INCLUDES = -I$(top_srcdir)
26:
27: # $(LEXLIB) seems to be unnecessary when using flex, but put it here for the
28: # benefit of anyone rebuilding using a standard lex.
29: LDADD = $(top_builddir)/libgmp.la $(LIBREADLINE) $(LEXLIB)
30:
31: EXTRA_DIST = calc.y calclex.l
32: EXTRA_PROGRAMS = calc
33: calc_SOURCES = calc.c calclex.c calcread.c calc.h calc-common.h
34:
35: CLEANFILES = $(EXTRA_PROGRAMS)
36:
37: allprogs: $(EXTRA_PROGRAMS)
38:
39:
40: # The distribution includes calc.c, calc.h and calclex.c, generated with
41: # bison and flex, so the calc program will build even if yacc and lex aren't
42: # available. The rules below regenerate those files if you modify calc.y or
43: # calclex.l.
44: #
45: # Using "cd"s instead of a $(srcdir) path ensures $(srcdir) doesn't get into
46: # the "#line"s in the generated files.
47: #
48: # FIXME: Automake knows about .y and .l, but as of version 1.5 doesn't do
49: # the right thing when building in a separate object directory, hence the
50: # explicit rules. Not sure if these rules cover all the portability
51: # problems that automake does.
52: #
53: # FIXME: With ansi2knr and no-dependencies, there doesn't seem any easy way
54: # to manually express that calclex$U.lo depends on calc.h. Making calclex.c
55: # depend on calc.h gets the right result, but the extra lex runs are
56: # unnecessary.
57:
58: $(srcdir)/calclex.c: calclex.l calc.h
59: cd $(srcdir); $(LEX) -ocalclex.c calclex.l
60: $(srcdir)/calc.c $(srcdir)/calc.h: calc.y
61: cd $(srcdir); $(YACC) -d -ocalc.c calc.y
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>