#sccs	"@(#)appsmain:Makefile	1.11"

include $(MAKEINC)/Makepre.h

UNITS = \
	UNITadmin_bin=adminbin \
	UNITadmin_lib=adminlib \
	UNITfont=appfont \
	UNITinst=install \
	UNITmisc=misc \
	UNITphconvert=phconvert \
	UNITpractice=practice \
	UNITshform=shform \
	UNITsmgr=smgr \
	UNITsprint=sprint \
	UNITtutor=tutor \
	UNITua=ua \
	UNITuahelp=uahelp \
	UNITwmgr=wmgr

POPDIRS = practice

SUBDIRS = ua \
	admin_bin \
	admin_lib \
	font \
	inst \
	misc \
	phconvert \
	practice \
	shform \
	smgr \
	sprint \
	tutor \
	uahelp \
	wmgr

all: comall

clean: comclean

clobber: comclobber

install: cominstall

includes: comincludes

populate: $(SUBDIRS)
	rm -f font/*_ admin_lib/*_
	for D in $(SUBDIRS); \
	do (cd $$D; echo "** $$D **:"; getunit); \
	done
	for D in $(POPDIRS); \
	do (cd $$D; echo "** $$D **:"; $(MAKE) populate); \
	done
	cd font; aget -k *_
	cd admin_lib; aget -k *_

$(SUBDIRS):
	@$(UNITS) ;echo "Making Directory for $@"; mkdir $@; echo $$UNIT$@ > $@/.unit

include $(MAKEINC)/Makepost.h
