# Makefile for menu.icn # copyright 1992 Ronald Florence # @(#) version 1.1 (ron@mlfarm.com, 12 May 1992) # --- Change the following as needed. --- # Indexfile = full path of index # Datadir = directory for recipes, with final path separator # Printcmd = command to pretty-print and spool printed recipes; # the name of the recipe will be substituted for %s. # Compress = (Optional) path of compress command if you want # recipes stored compressed. # Mansuffix = system-dependent suffix for man pages Indexfile = /home/heather/lib/recipe.index Datadir = /home/heather/recipes/ Printcmd = mp -o -s '%s' | lpr Compress = Mansuffix = l # X-Windows only. # Font = display font # Maxwin = maximum lines in a window Font = lucidasans-typewriter-12 Maxwin = 50 # Non-X-Windows only. # Pager = (Optional) name of an external pager (e.g., more, less) # to use instead of the built-in pager; the print command # does not work if you use an external pager. Pager = # --- You shouldn't need to make changes below here. --- SHELL = /bin/sh ICONT = icont SRC = xmenu.S menu.S nr.S xdefault.icn .SUFFIXES: .icn .u1 .S .icn.u1: icont -c $< .icn: $(ICONT) $@ .S.icn: Makefile rm -f $@ sed -e 's|%INDEXFILE%|$(Indexfile)|g' \ -e 's|%DATADIR%|$(Datadir)|g' \ -e "s/%PRINTCMD%/$(Printcmd)/g" \ -e 's|%COMPRESS%|$(Compress)|g' \ -e 's|%MAXWIN%|$(Maxwin)|g' \ -e 's|%FONT%|$(Font)|g' \ -e 's|%PAGER%|$(Pager)|g' $< > $@ chmod 444 $@ default: @echo "make what?" x X: xmenu nr recipedir manpage ln xmenu menu unix Unix: menu nr recipedir manpage dos ms-dos: menu.icx nr recipedir: [ -d $(Datadir) ] || mkdir `dirname $(Datadir)BOGUS` # xmenu: xmenu.icn xmenu: xdefault.u1 xmenu.icn evmux.u1 button.u1 $(ICONT) -u $@ # menu: menu.icn menu: menu.icn iolib.u1 $(ICONT) -u $@ nr: nr.icn $(ICONT) -u $@ manpage: menu.man Makefile sed -e 's|%INDEXFILE%|$(Indexfile)|g' \ -e 's|%DATADIR%|$(Datadir)|g' menu.man > menu.$(Mansuffix) # if you use findre.icn instead of regexp.icn, the dependency list # for menu.icx should be: menu.icn iolib.u1 findre.u1 menu.icx: menu.icn iolib.u1 regexp.u1 icont -u menu shar: $(SRC) Readme Makefile menu.man 1 2 3 shar -a Readme Makefile menu.man $(SRC) 1 2 3 > menu.shar test: nr 1 2 3 nr "Best Brownies" "chocolate" < 1 nr "Blondie Brownies" "chips chocolate" < 2 nr "Blondies" "butterscotch brownies" < 3 @echo @echo "Now try a menu command, like" @echo " menu 'brown|blond' " @echo " menu chocolate" @echo @echo "If you haven't read the man page (shame!), for X-Windows" @echo "use the left mouse button to select a recipe, the buttons," @echo ", m, or b, to page the recipes, or p in a" @echo "recipe window to print the recipe." @echo @echo "For character displays, enter the number of the recipe @echo "to display, to page, or q to quit. To" @echo "print a recipe, enter p before the recipe number." @echo @echo "Enjoy." clean: rm -f *.u[12] xmenu menu nr *menu.icn nr.icn