home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume12 / cake / part06 / Lib / Yacc < prev    next >
Encoding:
Text File  |  1987-10-15  |  548 b   |  24 lines

  1. $    Cakefile to handle yacc files.
  2.  
  3. $    It renames the output file of yacc so that it has the same
  4. $    basename as the source file. The value of the macro YFLAGS
  5. $    is passed on to yacc.
  6.  
  7. $    This cakefile was written to work with the cakefile C and one
  8. $    of the cakefiles Main and System.
  9.  
  10. #ifndef    YFLAGS
  11. #define    YFLAGS    -d
  12. #endif
  13.  
  14. %.c^ %.h@:    %.y            if exist %.y and "-d" in [[echo YFLAGS]]
  15.         yacc YFLAGS %.y
  16.         @mv y.tab.h %.h
  17.         @mv y.tab.c %.c
  18.  
  19. %.c^:        %.y            if exist %.y and not "-d" in [[echo YFLAGS]]
  20.         yacc YFLAGS %.y
  21.         @mv y.tab.c %.c
  22.  
  23. #define    USE_YACC
  24.