# $Copyright:	$
# Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989 
# Sequent Computer Systems, Inc.   All rights reserved.
#  
# This software is furnished under a license and may be used
# only in accordance with the terms of that license and with the
# inclusion of the above copyright notice.   This software may not
# be provided or otherwise made available to, or used by, any
# other person.  No title to or ownership of the software is
# hereby transferred.

# $Header: Makefile 2.5 89/09/29 $
#
# Build prototype filesystem prior to an entire build
#

all		: proto
proto		: proto.sh
		  sh -c 'if [ ! -d ../../$(MACHINE) ]; then \
			umask 022 && mkdir ../../$(MACHINE); \
		  fi; exit 0'
		  sh -c 'if [ "$(DISK)" != "" ]; then \
			/etc/umount /dev/$(DISK)h; \
			/etc/umount /dev/$(DISK)a; \
		  fi; exit 0'
		  cd ../.. && rm -rf \
			$(MACHINE)/tmpos 		\
			$(MACHINE)/tmpos_att 		\
			$(MACHINE)/tmpos_att_crypt 	\
			$(MACHINE)/tmpos_crypt 		\
			$(MACHINE)/tmpos_mirror		\
			$(MACHINE)/tmpos_mfg  &&	\
		  PWD=`/bin/pwd` && \
		  sh -c 'if [ "$(DISK)" != "" ]; then \
			/etc/newfs /dev/r$(DISK)a $(DISKTYPE); \
			/etc/fsck /dev/r$(DISK)a; \
			mkdir $(MACHINE)/tmpos; \
			/etc/mount /dev/$(DISK)a '$$PWD'/$(MACHINE)/tmpos; \
			/etc/newfs /dev/r$(DISK)h $(DISKTYPE); \
			/etc/fsck /dev/r$(DISK)h; \
			mkdir $(MACHINE)/tmpos/usr; \
			/etc/mount /dev/$(DISK)h '$$PWD'/$(MACHINE)/tmpos/usr; \
		  fi; exit 0'; \
		  cd $(MACHINE) && \
	  	    sh ../src/dist/proto.sh
clean install	:
