head     1.25;
access   ;
symbols  beta_13_0:1.19 beta_12_0:1.19 beta_11_0:1.19 beta_10_0:1.19 beta_9_0:1.19 bate_8_0:1.18 beta_8_0:1.18 beta_7_0:1.17 beta_6_0:1.17 beta_5_0:1.17 beta_4_0:1.17 beta_3_0:1.12 beta_2_0:1.10 beta_1_0:1.9 alpha_5_0:1.5 alpha_4_0:1.2 alpha_3_0:1.2 alpha_2_0:1.2 alpha_1_0:1.1;
locks    ; strict;
comment  @# @;


1.25
date     88.09.06.10.40.01;  author root;  state Exp;
branches ;
next     1.24;

1.24
date     88.07.21.23.56.40;  author rpd;  state Exp;
branches ;
next     1.23;

1.23
date     88.06.30.23.47.41;  author rpd;  state Exp;
branches ;
next     1.22;

1.22
date     88.06.30.23.04.48;  author rpd;  state Exp;
branches ;
next     1.21;

1.21
date     88.06.16.12.38.15;  author rpd;  state Exp;
branches ;
next     1.20;

1.20
date     88.04.17.14.33.41;  author rpd;  state Exp;
branches ;
next     1.19;

1.19
date     87.10.09.11.48.51;  author rpd;  state Exp;
branches ;
next     1.18;

1.18
date     87.09.03.20.53.26;  author rpd;  state Exp;
branches ;
next     1.17;

1.17
date     87.06.27.03.00.27;  author rpd;  state Exp;
branches ;
next     1.16;

1.16
date     87.06.18.00.32.04;  author rpd;  state Exp;
branches ;
next     1.15;

1.15
date     87.06.13.12.55.44;  author rpd;  state Exp;
branches ;
next     1.14;

1.14
date     87.06.13.01.08.25;  author rpd;  state Exp;
branches ;
next     1.13;

1.13
date     87.06.11.01.51.00;  author rpd;  state Exp;
branches ;
next     1.12;

1.12
date     87.05.27.01.13.11;  author rpd;  state Exp;
branches ;
next     1.11;

1.11
date     87.05.22.14.07.57;  author rpd;  state Exp;
branches ;
next     1.10;

1.10
date     87.04.11.19.03.40;  author rpd;  state Exp;
branches ;
next     1.9;

1.9
date     87.04.02.17.50.42;  author rpd;  state Exp;
branches ;
next     1.8;

1.8
date     87.04.02.13.40.20;  author rpd;  state Exp;
branches ;
next     1.7;

1.7
date     87.04.01.15.03.19;  author rpd;  state Exp;
branches ;
next     1.6;

1.6
date     87.03.31.22.10.48;  author rpd;  state Exp;
branches ;
next     1.5;

1.5
date     87.03.13.16.05.06;  author rpd;  state Exp;
branches ;
next     1.4;

1.4
date     87.03.13.01.46.33;  author rpd;  state Exp;
branches ;
next     1.3;

1.3
date     87.03.12.18.03.19;  author rpd;  state Exp;
branches ;
next     1.2;

1.2
date     87.01.19.21.26.41;  author rpd;  state Exp;
branches ;
next     1.1;

1.1
date     87.01.15.23.01.23;  author rpd;  state Exp;
branches ;
next     ;


desc
@@


