-validate: $(addsuffix .validate,$(SOURCES))
-
-# hmmm, this rule may need to be revised/tested
-publish: all
- [ -d $(PUBLISHDIR) ] || exit 1
- rm -f $(PUBLISHDIR)/$(MANUAL)/*.html
- $(make_directory) $(PUBLISHDIR)/$(MANUAL)
- $(install_file) developers-reference*.html/*.html \
- $(PUBLISHDIR)/$(MANUAL)
-
-developers-reference.html: developers-reference.sgml
- $(DEBIANDOC2HTML) -l en $<
-
-developers-reference.html/*: developers-reference.html
-
-developers-reference.%.html: developers-reference.%.sgml
- $(DEBIANDOC2HTML) -l $* $<
-
-developers-reference.txt: developers-reference.sgml
- $(DEBIANDOC2TEXT) -l en -O $< > $@
-
-developers-reference.%.txt: developers-reference.%.sgml
- $(DEBIANDOC2TEXT) -l $* -O $< > $@
-
-developers-reference.tex: developers-reference.sgml
- $(DEBIANDOC2LATEX) -l en -O $< > $@
-
-developers-reference.%.tex: developers-reference.%.sgml
- $(DEBIANDOC2LATEX) -l $* -O $< > $@
-
-developers-reference.ps: developers-reference.sgml
- $(DEBIANDOC2PS) -l en $<
-
-developers-reference.%.ps: developers-reference.%.sgml
- $(DEBIANDOC2PS) -l $* $<
-
-developers-reference.pdf: developers-reference.sgml
- $(DEBIANDOC2PDF) -l en $<
-
-developers-reference.%.pdf: developers-reference.%.sgml
- $(DEBIANDOC2PDF) -l $* $<
-
-version.ent: debian/changelog
- ./debian/rules $@
-
-%.validate : % version.ent
- nsgmls -wall -gues $<
- touch $@
-
-USERMAP := ../../ddp/CVSROOT/users
-.PHONY: prepare
-prepare: ChangeLog
- cvs ci -m "update for next release" ChangeLog
-
-.PHONY: ChangeLog
-ChangeLog:
- @[ -f CVS/Root -a -f $(USERMAP) ] || \
- ( echo "usermap file '$(USERMAP)' not found" 1>&2; exit 1 )
- cvs2cl -r --usermap $(USERMAP)
+validate: $(SOURCES)
+ $(XL) index.dbk
+
+%/validate: $(addprefix %/,$(SOURCES))
+ cd $(@D) && $(XL) index.dbk
+
+.PHONY: developers-reference.html %/developers-reference.html
+developers-reference.html: $(CURDIR)/index.html
+%/developers-reference.html: $(addprefix %/,index.html)
+ @true
+
+.PRECIOUS: %/index.html
+index.html: $(CURDIR)/developers-reference.html
+%/index.html: $(addprefix %/,$(SOURCES))
+ cd $(@D) && $(XP) $(DBK2HTML) index.dbk
+
+# There must be an easier way than recursive make!
+.PRECIOUS: %.dbk %.ent
+ifndef LINGUA
+%.dbk %.ent: FORCE
+ $(MAKE) $@ LINGUA=`basename $(@D)`
+
+FORCE:
+else
+$(LINGUA)/%.dbk: %.dbk $(patsubst %.dbk,po4a/$(LINGUA)/%.po,%.dbk)
+ $(TRANSLATE) -m $< -p po4a/$(@:.dbk=.po) -l $@
+
+$(LINGUA)/common.ent: common.ent
+ cd $(@D) && ln -sf ../$(@F) .
+endif
+
+developers-reference.txt: $(CURDIR)/developers-reference.txt
+%/developers-reference.txt: $(addprefix %/,$(SOURCES))
+ $(XP) $(DBK2HTML1) $(@D)/index.dbk \
+ | w3m -cols 65 -dump -T text/html > $@
+
+developers-reference.pdf: $(CURDIR)/developers-reference.pdf
+%/developers-reference.pdf: $(addprefix %/,$(SOURCES))
+ TOP=`pwd` && cd $(@D) && $(DBLATEX) index.dbk \
+ && mv index.dbk.pdf $(@F)
+
+.PHONY: pot
+pot: $(patsubst %.dbk,po4a/po/%.pot,$(SOURCES))
+po4a/po/%.pot: %.dbk
+ po4a-gettextize --format docbook --master $< --po $@
+
+ifdef LINGUA
+.PHONY: updatepo
+updatepo: $(patsubst %.dbk,po4a/$(LINGUA)/%.po,$(SOURCES))
+po4a/$(LINGUA)/%.po: %.dbk
+ po4a-updatepo --format docbook --master $< --po $@
+endif
+
+%/version.ent:
+ echo '<!ENTITY version "$(VERSION)">' > $@
+ echo '<!ENTITY pubdate "$(PUBDATE)">' >> $@