# $Id: Makefile 283 2004-01-02 12:01:49Z hvr $
#
# quick'n'dirty Makefile 
#
# note for merging documentation into kernel source tree:
#   prism54.tmpl is the only file from this folder that needs to be
#   copied into Documentation/DocBook/; Then only a reference needs 
#   to be added to Documentation/DocBook/Makefile for prism54.tmpl and
#   everything should be set
#
# (c) 2004  hvr

.PHONY: clean help all

help:
	@echo "available make targets:"
	@echo "  clean help all"
	@echo "  prism54.sgml prism54.html prism54.txt prism54.ps prism54.pdf"

clean:
	rm -rfv _prism54.tmpl prism54.sgml prism54.txt prism54.html prism54.pdf prism54.ps docproc

all: prism54.sgml prism54.html prism54.txt prism54.ps prism54.pdf

prism54.sgml: prism54.tmpl docproc kernel-doc
	@# alternative hack:
	@#sed 's,\(![DEFI]\)drivers/net/wireless/prism54/,\1../ksrc/,' $< > _prism54.tmpl
	mkdir -p drivers/net/wireless/
	ln -s ../../../../ksrc drivers/net/wireless/prism54
	./docproc doc prism54.tmpl > $@
	rm -rf drivers

%.txt: %.sgml
	docbook2txt $< -o $(dir $@)

%.ps: %.sgml
	db2ps $< -o $(dir $@)

%.pdf: %.sgml
	db2pdf $< -o $(dir $@)

%.html: %.sgml
	@#db2html bug workaround
	@-rm -rfv $(patsubst %.sgml, %, $<)
	db2html -u -o $(dir $@) $<
	@-rm -rfv $(patsubst %.sgml, %, $<)