1.25
log
@Took out toolbox version stuff
@
text
@#
# Copyright 1987 Apple Computer, Inc.
# $Header: makefile,v 1.24 88/07/21 23:56:40 rpd Exp $
#
# $Log:	makefile,v $
# Revision 1.24  88/07/21  23:56:40  rpd
# make install was not cleaning up /tmp/tb
# 
# Revision 1.23  88/06/30  23:47:41  rpd
# Fixed boo boo in make install
# 
# Revision 1.22  88/06/30  23:04:48  rpd
# Fixed up make install for the build.
# 
# Revision 1.21  88/06/16  12:38:15  rpd
# Redid the installation procedure to fit into Malcolm's stuff better.
# 
# Revision 1.20  88/04/17  14:33:41  rpd
# Added SYSFOLDER variable.
# 
# Revision 1.19  87/10/09  11:48:51  rpd
# Now, make install creates toolbox.version
# 
# Revision 1.18  87/09/03  20:53:26  rpd
# Now, make install only creates one cpio archive.
# 
# Revision 1.17  87/06/27  03:00:27  rpd
# Removed /usr/bin from list of directories to create in make install.
# This was only needed for screenrestore which died long ago.
# 
# Revision 1.16  87/06/18  00:32:04  rpd
# Added text directory
# 
# Revision 1.15  87/06/13  12:55:44  rpd
# Added some useful comments
# 
# Revision 1.14  87/06/13  01:08:25  rpd
# Added launch directory
# Added kludge to rm tl after everything get dones.  This leaves two links
# of tl; one for rez and one for derez.  Eventually, these will actually be
# links to launch and tl will be out of business.
# 
# Revision 1.13  87/06/11  01:51:00  rpd
# Added /usr/lib/mac/examples/term to list of directories to install
# 
# Revision 1.12  87/05/27  01:13:11  rpd
# in make install, moved *.h into tb2.cpio so both will fit on floppies
# 
# Revision 1.11  87/05/22  14:07:57  rpd
# Added /usr/lib/mac/examples
# 
# Revision 1.10  87/04/11  19:03:40  rpd
# Beefed up make install.  Now it creates seperate cpio files to be placed
# on different floppies.
# 
# Revision 1.9  87/04/02  17:50:42  rpd
# Killed install of /usr/local and /usr/local/bin
# Added /usr/bin and /usr/toolboxbin
# 
# Revision 1.8  87/04/02  13:40:20  rpd
# Added nasty hack to builing or libmac.a so that we can circumven some
# of the bugs in ar and ld.
# 
# Revision 1.7  87/04/01  15:03:19  rpd
# Added etc to make install
# 
# Revision 1.6  87/03/31  22:10:48  rpd
# Added /usr/local/bin to make install
# 
# Revision 1.5  87/03/13  16:05:06  rpd
# Fixed permissions on created directories
# 
# Revision 1.4  87/03/13  01:46:33  rpd
# Added data directory
# Moved installation of uinter0 into data
# Pulled low.o out of list of files to stuff into libmac.a
# Moved libmac.a from /usr/lib/mac into /usr/lib
# 
# Revision 1.3  87/03/12  18:03:19  rpd
# Added inc to list of directories
# Removed make cpio
# Added make install
# 
# Revision 1.2  87/01/19  21:26:41  rpd
# added MAIN_DIR
# 
# Revision 1.1  87/01/15  23:01:23  rpd
# Initial revision
# 

# This is the top level makefile for the UNIX toolbox software.

# To clean out all object code, etc., use "make clean"
# To rebuild everything, use "make all" or just "make"
# To run some simple tests, use "make test"
# To do an installation, use "make install".  This will leave a cpio archive
#	in /tmp with a name begining with "toolbox."

# There are also three entries used by the global build procedure:

# "make pass1" will install all directories, include, text, and data files.
#	This pass does not depend on any external files.
# "make pass2" will build and install libmac.a and /usr/lib/maccrt0.o
#	This pass depends on various include files, but it does not depend
#	on any object files.
# "make pass3" will build and install all executables.
#	This pass depends on things like libc.a, libat.a, /usr/lib/maccrt0.o
#	and /usr/lib/low.ld

# ***NOTE:***
# This package is one of those annoying software packages that must be
# installed before it can be recompiled.  This is because the rez utility
# is used to compile resource files.  Someday this may change, but
# don't count on it.

MAIN_DIR =	.
include make.global

PASS1 =		tools inc text data
PASS2 =		wrappers lib
PASS3 =		launch tests misc
DIRS =		${PASS1} ${PASS2} ${PASS3}
INS_DIR =	/tmp

all:
	for i in ${DIRS}; do \
	    cd $$i; \
	    make all; \
	    cd ..; \
	done

clean:
	for i in ${DIRS}; do \
	    cd $$i; \
	    make clean; \
	    cd ..; \
	done

test:
	for i in ${DIRS}; do \
	    cd $$i; \
	    make test; \
	    cd ..; \
	done

install:	pass1 pass2 pass3
	cd ${INS_DIR}/tb; \
	find . ! -type d -print | cpio -o > ${INS_DIR}/toolbox.cpio;
	rm -rf ${INS_DIR}/tb

