[comp.sys.mac.programmer] Beginner's MPW Makefile question

jk3t+@andrew.cmu.edu (Jonathan King) (01/30/91)

(Being part of a continuing series of [I hope] easy questions about MPW.)

After I got the linker to link the examples, I decided to actually get
something done... I'm porting some Unix(tm) tools over to the Mac as
MPW tools, and after I fixed the code so that the compiler didn't gag
on it, I decided to let "createmake" do the work in creating a
makefile for the tool.  Using the Commando interface is quick and easy, and the
makefile looks plausible, so I try to build the tool.  What I get is:

# 3:13:08 PM ----- Build of mytool.
# 3:13:08 PM ----- Analyzing dependencies.
### MPW Shell - Missing End command.
### MPW Shell - Execution of Make terminated.
### MPW Shell - Execution of BuildProgram terminated.
echo {status}
-3

The negative status code tells me that the Shell is unhappy,
apparently about a missing End command somewhere in BuildProgram or
something.  So, I tried to create a make file for the example tool,
count, and build that.  It builds just fine.  But mine doesn't, even
though the makefiles are virtually identical.  To say the least, this 
is very frustrating.

Here is the makefile (mytool.make) that chokes up the process (with a
couple blank lines deleted and the goofy MPW non-asciis replaced by
characters that sortof look like them, S for the opt-f and 6 for opt-d).

#   File:       mytool.make
#   Target:     mytool
#   Sources:    mytool.c 
#   Created:    Tuesday, January 29, 1991 3:01:21 PM

OBJECTS = mytool.c.o 

mytool SS mytool.make {OBJECTS}
	Link -w -c 'MPS ' -t MPST 6
		{OBJECTS} 6
		"{CLibraries}"CSANELib.o 6
		"{CLibraries}"Math.o 6
		#"{CLibraries}"Complex.o 6
		"{CLibraries}"StdClib.o 6
		"{CLibraries}"CInterface.o 6
		"{Libraries}"Stubs.o 6
		"{CLibraries}"CRuntime.o 6
		"{Libraries}"Interface.o 6
		"{Libraries}"ToolLibs.o 6
		-o mytool
mytool.c.o S mytool.make mytool.c
	 C    mytool.c

The MPW 3.1 release notes suggest that createmake will screw up on
some DA's, but this is a tool.  The only differences between this
makefile and the one for count (which works) has to do with compiling
and linking in resource files, which I don't have.

Any ideas?  E-mail might be appropriate although I do now read this
group and will summarize responses that I get if they work.

Thanks,

jking