/**/#
/**/# iv - root of the InterViews directory tree
/**/# 
/**/# "make bootstrap" installs executables needed by "make World".
/**/# "make World" builds InterViews for the first time.
/**/# "make install" installs the binaries and libraries relative to $(TOP).
/**/# "make install.config" installs the config files into /usr.
/**/# "make install.include" installs the include files relative to $(TOP).
/**/# "make install.man" installs the man pages into /usr.
/**/# "make format" formats the InterViews manual.
/**/# "make print" formats and sends the InterViews manual to the printer.
/**/# "make clean" removes the current platform's binaries and libraries.
/**/#

#define IHaveSubdirs
#define OverrideMakefileSubdirs

SUBDIRS	= src

MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
install:: createdirs
InstallConfigSubdirs(config)
InstallIncludeSubdirs($(SUBDIRS))
InstallManSubdirs(man)
FormatSubdirs(man)
PrintSubdirs(man)
BuildMakefilesSubdirs(config,-f $$i/Imake.file)
MakefileSubdirs(man $(SUBDIRS))
#if CompileInMachineDepSubdir
clean_maybe:: /* don't clean */
#else
clean_maybe:: clean
#endif

/**/#
/**/# Bootstrap executables that must be installed before InterViews
/**/# can be built.
/**/#

bootstrap::
	@echo "##############################################################"
	@echo "Did you remember to check the configuration parameters in the"
	@echo "the directory config/InterViews and set BOOTSTRAPCFLAGS?"
	@echo "##############################################################"
	@echo ""
	@CPU=`$(BOOTSTRAPCPUCMD)` $(MAKE) createdirs

BootstrapSubdirs($(SUBDIRS))

bootstrap::
	@echo ""
	@echo "##############################################################"
	@echo "Extend your PATH if necessary and put CPU in your environment"
	@echo "before continuing with the rest of the build process."
	@echo "##############################################################"

/**/#
/**/# Build InterViews for the first time.  Warning: clean removes
/**/# make.log and make.out.
/**/#

WORLDOPTS = -k

World::
	@echo ""
	@echo "Building InterViews 2.5"
	@echo ""
	@echo "##############################################################"
	@echo "Did you remember to extend your PATH to include imake et al"
	@echo "and put CPU in your environment?"
	@echo "##############################################################"
	@echo ""
	@date
	@echo ""
	@$(MAKE) Makefile
	@$(MAKE) Makefiles
	@$(MAKE) clean_maybe
	@$(MAKE) depend
	@$(MAKE) $(WORLDOPTS)
	@echo ""
	@date
	@echo ""
	@echo "Build of InterViews 2.5 complete."
	@echo ""

/**/# 
/**/# Create the directories in which to install files if necessary.
/**/# 

DIRS_TO_CREATE = \
	$(USRLIBDIR) \
	$(BINDIR) \
	$(LOCALBINDIR)

MakeDirectories(createdirs,$(DIRS_TO_CREATE))
