##
## This is part of CLFSja package.
##
SUBDIRS=lfs-xsl
BOOKdir = @abs_bookdir@/stylesheets
CHANGE_FILES = \
	clfs-chunked.ch  \
	clfs-nochunks.ch \
	clfs-pdf.ch      \
	dump-commands.ch \
	top-index.ch     \
	wget.ch

EXTRA_DIST = $(CHANGE_FILES) top-index.sed
srcdir = @srcdir@
srcs = $(CHANGE_FILES:.ch=.xsl)

SUFFIXES = .ch .xsl
.ch.xsl:
	$(top_builddir)/$(CTIE) -m $@ $(BOOKdir)/$@ $(srcdir)/$*.ch >/dev/null

all: ctie $(srcs)

ctie:
	@$(MAKE) -C $(top_builddir)/$@ $@ >/dev/null

top-index.xsl: top-index-modified.xsl $(srcdir)/top-index.ch
	$(top_builddir)/$(CTIE) -m $@ top-index-modified.xsl $(srcdir)/top-index.ch >/dev/null
top-index-modified.xsl: $(BOOKdir)/top-index.xsl $(srcdir)/top-index.sed
	sed -f $(srcdir)/top-index.sed $(BOOKdir)/top-index.xsl > $@
