summaryrefslogtreecommitdiff
path: root/lib/am/yacc.am
diff options
context:
space:
mode:
authorAkim Demaille <akim@epita.fr>2001-04-09 09:58:57 +0000
committerAkim Demaille <akim@epita.fr>2001-04-09 09:58:57 +0000
commit3727a57d838899c31cfc714ae04ac2b52d356bf8 (patch)
treebe569dd1cdfcb3086f51e84d82590dc3a6fd7954 /lib/am/yacc.am
parent6ed11d3cf3341fc8171ecca81703ce4f730dc368 (diff)
downloadautomake-3727a57d838899c31cfc714ae04ac2b52d356bf8.tar.gz
* automake.in (&condition_negate): New.
(&variable_conditions_permutations): Use it. (&read_am_file, &file_contents): Use it on `else' clauses to support `if FALSE'. (&output_yacc_build_rule): Output this... * yacc.am: New file.
Diffstat (limited to 'lib/am/yacc.am')
-rw-r--r--lib/am/yacc.am32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/am/yacc.am b/lib/am/yacc.am
new file mode 100644
index 000000000..5800ca2d8
--- /dev/null
+++ b/lib/am/yacc.am
@@ -0,0 +1,32 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright 1998, 1999, 2001 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+
+## Generate rule for c/c++.
+%YACC_SUFFIX%%C_SUFFIX%:
+if %?YLWRAP%
+ $(SHELL) $(YLWRAP) $(YACC) $< y.tab.c $*%C_SUFFIX% y.tab.h $*.h -- $(AM_YFLAGS) $(YFLAGS)
+else
+ $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*%C_SUFFIX%
+ if test -f y.tab.h; then \
+ if cmp -s y.tab.h $*.h; then \
+ rm -f y.tab.h; \
+ else \
+ mv y.tab.h $*.h; \
+ fi; \
+ fi
+endif %?YLWRAP%