pass1:
	for i in ${PASS1}; do \
	    cd $$i; \
	    make all; \
	    cd ..; \
	done
	rm -rf ${INS_DIR}/tb
	mkdir ${INS_DIR}/tb
	${INSTALL} -t d -p 0755 etc usr usr/toolboxbin usr/lib \
		${SYSFOLDER} ${SYSFOLDER}/examples ${SYSFOLDER}/examples/term \
		${SYSFOLDER}/rincludes usr/include usr/include/mac \
		${INS_DIR}/tb
	for i in ${PASS1}; do \
	    cd $$i; \
	    make install DESTPATH=${INS_DIR}/tb; \
	    cd ..; \
	done

pass2:
	for i in ${PASS2}; do \
	    cd $$i; \
	    make all; \
	    cd ..; \
	done
	for i in ${PASS2}; do \
	    cd $$i; \
	    make install DESTPATH=${INS_DIR}/tb; \
	    cd ..; \
	done
	rm -rf tmp
	mkdir tmp
	cd tmp; \
	ar x ../lib/shared.a; \
	ar x ../wrappers/wrappers.a; \
	ar cr libmac.a *; \
	ar d libmac.a mpwlib.o; \
	ar r libmac.a mpwlib.o; \
	mv libmac.a ..
	${INSTALL} libmac.a ${INS_DIR}/tb/usr/lib;
	rm -rf libmac.a tmp

pass3:
	for i in ${PASS3}; do \
	    cd $$i; \
	    make all; \
	    cd ..; \
	done
	for i in ${PASS3}; do \
	    cd $$i; \
	    make install DESTPATH=${INS_DIR}/tb; \
	    cd ..; \
	done

@


1.24
log
@make install was not cleaning up /tmp/tb
@
text
@d3 1
a3 1
# $Header: makefile,v 1.23 88/06/30 23:47:41 rpd Exp $
d6 3
d148 1
a148 1
	find . ! -type d -print | cpio -o > ${INS_DIR}/toolbox.${VERSION};
@


1.23
log
@Fixed boo boo in make install
@
text
@d3 1
a3 1
# $Header: makefile,v 1.22 88/06/30 23:04:48 rpd Exp $
d6 3
d120 1
a120 2
DEST =		/tmp
INS_DIR =	${DEST}
d146 1
@


1.22
log
@Fixed up make install for the build.
@
text
@d3 1
a3 1
# $Header: makefile,v 1.21 88/06/16 12:38:15 rpd Exp $
d6 3
a196 1
	rm -rf ${INS_DIR}/tb
@


1.21
log
@Redid the installation procedure to fit into Malcolm's stuff better.
@
text
@d3 1
a3 1
# $Header: makefile,v 1.20 88/04/17 14:33:41 rpd Exp $
d6 3
d90 1
a90 1
# There are also two entries used by the global build procedure:
a115 2
# Set this to true to install like Malcolm, false to install like Rick
MALCOLM =	false
d139 2
a158 5
	if ${MALCOLM}; then \
	    cd ${INS_DIR}/tb; \
	    find . ! -type d -print | cpio -pmud ${INS_DIR}; \
	    find . ! -type d -print | xargs rm -f; \
	fi
d171 1
a181 5
	if ${MALCOLM}; then \
	    cd ${INS_DIR}/tb; \
	    find . ! -type d -print | cpio -pmud ${INS_DIR}; \
	    find . ! -type d -print | xargs rm -f; \
	fi
a193 7
	if ${MALCOLM}; then \
	    cd ${INS_DIR}/tb; \
	    find . ! -type d -print | cpio -pmud ${INS_DIR}; \
	else \
	    cd ${INS_DIR}/tb; \
	    find . ! -type d -print | cpio -o > ${INS_DIR}/toolbox.${VERSION}; \
	fi
@


1.20
log
@Added SYSFOLDER variable.
@
text
@d3 1
a3 1
# $Header: makefile,v 1.19 87/10/09 11:48:51 rpd Exp $
d6 3
d87 11
d100 2
a101 1
# installed before it can be recompiled.  Someday this may change, but
d107 8
a114 2
DIRS =	tools wrappers lib launch tests misc inc text data
INS_DIR =	/tmp
d137 9
a145 1
install:
d149 1
a149 1
		${SYSFOLDER}/rincludes usr/include usr/include/mac dev \
