home *** CD-ROM | disk | FTP | other *** search
/ The Sleeping Beauty - A Multimedia Storybook / EBOOK_SB.bin / sb / sb.mak < prev    next >
Text File  |  1991-05-01  |  3KB  |  116 lines

  1. #############################################################################
  2. #
  3. # MAKEFILE
  4. #
  5. #############################################################################
  6. #
  7. # Program Description: Generic Makefile for Viewer Data files
  8. #
  9. #############################################################################
  10. #
  11. # The following are the optionally passed variables:
  12. #
  13. # STOPF        = Contains an alternate stop word file.
  14. # FIELDF    = Contains an alternate field definition file.
  15. # IND_ONLY    = IND_ONLY=Y will not rebuild the MVB file, force build .ind.
  16. #############################################################################
  17.  
  18. !IFNDEF NAME
  19. !ERROR -- Viewer "NAME" macro undefined
  20. !endif
  21.  
  22. #
  23. !IFNDEF CHECK_DATA
  24. GOAL_MVB        =MVB_GOAL
  25. !else
  26. #if check_data flag is set, it will check Name.MVB entry for dependencies
  27. #  eg: for .rtf, .bmp and other changes.
  28. GOAL_MVB        =$(NAME).MVB
  29. !endif
  30.  
  31.  
  32. !IFNDEF STOPF
  33. STOPF        =$(NAME)
  34. !endif
  35.  
  36. !IFNDEF FIELDF
  37. FIELDF        =$(NAME)
  38. !endif
  39.  
  40. # This will allow optional skipping of the first step- 
  41. # (compile the Viewer file).  It does this by preventing the 2nd
  42. # step from checking if the Viewer file needs to be rebuilt.
  43. #  
  44. !IFNDEF IND_ONLY
  45. WIN_FS        =$(GOAL_MVB)
  46. CLEAN_IND=
  47. !else
  48. CLEAN_IND=DEL_ZOF
  49. WIN_FS          =
  50. !endif
  51.  
  52. # Multivolume titles-- Bookshelf type titles- this option selected
  53. # w/ builddoc /m parameter does BOTH /i command function as well
  54. # as build using a .MLT file.  (used by both forage and w_scan).
  55.  
  56. !IFNDEF MULTIVOL
  57. MLTFILE=
  58. FOPTS= /w $(NAME).MVB
  59. !else
  60. MLTFILE=$(NAME).mlt
  61. FOPTS= /m $(NAME).mlt
  62. WIN_FS          =
  63. !endif
  64.  
  65.  
  66. goal:    $(NAME).ind $(CLEAN_IND) 
  67.  
  68. clean:
  69.     -del $(NAME).wrs
  70.     -del $(NAME).lst
  71.     -del $(NAME).oca
  72.     -del $(NAME).zon
  73.     -del $(NAME).zos
  74.     -del $(NAME).cfg
  75.     -del $(NAME).MVB
  76.     -del $(NAME).ans
  77.     -del $(NAME).ind
  78.  
  79. #Following for those using CHECK_DATA option only:
  80. $(NAME).MVB: \
  81. # place your data files list here:  following example for tarot,
  82. #  but no need to change unless you use check_data flag.
  83. .\macrotxt\demoapp2.RTF \
  84. #  for execution, it falls thru to following goal:
  85.  
  86. $(GOAL_MVB): $(NAME).mvp   
  87.     mvc $(NAME).mvp
  88.         @echo .
  89.     @echo .
  90. DEL_ZOF:
  91.     @-del    $(NAME).zof
  92.  
  93. $(NAME).zof:    $(WIN_FS)
  94.     forage $(FOPTS)
  95.     @echo .
  96.     @echo .
  97. #create a marker file so we can delete large .ans file and still
  98. #   have good restartability.
  99.         @echo > $(NAME).zof
  100.  
  101. $(NAME).oca:    $(NAME).zof 
  102.     w_scan $(NAME).ans,,$(STOPF).stp,$(FIELDF).fld,$(MLTFILE),$(NAME).lst;
  103.         @-del $(NAME).ans
  104.     @echo .
  105.     @echo .
  106.  
  107. $(NAME).ind:    $(NAME).oca
  108.     index $(NAME),,$(NAME),$(STOPF).stp,$(FIELDF).fld,$(NAME).map;
  109.     @-del $(NAME).wrs
  110.     @-del $(NAME).zon
  111.     @-del $(NAME).zos
  112.     @-del $(NAME).cfg
  113.     @-del $(NAME).map
  114.         
  115.  
  116.