I'll show you a makefile that lets you be sure you have printouts of the latest versions of certain files in a directory. Any time you think files have been modified, just type:
make saw that the files chap1 and chap5 had been modified since the last print job. So it used pr and lpr to print the files. Then it ran Or, the command make printall will print all files any time without updating the print timestamp file.to create or update the empty file named print ; the "timestamp" (modification time) of this empty file keeps a record of when these other files were printed.
Change the names and the print commands to do what you want.
Remember that each command line (here, the lines starting with
LPR = lpr -Pxyz FILES = preface chap1 chap2 chap3 chap4 chap5 appendix print: $(FILES) pr $? | $(LPR) touch print printall: pr $(FILES) | $(LPR)