JFLAGS=-g //defines a variable which can be used in shell commands below //-g means compile and save info for the debugger, jdb //1st line is dependences listing //it says Main.class depends on all the *.java files in Parse diry //plus Yylex.java (which is created by JLex); so that when any of these //files change (or are touched), the 2nd line action will be taken //action on 2nd line is to compile those files Parse/Main.class: Parse/*.java Parse/Yylex.java javac ${JFLAGS} Parse/*.java //insures that if you change your Tiger.lex file a new scanner //will be generated by JLex and moved to file Yylex.java Parse/Yylex.java: Parse/Tiger.lex cd Parse; java JLex.Main Tiger.lex; mv Tiger.lex.java Yylex.java ErrorMsg/ErrorMsg.class: ErrorMsg/*.java javac ${JFLAGS} ErrorMsg/*.java clean: rm Parse/*.class ErrorMsg/*.class Parse/Yylex.java