#error The Imakefile is broken, please use the plain Makefiles

#if 0

XCOMM
XCOMM Imakefile for XmHTML
XCOMM
XCOMM (C)Copyright 1995-1997 Ripley Software Development
XCOMM All Rights Reserved
XCOMM
XCOMM This file is part of the XmHTML Widget Library.
XCOMM
XCOMM This library is free software; you can redistribute it and/or
XCOMM modify it under the terms of the GNU Library General Public
XCOMM License as published by the Free Software Foundation; either
XCOMM version 2 of the License, or (at your option) any later version.
XCOMM
XCOMM This library is distributed in the hope that it will be useful,
XCOMM but WITHOUT ANY WARRANTY; without even the implied warranty of
XCOMM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
XCOMM Library General Public License for more details.
XCOMM
XCOMM You should have received a copy of the GNU Library General Public
XCOMM License along with this library; if not, write to the Free
XCOMM Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
XCOMM

XCOMM Include the XmHTML configuration file
#include "XmHTML.cf"

XCOMM If you don't want to build the examples, remove it from the SUBDIRS
XCOMM line below. Likewise for the tools directory. If you want to build
XCOMM the XmHTML tutorial examples, add the book directory.

SUBDIRS = lib http examples tools book

XCOMM 
XCOMM No need to change anything below this line
XCOMM

#define IHaveSubdirs YES

#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'

AllTarget(includes)

MakeSubdirs($(SUBDIRS))

XCOMM make depend depends on make includes
depend:: includes
DependSubdirs($(SUBDIRS))

XCOMM
XCOMM Seperate rules for building a dir from the toplevel directory
XCOMM

XCOMM the XmHTML library. Depends on includes.
lib:: includes
NamedMakeSubdirs(lib, src)

XCOMM the http client-side library. Depends on includes
http:: includes
NamedMakeSubdirs(http, http)

XCOMM the examples directory. Depends on includes, libXmHTML and libhttp.
examples:: includes lib http
NamedMakeSubdirs(examples, examples)

XCOMM everything in tools. Depends on includes and libhttp.
tools:: includes http
NamedMakeSubdirs(tools, tools)

XCOMM everything in book. Depends on includes and libXmHTML
book:: includes lib
NamedMakeSubdirs(book, book)

World:
	$(MAKE) Makefiles
	$(MAKE) includes
	$(MAKE) depend
	$(MAKE) lib
	$(MAKE) http
	$(MAKE) examples
	$(MAKE) tools
	$(MAKE) book

XCOMM 
XCOMM Rules for doing make includes. These propagate down the entire
XCOMM source tree.
XCOMM

stamp-includes:
	MakeDir(include/XmHTML)
	touch $@

includes:: stamp-includes

XCOMM
XCOMM Special rules for creating a distribution with the barebone makefiles
XCOMM
#if (ProjectX > 5)
distclean:: 
	@( for dir in $(SUBDIRS) ; do \ @@\
		(set -x ; cd $$dir ; $(MAKE) distclean $(pass_flags) ) ; \	@@\
	done)															@@\
	$(RM) stamp-includes											@@\
	$(RM) -r ./include												@@\
	$(RM) core *.out make.world *.bak *.last *.auto stamp-includes	@@\
	$(CP) Makefile.org Makefile
#else
distclean:: 
	@( for dir in $(SUBDIRS) ; do \
		(set -x ; cd $$dir ; $(MAKE) distclean $(pass_flags) ) ; \
	done)
	$(RM) stamp-includes
	$(RM) -r ./include
	$(RM) core *.out make.world *.bak *.last *.auto stamp-includes
	$(CP) Makefile.org Makefile
#endif

dist:: distclean
	$(LN) . XmHTML-$(ARCHIVE)
	tools/scansrc.sh `pwd`-$(ARCHIVE)/src > docs/sources.desc
	tar cvf - XmHTML-$(ARCHIVE)Concat(/,*) | gzip -c > XmHTML-$(ARCHIVE).tar.gz

#endif
