/* ***********************************************************************
Copyright IBM Corporation 1988, 1991 - All Rights Reserved
Copyright Carnegie Mellon University 1991, 1992  - All Rights Reserved
*********************************************************************** */
/*
	$Disclaimer: 
*Permission to use, copy, modify, and distribute this software and its 
*documentation for any purpose is hereby granted without fee, 
*provided that the above copyright notice appear in all copies and that 
*both that copyright notice, this permission notice, and the following 
*disclaimer appear in supporting documentation, and that the names of 
*IBM, Carnegie Mellon University, and other copyright holders, not be 
*used in advertising or publicity pertaining to distribution of the software 
*without specific, written prior permission.
*
*IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 
*DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
*ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 
*SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 
*BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
*DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
*WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
*ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
*OF THIS SOFTWARE.
* $
*/
#ifdef GNU_ENV
Makefiles:: dummytarget
dummytarget:
	@(test -r $(GCCLIB))|| (echo "GCCLIB is not set properly, please set it in config/site.mcr and re-run imake.";exit 1)
#endif

#define	IHaveSubdirs

OSSUPPORT = ossupport

#ifdef	AMS_ENV
AMS = ams atkams
#endif /* AMS_ENV */

#ifdef X11_ENV
MKFONTDIR = xmkfontd
#endif /* X11_ENV */

#ifdef CONTRIB_ENV
CONTRIB = contrib
#endif /* CONTRIB_ENV */

DOC = doc

#ifdef MK_HELP
HELP = helpindex
#endif /* MK_HELP */

#ifdef SITE_ENV
SITE = site
#endif /* SITE_ENV */

DIRS = $(DESTDIR)  \
	$(DESTDIR)/bin \
	$(DESTDIR)/config \
	$(DESTDIR)/etc \
	$(DESTDIR)/include \
	$(DESTDIR)/build\
	$(DESTDIR)/lib \
	$(DESTDIR)/lib/prs \
	$(DESTDIR)/doc \
	$(DESTDIR)/doc/atk \
	$(DESTDIR)/doc/ams \
	$(DESTDIR)/help \
	$(DESTDIR)/man \
	$(DESTDIR)/dlib \
	$(DESTDIR)/examples

SUBDIRS = $(OSSUPPORT) inst config overhead atk $(AMS) $(CONTRIB) $(SITE) $(MKFONTDIR) $(HELP) $(DOC)

makedirs::
	-chmod +x ./config/mkdirs

depend::
	@echo 'Checking that BASEDIR is not the location of the source files.'
	@sh -c '(if [ "$(BASEDIR)" = "`pwd`" ]; then \
		echo "%% BASEDIR must be different from the location of the source files."; \
		echo "%% Currently, they are both $(BASEDIR) ."; \
		echo "%% This must be fixed before proceeding with installation."; \
		echo "%% (You may wish to move the source files to $(BASEDIR)/src .)"; \
		exit 1; \
	fi; exit 0)'


World::
	@echo
	@echo AUIS_SHORT_COPYRIGHT
	@cat<DISCLAIMER
	date
	make Makefiles
	make dependInstall

World::
	date


MkdirTarget($(DIRS))

#ifdef WM_ENV
DEST_WM = $(DESTDIR)/$(FONTDESTWM)
MkdirTarget($(DEST_WM))
#endif

#ifdef X11_ENV
DEST_X = $(DESTDIR)/$(FONTDESTX)
MkdirTarget($(DEST_X))
#endif

#ifdef OPENWINDOWS_ENV
DEST_OPENWIN = $(DESTDIR)/$(FONTDESTOPENWIN)
MkdirTarget($(DEST_OPENWIN))
#endif
