PNG_FIGS = $(wildcard *.png)
PDF_FIGS = $(patsubst %.png,%.pdf,$(PNG_FIGS))
+MANUAL_INCLUDES = .version tests/programs/Makefile.omk \
+tests/libraries/Makefile.omk tests/default-config/Makefile.omk \
+tests/default-config/subdir/Makefile.omk \
+tests/default-config/config.omk-correct
+
+tests/%: DIR=$(shell echo $@|sed -e 's,\([^/]*/[^/]*\)/.*,\1,')
+tests/%:
+ rm -rf $(DIR)
+ mkdir -p $(DIR)
+ echo 'WVSTART() { local d=$(CURDIR)/$(DIR)/$$(echo $$1|tr " " -|tr A-Z a-z); mkdir -p $$d && cd $$d; }; WVPASS() { :; }; needs_valid_CC() { :; }; omkize() { :; }' > $(DIR)/wvtest.sh
+ cd $(DIR) && ../../../$(DIR)
+
%.pdf: %.png
convert $< -density 150 $@
-%.pdf: %.texinfo $(PDF_FIGS) .version
+# We want to use synctex. texi2dvi does not support this directly, so
+# we use the PDFTEX variable for this.
+export PDFTEX = pdfetex -synctex=1
+
+%.pdf: %.texinfo $(PNG_FIGS) $(MANUAL_INCLUDES)
texi2dvi --pdf $<
texi2dvi --pdf $<
-%.txt: %.texinfo .version
+%.txt: %.texinfo $(MANUAL_INCLUDES)
makeinfo --no-headers --force -o $@ $<
-%.html: %.texinfo .version
+%.html: %.texinfo $(MANUAL_INCLUDES)
makeinfo --html --no-split -o $@ $<
# texi2html --l2h $<
# Fix texinfo HTML output