[comp.sys.mac.programmer] MPW Make

hoelzle@polya.Stanford.EDU (Urs Hoelzle) (02/23/89)

I have a large program and want to keep the source in several folders, the
objects in another folder.  For my make file, I tried the following:

># home directory
>SELFDIR	= Self:Self:
># object file directory
>OBJ 	= {SELFDIR}bin:
>
># directory dependency rule (left hand side = source directories)
>{OBJ} 	f  {SELFDIR}compiler: {SELFDIR}lookup: {SELFDIR}memory: 6
>			{SELFDIR}parser: {SELFDIR}runtime: {SELFDIR}zone:
>
>.c.o	f  .c
>	CPlus {CPOptions} {Default}.c -o {OBJ}{Default}.c.o

The idea is that when I have a dependency rule like

{OBJ}abort.c.o 	f  abort.c abort.h

make would search for abort.c and abort.h in the source directories.  However,
this does not work; running make -s gives the dependencies

>Self:Self:bin:abort.c.o
>	abort.c
>	abort.h
>	Self:Self:runtime:abort.c

and make complains it doesn't find abort.c and abort.h.

What's wrong???

aTdHvAaNnKcSe,

-Urs

dorourke@polyslo.CalPoly.EDU (David M. O'Rourke) (02/23/89)

I'm not an expert, but in your variable declairations you have....
dir1:dir2:<filename>

this won't work because since there is no leading : on dir1 MPW thinks it's
a volume identifier rather than a directory ID.  Two possible solutions
exists.

prefix the first directory with a : so that MPW will search for the first
dir in the current directory {much like ./ in unix}, or give a full path
name to the dir such as {MPW}<dir1>:<dir2>:<filename>.

I hope this helps.
-- 
David M. O'Rourke                                  dorourke@polyslo.calpoly.edu

        It's only 1's & 0's, so how difficult can Computer Science be?
===============================================================================