--- /dev/null
+# Inspired by "Recursive Make: Reloaded" in the July, 2005 issue
+# of Linux Magazine, I've reworked the Makfiles so that they're no
+# longer recursive.
+
+# Fair warning, this is a bit more complex than is maybe ideal, but it
+# works and it isn't recursive. I still need to get the documentation
+# build into the new system.
+
+include ../../../buildtools/Makefile.incl
+
+XSLTPROC=xsltproc
+PERL=perl
+MV ?= mv
+
+CLASS=wd
+VERSION=5.0b4
+SPECNAME=$(CLASS)-docbook-docbook-$(VERSION)
+
+TOOLS=../tools
+AUGMENT=$(TOOLS)/augment.xsl
+INCLUDE=$(TOOLS)/include.xsl
+CLEANUP=$(TOOLS)/cleanup.pl
+
+.PHONY: all
+
+all::
+_OUTTOP ?= .
+_OUTTOP := $(_OUTTOP)/build
+
+DISTRIB=$(_OUTTOP)/docbook-$(VERSION)
+
+.PHONY: clean
+
+clean:: ; rm -rf $(_OUTTOP)
+
+.SUFFIXES:
+
+MODULES=publishers
+
+include $(addsuffix /Makefile,$(MODULES))
+
+.PHONY: tests
+
+distrib:
+ echo not working yet
--- /dev/null
+# -*- Makefile -*-
+
+$(_MODULE)_OBJS := $(addsuffix .rng,$(addprefix $($(_MODULE)_OUTPUT)/,$(basename $(SRCS))))
+
+$(_MODULE)_BINARY := $($(_MODULE)_OUTPUT)/$(BINARY)
+
+.PRECIOUS: $($(_MODULE)_OBJS)
+
+$($(_MODULE)_OUTPUT)/%.rng: $(_MODULE)/%.rnc $($(_MODULE)_OUTPUT)/.f
+ $(RUNTRANG) $< $@
+
+$($(_MODULE)_OUTPUT)/%.rnx: $($(_MODULE)_OBJS) $($(_MODULE)_OUTPUT)/.f $(INCLUDE) $(AUGMENT) $(CLEANUP)
+ $(XSLT) $< $(INCLUDE) $@, use.extensions=1
+ $(XSLT) $@, $(AUGMENT) $@ use.extensions=1
+ $(PERL) $(CLEANUP) $@ > $@,
+ $(MV) $@, $@
+
+#$($(_MODULE)_OUTPUT)/%.rng: $(_MODULE)/%.rnc $($(_MODULE)_OUTPUT)/.f
+# $(RUNTRANG) $< $@
+#
+#$($(_MODULE)_OUTPUT)/%.rng: $($(_MODULE)_OBJS) $($(_MODULE)_OUTPUT)/.f
+# @echo build $< $@
+# $(XSLT) $< $(INCLUDE) $@, use.extensions=1
+# $(XSLT) $@, $(AUGMENT) $@ use.extensions=1
+# $(PERL) -i $(CLEANUP) $@
+# $(RM) $@,
+
+#$($(_MODULE)_OUTPUT)/%.rnx: $($(_MODULE)_OUTPUT)/%.rne
+# $(XSLT) $< $(INCLUDE) $@, use.extensions=1
+# $(XSLT) $@, $(AUGMENT) $@ use.extensions=1
+# $(PERL) -i $(CLEANUP) $@
+# $(RM) $@,
+
+$($(_MODULE)_OUTPUT)/%.rnd: $($(_MODULE)_OUTPUT)/%.rnx $(TOOLS)/rngdocxml.xsl
+ $(XSLTPROC) -output $@ $(TOOLS)/rngdocxml.xsl $<
+
+$($(_MODULE)_OUTPUT)/%.dtx: $($(_MODULE)_OUTPUT)/%.rnd $(TOOLS)/doc2dtd.xsl
+ $(XSLTPROC) -output $@ $(TOOLS)/doc2dtd.xsl $<
+
+all:: $($(_MODULE)_BINARY)
+
+$(_MODULE): $($(_MODULE)_BINARY)
--- /dev/null
+# -*- Makefile -*-
+
+_MAKEFILES := $(filter-out _header.mak _footer.mak,$(MAKEFILE_LIST))
+
+_MODULE := $(patsubst %/,%,$(dir $(word $(words $(_MAKEFILES)),$(_MAKEFILES))))
+
+$(_MODULE)_OUTPUT := $(_OUTTOP)/$(_MODULE)
+
+$($(_MODULE)_OUTPUT)/.f:
+ @if !([ -e $@ ]); then \
+ ( mkdir -p $(patsubst %/.f,%,$@) ; \
+ touch $@ ); fi