* automake.in (read_am_file): Removed debugging code.
[automake.git] / yacc.am
blob0d7e10531736d849203f9dfd9f5c3a54d067c7fa
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright 1998, 1999, 2001 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
7 ## any later version.
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17 ## 02111-1307, USA.
19 ## Generate rule for c/c++.
20 %YACC_SUFFIX%%C_SUFFIX%:
21 if %?YLWRAP%
22         $(SHELL) $(YLWRAP) $(YACC) $< y.tab.c $*%C_SUFFIX% y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
23 else !%?YLWRAP%
24         $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*%C_SUFFIX%
25         if test -f y.tab.h; then \
26           if cmp -s y.tab.h $*.h; then \
27             rm -f y.tab.h; \
28           else \
29             mv y.tab.h $*.h; \
30           fi; \
31         fi
32 endif !%?YLWRAP%