# This MingW Makefile is only intended to prepare for distribution the PyTables
# sources exported from a repository in a Windows box.  For building and
# installing PyTables, please use ``setup.py`` as described in the
# ``README.txt`` file.

VERSION=$(shell type VERSION)
SRCDIRS=src doc

GENERATED=ANNOUNCE.txt

.PHONY: dist clean

dist: $(GENERATED)
	for %%f in ($(SRCDIRS)) do $(MAKE) -f Makefile_windows -C %%f $@

clean:
	del /q /s MANIFEST build dist
	del /q /s $(GENERATED) tables\*.pyd
	del /q /s *.pyc *.pyo *~
	for %%f in ($(SRCDIRS)) do $(MAKE) -f Makefile_windows -C %%f $@

%: %.in VERSION
	type "$<" | sed -e "s/@VERSION@/$(VERSION)/g" > "$@"
