Making Evaluator a MathPaper Auxiliary Executable
In the previous chapter, we created and
tested Evaluator in a Unix shell. Now we want to add the Evaluator
source files
(grammar.y
and
rules.l
) to the MathPaper project and create a
second target, so that the MathPaper project can create both the
front end and the back end of the MathPaper application.
We’ll name this second target
“Evaluator”, and
we’ll make the MathPaper target dependent on the
Evaluator target, which will result in the Evaluator
target’s being built before the MathPaper target is
built. We’ll also set up the MathPaper target so
that the Evaluator
executable is automatically
copied into the MathPaper application wrapper as an auxiliary
executable.
What a lot of work! Until now, the MathPaper application itself has been the only target. Let’s get started on the modifications that we need.
Open
MathPaper.pbproj
in Project Builder.Choose Project → New Target, and a new sheet will drop down in PB’s main window.
Scroll to the bottom of the new sheet and select Tool, as shown in Figure 11-1.
Figure 11-1. Selecting a new target for MathPaper
Click the Next button and a second new sheet will drop down, prompting for the name of the new target.
Enter “Evaluator” in the Target Name field in this second drop-down sheet, as shown in Figure 11-2. Select MathPaper as the project to which to add the new target.
Figure 11-2. Giving ...
Get Building Cocoa Applications: A Step by Step Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.