d151 1
a151 1
	for i in ${DIRS}; do \
d156 17
a172 1
	rm ${INS_DIR}/tb/usr/toolboxbin/tl
d183 25
a207 4
	cd ${INS_DIR}/tb; \
	find . ! -type d -print | cpio -o > ${INS_DIR}/toolbox.${VERSION}; \
	cd ${INS_DIR}; \
	rm -rf tb
@


1.19
log
@Now, make install creates toolbox.version
@
text
@d3 1
a3 1
# $Header: makefile,v 1.18 87/09/03 20:53:26 rpd Exp $
d6 3
d119 2
a120 2
		usr/lib/mac usr/lib/mac/examples usr/lib/mac/examples/term \
		/usr/lib/mac/rincludes usr/include usr/include/mac dev \
@


1.18
log
@Now, make install only creates one cpio archive.
@
text
@d3 1
a3 1
# $Header: makefile,v 1.17 87/06/27 03:00:27 rpd Exp $
d6 3
d78 2
a79 3
# To do an installation, use "make install".  This will leave two files in
#	/tmp.  tb1.cpio and tb2.cpio are floppy sized cpio archives that
#	can be cpio'd onto the root directory of a target system.
d136 1
a136 1
	find . ! -type d -print | cpio -o > ${INS_DIR}/toolbox.cpio; \
@


1.17
log
@Removed /usr/bin from list of directories to create in make install.
This was only needed for screenrestore which died long ago.
@
text
@d3 1
a3 1
# $Header: makefile,v 1.16 87/06/18 00:32:04 rpd Exp $
d6 4
d134 1
a134 4
	find . ! -type d ! \( -name "*.res" -o -name "*.[ha]" \) -print | \
		cpio -o > ${INS_DIR}/tb1.cpio; \
	find . ! -type d \( -name "*.res" -o -name "*.[ha]" \) -print | \
		cpio -o > ${INS_DIR}/tb2.cpio; \
@


1.16
log
@Added text directory
@
text
@d3 1
a3 1
# $Header: makefile,v 1.15 87/06/13 12:55:44 rpd Exp $
d6 3
d109 1
a109 1
	${INSTALL} -t d -p 0755 etc usr usr/bin usr/toolboxbin usr/lib \
d111 2
a112 2
		/usr/lib/mac/rincludes \
		usr/include usr/include/mac dev ${INS_DIR}/tb
@


1.15
log
@Added some useful comments
@
text
@d3 1
a3 1
# $Header: makefile,v 1.14 87/06/13 01:08:25 rpd Exp $
d6 3
d80 1
a80 1
DIRS =	tools wrappers lib launch tests misc inc data
@


1.14
log
@Added launch directory
Added kludge to rm tl after everything get dones.  This leaves two links
of tl; one for rez and one for derez.  Eventually, these will actually be
links to launch and tl will be out of business.
@
text
@d3 1
a3 1
# $Header: makefile,v 1.13 87/06/11 01:51:00 rpd Exp $
d6 6
d61 12
@


1.13
log
@Added /usr/lib/mac/examples/term to list of directories to install
@
text
@d3 1
a3 1
# $Header: makefile,v 1.12 87/05/27 01:13:11 rpd Exp $
d6 3
d59 1
a59 1
DIRS =	tools wrappers lib tests misc inc data
d87 1
d94 1
@


1.12
log
@in make install, moved *.h into tb2.cpio so both will fit on floppies
@
text
@d3 1
a3 1
# $Header: makefile,v 1.11 87/05/22 14:07:57 rpd Exp $
d6 3
d83 2
a84 2
		usr/lib/mac usr/lib/mac/examples usr/include \
		usr/include/mac dev ${INS_DIR}/tb
@


1.11
log
@Added /usr/lib/mac/examples
@
text
@d3 1
a3 1
# $Header: makefile,v 1.10 87/04/11 19:03:40 rpd Exp $
d6 3
d98 1
a98 1
	find . ! -type d ! \( -name "*.res" -o -name "*.a" \) -print | \
