/*---------------------------------------------------------------------------*/
/* Based on the top Imakefile for the Xmt library, written by David Flanagan */
/* Used with permission                                                      */
/*---------------------------------------------------------------------------*/
/* modified from the X11R5 toplevel Imakefile */
#ifndef UseInstalled
#define UseInstalled       /* always use installed X imake */
#endif
#ifndef XdtBuildTree
#define XdtBuildTree       /* from this Imakefile, always build the tree */
#endif

#include "Xdt.tmpl"

#define IHaveSubdirs
#define PassCDebugFlags

      WORLDOPTS = -k
        SUBDIRS = Xdt

MakeSubdirs($(SUBDIRS))

DependSubdirs($(SUBDIRS))

World::
	@echo ""
	@echo "Building Xdt"
	@echo ""
	@echo "#####################################"
	@echo "# Did you remember to check and set #"
	@echo "# the variables in ./Xdt.tmpl?      #"
	@echo "#####################################"
	@echo ""
	@date
	@echo ""
	-$(RM) Makefile.bak; $(MV) Makefile Makefile.bak
	$(MAKE) $(MFLAGS) -f Makefile.bak Makefile
	$(MAKE) $(MFLAGS) Makefiles
	$(MAKE) $(MFLAGS) clean
	$(MAKE) $(MFLAGS) includes
	$(MAKE) $(MFLAGS) depend
	$(MAKE) $(MFLAGS) $(WORLDOPTS)
	@echo ""
	@date
	@echo ""
	@echo "Full build of Xdt complete."
	@echo ""

Everything::
	@echo ""
	@echo "Rebuilding Xdt"
	@echo ""
	@date
	@echo ""
	-$(RM) Makefile.bak; $(MV) Makefile Makefile.bak
	$(MAKE) $(MFLAGS) -f Makefile.bak Makefile
	$(MAKE) $(MFLAGS) Makefiles
	$(MAKE) $(MFLAGS) includes
	$(MAKE) $(MFLAGS) depend
	$(MAKE) $(MFLAGS) $(WORLDOPTS)
	@echo ""
	@date
	@echo ""
	@echo "Rebuild of Xdt complete."
	@echo ""

/* 
 * target to install Xdt.tmpl in /usr/lib/X11/config
 */
InstallNonExec(Xdt.tmpl, $(IRULESRC))
