Edit

kc3-lang/automake/yacc.am

Branch :

  • Show log

    Commit

  • Author : Tom Tromey
    Date : 2001-05-09 03:10:05
    Hash : adf4c603
    Message : For PR automake/29: * ylwrap: Handle arguments to program. Remove old code that tried to avoid absolute paths and add new code to do it in all cases. Removed ancient logic that tried to deal with relative path. * tests/Makefile.am (TESTS): Added yacc4.test. * tests/yacc4.test: New file.

  • yacc.am
  • ## 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 !%?YLWRAP%
    	$(YACC) $(AM_YFLAGS) $(YFLAGS) $<
    	sed -e '/^#/ s,$(srcdir)/,,' 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%