home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / lr.zip / MAKEFILE.MAK < prev    next >
Text File  |  1993-05-15  |  3KB  |  87 lines

  1.  
  2.  
  3.  #-----------------------------------------------------------------------------
  4.  # MAKEFILE - Make file to make grammars
  5.  #
  6.  # Copyright (C) Transendental Automation, 1993.
  7.  #
  8.  # Type 'make.exe' or 'nmake.exe' to use it or use another tools that can work
  9.  # with make files ( for example IBM WorkFrame/2 ).
  10.  # See notes below for understanding of work of this make file.
  11.  # We hope there is all that you need for compiling your grammars and parsing
  12.  # your text no more no less.
  13.  #-----------------------------------------------------------------------------
  14.  
  15.  
  16.  #-----------------------------------------------------------------------------
  17.  #                  PART 1 - define grammar and text
  18.  #
  19.  #            Edit this part when choosing another grammar
  20.  #-----------------------------------------------------------------------------
  21.  
  22.  
  23.  #-----------------------------------------------------------------------------
  24.  # Grammar name - if absents, no make at all.
  25.  #
  26.  # This name will be used as name + '.' + extension of input and
  27.  # output files. So,in this case, the GDL file is 'sample.gr'
  28.  # compiled grammar will be named as 'sample.lrs' and parse results
  29.  # will be named as 'sample.prs', this name also will be used in
  30.  # names of structures and constants in 'sample.str' and 'sample.n'
  31.  # files
  32.  #-----------------------------------------------------------------------------
  33.  
  34.  GR = sample
  35.  
  36.  #-----------------------------------------------------------------------------
  37.  # Text name - if commented out by #, then only compile grammar
  38.  # You can also set it with any name of file that you want to parse.
  39.  # For example :
  40.  # TEXT = ASD.YYT
  41.  #-----------------------------------------------------------------------------
  42.  
  43.  TEXT = $(GR).txt
  44.  
  45.  #-----------------------------------------------------------------------------
  46.  #                  PART 2 - path to LRP compiler/parser
  47.  #
  48.  #                     Edit this part when installing LRP
  49.  # Here must be full path without '\' at end where is placed program 'lrp.exe'
  50.  # that is used to compile grammar and parse input files .
  51.  #-----------------------------------------------------------------------------
  52.  
  53.  LRP_DIR = .
  54.  
  55.  #-----------------------------------------------------------------------------
  56.  #            PART 3 - making grammar and/or parse text
  57.  #
  58.  #                    Do not edit this part
  59.  #-----------------------------------------------------------------------------
  60.  
  61.  !CMDSWITCHES +S
  62.  !IFDEF LRP_DIR
  63.  
  64.  ·SUFFIXES: .gr .lrs .prs
  65.  
  66.  {.}.gr.lrs:
  67.          $(LRP_DIR)\LRP.EXE $*.gr
  68.  
  69.  !IFDEF GR
  70.  
  71.  !IFDEF TEXT
  72.  $(GR).prs:      $(GR).lrs $(TEXT)
  73.          $(LRP_DIR)\LRP.EXE $**
  74.  !ENDIF
  75.  
  76.  $(GR).lrs:      $(GR).gr
  77.  
  78.  
  79.  !ENDIF
  80.  
  81.  !ELSE
  82.  ERR:
  83.          echo Fatal error U1050: failed to find path to LRP compiler/parser
  84.  !ENDIF
  85.    
  86.  
  87.