d100 1
a100 1
	find . ! -type d \( -name "*.res" -o -name "*.a" \) -print | \
@


1.10
log
@Beefed up make install.  Now it creates seperate cpio files to be placed
on different floppies.
@
text
@d3 1
a3 1
# $Header: makefile,v 1.9 87/04/02 17:50:42 rpd Exp $
d6 4
d77 2
a78 1
		usr/lib/mac usr/include usr/include/mac dev ${INS_DIR}/tb
@


1.9
log
@Killed install of /usr/local and /usr/local/bin
Added /usr/bin and /usr/toolboxbin
@
text
@d3 1
a3 1
# $Header: makefile,v 1.8 87/04/02 13:40:20 rpd Exp $
d6 4
d47 1
d71 1
a71 4
	@@if test "${DESTPATH}" = ""; then \
	    echo "Must specify DESTPATH for make install"; \
	    exit 1; \
	fi
d73 1
a73 1
		usr/lib/mac usr/include usr/include/mac dev ${DESTPATH}
d76 1
a76 1
	    make install DESTPATH=${DESTPATH}; \
d79 1
a79 1
	mkdir tmp; \
d86 2
a87 3
	mv libmac.a ..; \
	cd ..; \
	${INSTALL} libmac.a ${DESTPATH}/usr/lib; \
d89 7
@


1.8
log
@Added nasty hack to builing or libmac.a so that we can circumven some
of the bugs in ar and ld.
@
text
@d3 1
a3 1
# $Header: makefile,v 1.7 87/04/01 15:03:19 rpd Exp $
d6 4
d70 1
a70 1
	${INSTALL} -t d -p 0755 etc usr usr/local usr/local/bin usr/lib \
@


1.7
log
@Added etc to make install
@
text
@d3 1
a3 1
# $Header: makefile,v 1.6 87/03/31 22:10:48 rpd Exp $
d6 3
d78 2
@


1.6
log
@Added /usr/local/bin to make install
@
text
@d3 1
a3 1
# $Header: makefile,v 1.5 87/03/13 16:05:06 rpd Exp $
d6 3
d63 1
a63 1
	${INSTALL} -t d -p 0755 usr usr/local usr/local/bin usr/lib \
@


1.5
log
@Fixed permissions on created directories
@
text
@d3 1
a3 1
# $Header: makefile,v 1.4 87/03/13 01:46:33 rpd Exp $
d6 3
d60 2
a61 2
	${INSTALL} -t d -p 0755 usr usr/lib usr/lib/mac usr/include usr/include/mac \
		dev ${DESTPATH}
@


1.4
log
@Added data directory
Moved installation of uinter0 into data
Pulled low.o out of list of files to stuff into libmac.a
Moved libmac.a from /usr/lib/mac into /usr/lib
@
text
@d3 1
a3 1
# $Header: makefile,v 1.3 87/03/12 18:03:19 rpd Exp $
d6 6
d57 1
a57 1
	${INSTALL} -t d usr usr/lib usr/lib/mac usr/include usr/include/mac \
@


1.3
log
@Added inc to list of directories
Removed make cpio
Added make install
@
text
@d3 1
a3 1
# $Header: makefile,v 1.2 87/01/19 21:26:41 rpd Exp $
d6 5
d23 1
a23 1
DIRS =	tools wrappers lib tests misc inc
a52 1
	${INSTALL} -perm 666 -t c 63 0 uinter0 ${DESTPATH}/dev
a61 1
	cp ../tools/low/low.o .; \
d65 1
a65 1
	${INSTALL} libmac.a ${DESTPATH}/usr/lib/mac; \
@


1.2
log
@added MAIN_DIR
@
text
@d3 1
a3 1
# $Header: makefile,v 1.1 87/01/15 23:01:23 rpd Exp $
d6 3
d18 1
a18 1
DIRS =	tools wrappers lib tests misc
d41 23
a63 4
CPIO =		-name "*.[chwsr]" -o -name makefile -o -name low.ld \
		-o -name "*.res"
cpio:
		find . \( ${CPIO} \) -print | cpio -o > cpio
@


1.1
log
@Initial revision
@
text
@d3 1
a3 1
# $Header:$
d5 4
a8 1
# $Log:$
d12 1
@
