Using GNU make
Command lines are growing longer and longer, and you will get very tired of typing the commands required to build a programming language. We are already using Unicon, Java, uflex, jflex, iyacc, and BYACC/J. Few tools for building large programs are multi-platform and multi-language enough for this toolset. We will use the ultimate: GNU make
.
Once a make
program is installed on your path, you can store the build rules for Unicon or Java or both in a file named a makefile
(or Makefile
), and then just run make
whenever you have changed the code and need to rebuild. A full treatment of make
is beyond the scope of this book, but here are the key points.
A makefile
is like a lex
or yacc
specification, except instead of recognizing patterns of strings, a makefile
specifies a graph of build dependencies between files. For each file, the makefile
contains the source files it depends on as well as a list of one or more command lines needed to build that file. The makefile...