# ================================================================
# NOTE: This makefile is not intended to be used in a packaging system --
# rather, Miller uses autconfig for that. This makefile is intended for users
# who prefer (for whatever reason) to bypass autoconfig.  Please also see
# http://johnkerl.org/miller/doc/build.html#Without_using_autoconfig
# ================================================================

MANDIR  ?= /usr/share/man
DESTDIR ?=

all: c manpage
devall: c install docs
# TODO: the install target exists to put most-recent mlr executable in the
# path to be picked up by the mlr-execs in the docs dir. better would be to
# export PATH here with ./c at its head.
c: .always
	make -C c -f Makefile.no-autoconfig top
docs: .always
	cd docs && make html
install: .always
	make -C c -f Makefile.no-autoconfig install
	install -d -m 0755 $(DESTDIR)/$(MANDIR)
	install -m 0644 docs/miller.1 $(DESTDIR)/$(MANDIR)
clean: .always
	make -C c -f Makefile.no-autoconfig clean
.PHONY: manpage
# OSX:
# * brew install asciidoc
# * export XML_CATALOG_FILES=/usr/local/etc/xml/catalog
manpage: .always
	make -C man manpage
.always:
	@true
