# Makefile for printing a set of files. Invoke as # make -f Make.print FILES="filenames..." FILES=/dev/null # Should be overridden by make invocation or environment cat: -@cat $(FILES) # If the environment or Make variable PRINTER is set, it overrides the # default - the default is chosen by the hostname to get the right printer # for the different groups. (which should have set PostScript to the right # printer, but...) Convoluted enough for you? print: @case "$(PRINTER)" in \ "") \ case `hostname` in \ *.csri) p=lw;; \ *.cs|*.ai|*.theory|*.na) p=im;; \ *.db) p=dblw;; \ *.dgp) p=qms;; \ *.white) p=whiteps1;; \ *) p=PostScript;; \ esac ;; \ *) p=$(PRINTER) ;; \ esac; \ echo printing to $$p ; \ $${LPR-lpr} -P$$p $(FILES)