home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / contrib / menu / Makefile < prev    next >
Makefile  |  1993-04-29  |  3KB  |  120 lines

  1. # Makefile for menu.icn
  2. # copyright 1992 Ronald Florence
  3. # @(#) version 1.1 (ron@mlfarm.com, 12 May 1992)
  4.  
  5. # --- Change the following as needed. ---
  6.  
  7. # Indexfile = full path of index
  8. # Datadir = directory for recipes, with final path separator
  9. # Printcmd = command to pretty-print and spool printed recipes;
  10. #         the name of the recipe will be substituted for %s.
  11. # Compress = (Optional) path of compress command if you want 
  12. #         recipes stored compressed.
  13. # Mansuffix = system-dependent suffix for man pages
  14.  
  15. Indexfile = /home/heather/lib/recipe.index
  16. Datadir = /home/heather/recipes/
  17. Printcmd = mp -o -s '%s' | lpr
  18. Compress =
  19. Mansuffix = l
  20.  
  21. # X-Windows only.
  22. # Font = display font
  23. # Maxwin = maximum lines in a window
  24.  
  25. Font = lucidasans-typewriter-12
  26. Maxwin = 50
  27.  
  28. # Non-X-Windows only.
  29. # Pager = (Optional) name of an external pager (e.g., more, less)
  30. #         to use instead of the built-in pager; the print command
  31. #      does not work if you use an external pager.
  32.  
  33. Pager =
  34.  
  35. # --- You shouldn't need to make changes below here. ---
  36.  
  37. SHELL = /bin/sh
  38. ICONT = icont
  39. SRC = xmenu.S menu.S nr.S xdefault.icn
  40.  
  41. .SUFFIXES: .icn .u1 .S
  42.  
  43. .icn.u1:
  44.     icont -c $<
  45.  
  46. .icn:
  47.     $(ICONT) $@
  48.  
  49. .S.icn:    Makefile
  50.     rm -f $@
  51.     sed -e 's|%INDEXFILE%|$(Indexfile)|g' \
  52.         -e 's|%DATADIR%|$(Datadir)|g' \
  53.         -e "s/%PRINTCMD%/$(Printcmd)/g"   \
  54.         -e 's|%COMPRESS%|$(Compress)|g'   \
  55.         -e 's|%MAXWIN%|$(Maxwin)|g'   \
  56.         -e 's|%FONT%|$(Font)|g'   \
  57.         -e 's|%PAGER%|$(Pager)|g' $< > $@
  58.     chmod 444 $@
  59.  
  60. default: 
  61.     @echo "make what?"
  62.  
  63. x X:    xmenu nr recipedir manpage
  64.     ln xmenu menu
  65.  
  66. unix Unix:    menu nr recipedir manpage
  67.  
  68. dos ms-dos:    menu.icx nr
  69.  
  70. recipedir:    
  71.     [ -d $(Datadir) ] || mkdir `dirname $(Datadir)BOGUS`
  72.  
  73. # xmenu:    xmenu.icn
  74. xmenu:    xdefault.u1 xmenu.icn evmux.u1 button.u1
  75.     $(ICONT) -u $@
  76.  
  77. # menu:    menu.icn
  78. menu:    menu.icn iolib.u1
  79.     $(ICONT) -u $@
  80.  
  81. nr:    nr.icn
  82.     $(ICONT) -u $@
  83.  
  84. manpage:    menu.man Makefile
  85.     sed -e 's|%INDEXFILE%|$(Indexfile)|g' \
  86.         -e 's|%DATADIR%|$(Datadir)|g' menu.man > menu.$(Mansuffix)
  87.  
  88. # if you use findre.icn instead of regexp.icn, the dependency list
  89. # for menu.icx should be: menu.icn iolib.u1 findre.u1
  90.  
  91. menu.icx:    menu.icn iolib.u1 regexp.u1
  92.     icont -u menu
  93.  
  94. shar:    $(SRC) Readme Makefile menu.man 1 2 3
  95.     shar -a Readme Makefile menu.man $(SRC) 1 2 3 > menu.shar
  96.  
  97. test:    nr 1 2 3
  98.     nr "Best Brownies" "chocolate" < 1
  99.     nr "Blondie Brownies" "chips chocolate" < 2
  100.     nr "Blondies" "butterscotch brownies" < 3
  101.     @echo
  102.     @echo "Now try a menu command, like"
  103.     @echo "   menu 'brown|blond' <or>"
  104.     @echo "   menu chocolate"
  105.     @echo
  106.     @echo "If you haven't read the man page (shame!), for X-Windows"
  107.     @echo "use the left mouse button to select a recipe, the buttons,"
  108.     @echo "<space>, m, or b, to page the recipes, or p in a"
  109.     @echo "recipe window to print the recipe."
  110.     @echo 
  111.     @echo "For character displays, enter the number of the recipe
  112.     @echo "to display, <return> to page, or q to quit.  To"
  113.     @echo "print a recipe, enter p before the recipe number."
  114.     @echo
  115.     @echo "Enjoy."
  116.  
  117. clean:
  118.     rm -f *.u[12] xmenu menu nr *menu.icn nr.icn
  119.  
  120.