#
# GNUsound documentation Makefile.
# Copyright (C) 2003 Pascal Haakmat.
# Licensed under the GNU GPL.
# Absolutely no warranty.
#

LANGUAGES=C
prefix=/usr/local
docrootdir=/usr/share/gnome/help/gnusound
docname=gnusound
xslstylesheet=/usr/share/sgml/docbook/xsl-stylesheets/xhtml/chunk.xsl

clean: 
	for lang in $(LANGUAGES); do \
		cd $$lang && rm -f *.html; \
	done

distclean: clean
	for lang in $(LANGUAGES); do \
		cd $$lang && rm -f *~; \
	done
	rm -f *~ Makefile

uninstall:
	rm -rf $(docrootdir)

install:
	for lang in $(LANGUAGES); do \
		mkdir -p $(docrootdir)/$$lang; \
		cp $$lang/*.xml $$lang/*.html $$lang/topic.dat \
			$(docrootdir)/$$lang; \
	done

dist:
	for lang in $(LANGUAGES); do \
		cd $$lang; \
		xmllint --valid --noent --noout $(docname).xml || exit; \
		xsltproc $(xslstylesheet) $(docname).xml || exit; \
	done

.PHONY: dist clean distclean install uninstall
