# Copyright (C) Jaime Villate <villate@gnu.org>, 2001
#
# Makefile to parse "recipes" from http://www.laespiral.org
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
# $Id: Makefile,v 1.8 2002/01/31 18:24:11 dcharro Exp $

DESTDIR=
SRCRECETAS=$(shell find * -regex '.*receta.*\.xml' -print)
RECETAS=$(shell find * -regex '.*receta.*\.xml' -print | sed "s/xml$$/html/")
DOCS=$(DESTDIR)/usr/share/doc/recetas/html
PARSER=xsltproc

all: $(RECETAS) index.html 

$(RECETAS): %.html: %.xml
	$(PARSER) LE-receta.xsl $< > $@

index.html: recipelist
	@ ./recipelist $(RECETAS) > index.html

clean:
	@ rm -f $(RECETAS) index.html

realclean: clean
	@ rm -f $(SRCRECETAS) 

install: all
	install -d $(DOCS)
	install index.html $(DOCS)
	for receta in $(RECETAS); do \
		install -D $$receta $(DOCS)/$$receta; \
	done

update:
	cd 1-100 && cvs update
