source: trunk/essentials/sys-devel/automake-1.10/lib/am/yacc.am

Last change on this file was 3147, checked in by bird, 18 years ago

automake 1.10

File size: 2.2 KB
Line 
1## automake - create Makefile.in from Makefile.am
2## Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2006
3## Free Software Foundation, Inc.
4
5## This program is free software; you can redistribute it and/or modify
6## it under the terms of the GNU General Public License as published by
7## the Free Software Foundation; either version 2, or (at your option)
8## any later version.
9
10## This program is distributed in the hope that it will be useful,
11## but WITHOUT ANY WARRANTY; without even the implied warranty of
12## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13## GNU General Public License for more details.
14
15## You should have received a copy of the GNU General Public License
16## along with this program; if not, write to the Free Software
17## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18## 02110-1301, USA.
19
20## We want to disable the Yacc rebuild rule when
21## 1. AM_MAINTAINER_MODE is used, and
22## 2. --enable-maintainer-mode is not specified, and
23## 3. parser.c already exist, and
24## 4. parser.y and parser.c are distributed.
25## Point #3 is because `make maintainer-clean' erases parser.c, yet
26## the GNU Coding Standards require that ./configure; make works even
27## after that.
28## Point #4 is because parsers listed in nodist_*_SOURCES are always
29## built on the user's side, so it makes no sense to disable them.
30##
31## Points #1, #2, #3 are solved by unconditionally prefixing the rule
32## with $(am__skipyacc) defined below only when needed.
33##
34## Point #4 requires a condition on whether parser.y/parser.c are
35## distributed or not. We cannot have a generic rule that works in
36## both cases, so we ensure in automake that nodist_ parsers always
37## use non-generic rules.
38if %?MAINTAINER-MODE%
39if %?FIRST%
40@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ ||
41endif %?FIRST%
42endif %?MAINTAINER-MODE%
43
44?GENERIC?%EXT%%DERIVED-EXT%:
45?!GENERIC?%OBJ%: %SOURCE%
46?GENERIC? $(am__skipyacc) $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h %BASE%.h y.output %BASE%.output -- %COMPILE%
47?!GENERIC??DIST_SOURCE? $(am__skipyacc) \
48## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
49?!GENERIC? $(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% y.tab.c %OBJ% y.tab.h %BASE%.h y.output %BASE%.output -- %COMPILE%
Note: See TracBrowser for help on using the repository browser.