From: Norman Walsh Date: Fri, 30 May 2008 16:57:21 +0000 (+0000) Subject: More build artifacts X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38ea3bda8f54dd345be70e40093803ece88458fc;p=docbook-dsssl More build artifacts --- diff --git a/docbook/relaxng/publishers/Makefile b/docbook/relaxng/publishers/Makefile new file mode 100644 index 000000000..39ab7a9ba --- /dev/null +++ b/docbook/relaxng/publishers/Makefile @@ -0,0 +1,45 @@ +# 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 diff --git a/docbook/relaxng/publishers/_footer.mak b/docbook/relaxng/publishers/_footer.mak new file mode 100644 index 000000000..f985b8944 --- /dev/null +++ b/docbook/relaxng/publishers/_footer.mak @@ -0,0 +1,42 @@ +# -*- 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) diff --git a/docbook/relaxng/publishers/_header.mak b/docbook/relaxng/publishers/_header.mak new file mode 100644 index 000000000..9ec1b64a6 --- /dev/null +++ b/docbook/relaxng/publishers/_header.mak @@ -0,0 +1,12 @@ +# -*- 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