#-*- Makefile -*-
# Makefile for building docfiles

docfiles: FAQs

RPREFIX = $(shell perl fixed/rwver.pl ../../VERSION)
SED=sed
RVER = `cut -d' ' -f1 ../../VERSION | sed -n 1p`

SEDVER = -e s/@RVER@/$(RVER)/g -e s/@RWVER@/$(RPREFIX)/g

FAQs: rw-FAQ ../../doc/html/rw-FAQ.html

../../doc/html/rw-FAQ.html: rw-FAQ.texi ../../VERSION
	@$(SED) $(SEDVER) $< | \
	  makeinfo --no-split --html --no-headers --number-sections -o $@ 

rw-FAQ: rw-FAQ.texi ../../VERSION
	$(SED) $(SEDVER) $< | \
	  makeinfo --no-headers --number-sections -o $@
