Using the program ExtractCode.cpp
from Volume 2 of this book, all the code listings in this book are automatically
extracted from the ASCII text version of this book and placed in subdirectories
according to their chapters. In addition, ExtractCode.cpp creates several
makefiles in each subdirectory (with different names) so you can simply
move into that subdirectory and type make -f mycompiler.makefile
(substituting the name of your compiler for ‘mycompiler’, the
‘-f’ flag says “use what follows as the
makefile”). Finally, ExtractCode.cpp creates a
“master” makefile in the root directory where the
book’s files have been expanded, and this makefile descends into
each subdirectory and calls make with the appropriate makefile.
This way you can compile all the code in the book by invoking a single
make command, and the process will stop whenever your compiler is unable
to handle a particular file (note that a Standard C++ conforming compiler should
be able to compile all the files in this book). Because implementations of
make vary from system to system, only the most basic, common features are
used in the generated makefiles.