#
# |-----------------------------------------------------------|
# | Copyright (c) 1991, 1990 MIPS Computer Systems, Inc.      |
# | All Rights Reserved                                       |
# |-----------------------------------------------------------|
# |          Restricted Rights Legend                         |
# | Use, duplication, or disclosure by the Government is      |
# | subject to restrictions as set forth in                   |
# | subparagraph (c)(1)(ii) of the Rights in Technical        |
# | Data and Computer Software Clause of DFARS 252.227-7013.  |
# |         MIPS Computer Systems, Inc.                       |
# |         950 DeGuigne Avenue                               |
# |         Sunnyvale, California 94088-3650, USA             |
# |-----------------------------------------------------------|
#
# $Header: Makefile,v 1.12.1.1 92/06/24 14:12:22 marker Exp $
#
SHELL	=/bin/sh
SUBDIRS =../bsd_lib/libc/rpc \
	 ../bsd_lib/librpcsvc\
	 ../bsd_lib/libc/des\
	 ../bsd_lib/libc/yp \
	 ../bsd_lib/libcurses \
	 ../lib/libcurses/setup \
	 ../svr4/lib/xlibcurses/setup \
	 ../bsd_cmd/lex \
	 ../bsd_cmd/roff-lib/tmac
#
#  Needed for the installation of the comp.config files from compiler land.
#
CC_SUBDIR=../cmplrs/cc$(CC_RELEASE)/libmisc
SRCDIR	=.
SYS	=SYSV BSD SVR4

all:
	@for dir in $(SUBDIRS) ;\
	{\
		if [ -d "$$dir" ] ;\
		then \
		    echo "installing header files from $$dir ..." ;\
		    (cd $$dir;$(MAKE) $(MAKEARGS) DESTROOT=$(DESTROOT) install-headers) ;\
		else \
			echo "******* No directory $$dir" ;\
		fi ;\
	}

install-comp.config:
	@if [ -d "$(CC_SUBDIR)" ] ;\
	then \
		for sys in $(SYS) ;\
		{\
		    echo "installing comp.config files from $(CC_SUBDIR) ..." ;\
		    if [ "$$sys" = "BSD" ] ;\
		    then \
			TYPE="/bsd43" ; export TYPE ;\
		    elif [ "$$sys" = "SVR4" ] ;\
		    then \
			TYPE="/svr4" ; export TYPE ;\
		    else \
			TYPE="/svr3" ; export TYPE ;\
		    fi ;\
		    (cd $(CC_SUBDIR) ; $(MAKE) $(MAKEARGS) DESTROOT=$(DESTROOT) SRCDIR=$(SRCDIR) SYS=$$sys TYPE=$$TYPE install-headers) ;\
		} \
	else \
		echo "******* No directory $(CC_SUBDIR)" ;\
	fi

install: all install-comp.config

clobber:
	@echo "nothing to do"
