From eed575db5361f646cc9ad263046e0d275120e790 Mon Sep 17 00:00:00 2001 From: ksherlock Date: Mon, 29 Jul 2013 12:52:52 -0700 Subject: [PATCH] Created MPW Makefile Conversion (markdown) --- MPW-Makefile-Conversion.md | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 MPW-Makefile-Conversion.md diff --git a/MPW-Makefile-Conversion.md b/MPW-Makefile-Conversion.md new file mode 100644 index 0000000..f7903ca --- /dev/null +++ b/MPW-Makefile-Conversion.md @@ -0,0 +1,52 @@ +MPW's `make` utility is similar to the Unix `make` utility. Similar enough that some makefiles can be converted with simple text replacements. + +Here is an MPW makefile from IR 2.0.2 (ir.make): + + IR ƒƒ IR.make ∂ + IRInit.aii.obj ∂ + RequestProc.aii.obj ∂ + IR.rfork + LinkIIGS -t $B6 -at $0000 ∂ + IRInit.aii.obj ∂ + RequestProc.aii.obj ∂ + -o IR + DuplicateIIgs -y -m IR : + + IRInit.aii.obj ƒ IR.make IRInit.aii + AsmIIGS -t IRInit.aii + RequestProc.aii.obj ƒ IR.make RequestProc.aii + AsmIIGS -t RequestProc.aii + IR.rfork ƒ IR.make IR.r + RezIIgs IR.r -o IR.rfork + Duplicate -r -y IR.rfork IR + +* `ƒƒ` and `ƒ` should be replaced with `:`. +* `∂` should be replaced with `\`. +* `$` needs to be escaped as `\$$`. +* mpw commands (AsmIIgs, LinkIIgs, RezIIgs, and Duplicate) are executed as _mpw command_ (unless you generate shell scripts for each command). +* the DuplicateIIgs command is no longer necessary. +* if the makefile (IR.make) is included as a dependency, it should be updated to the new name. + +The modern makefile (makefile) is now: + + + IR : makefile \ + IRInit.aii.obj \ + RequestProc.aii.obj \ + IR.rfork + mpw LinkIIGS -t \$$B6 -at \$$0000 \ + IRInit.aii.obj \ + RequestProc.aii.obj \ + -o IR + mpw Duplicate -r -y IR.rfork IR + + IRInit.aii.obj : IR.make IRInit.aii + mpw AsmIIGS -t IRInit.aii + RequestProc.aii.obj : IR.make RequestProc.aii + mpw AsmIIGS -t RequestProc.aii + IR.rfork : IR.make IR.r + mpw RezIIgs IR.r -o IR.rfork + +(the Duplicate command was also moved from IR.rfork to IR since I prefer to set the resource fork after linking). + +More complicated makefiles involving variables require more work and editing. \ No newline at end of file