/* ***********************************************************************
Copyright IBM Corporation 1988, 1991 - All Rights Reserved
Copyright Carnegie Mellon University 1991, 1992  - All Rights Reserved
*********************************************************************** */
/*
	$Disclaimer: This software is part of version 7.2 of the 
* Andrew User Interface System and is the 
* property of IBM, Carnegie Mellon University, 
* and the other copyright holders.  The source 
* code of this version is for the sole use of 
* members of the Andrew Consortium with 
* memberships extending into calendar year 
* 1994.  This source code is not to be distributed 
* to non-members of the consortium nor beyond 
* a fifty-mile radius from the membership address.  
* Binary object code compiled or derived from 
* these sources is not to be distributed to non-
* members.  Members may have additional 
* distribution rights granted by prior written 
* permission of Carnegie Mellon University.
* 
* IBM, CARNEGIE MELLON UNIVERSITY, 
* AND THE OTHER COPYRIGHT HOLDERS
*  DISCLAIM ALL WARRANTIES WITH 
* REGARD TO THIS SOFTWARE, INCLUDING 
* ALL IMPLIED WARRANTIES OF MERCHANT-
* ABILITY AND FITNESS. IN 
* NO EVENT SHALL  IBM, CARNEGIE 
* MELLON UNIVERSITY, OR ANY OTHER 
* COPYRIGHT HOLDER BE LIABLE FOR 
* ANY SPECIAL, INDIRECT OR CONSE-
* QUENTIAL 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

#if defined(hpux) || defined(_IBMR2)
OSSUPPORT = ossupport
#endif /* hpux || _IBMR2*/

#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 */

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

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

#if defined(MEGARUNAPP_ENV)
MEGA = megarunapp
#endif

DIRS = $(DESTDIR)  \
	$(DESTDIR)/bin \
	$(DESTDIR)/config \
	$(DESTDIR)/etc \
	$(DESTDIR)/include \
	$(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) $(MEGA) $(MKFONTDIR) $(HELP) doc

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

/* define dependInstallCramped which does dependInstall and then Clean to each subdir */
Cramped()

MkdirTarget($(DIRS))

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

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

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