# Makefile.in for nyacc
#
# Copyright (C) 2017-2018 Matthew R. Wette
#
# Copying and distribution of this file, with or without modification
# is granted.  This file is offered as-is, without any warranty.

prefix=@prefix@
GUILE=@guile@
GUILD=@guild@
SITE_SCM_DIR=@site_scm_dir@
SITE_SCM_GO_DIR=@site_scm_go_dir@
INFODIR=@infodir@

default: all

all:
	@echo "nothing to make"

.PHONY: install
install:
	@(cd module; \
	  make -f Makefile.nyacc \
		GUILE=$(GUILE) GUILD=$(GUILD) \
		SITE_SCM_DIR=$(SITE_SCM_DIR) \
		SITE_SCM_GO_DIR=$(SITE_SCM_GO_DIR) \
		DESTDIR=$(DESTDIR) install)
	@(cd doc/nyacc; \
	  make -f Makefile.nyacc \
		GUILE=$(GUILE) GUILD=$(GUILD) \
		INFODIR=$(INFODIR) \
		DESTDIR=$(DESTDIR) install)

.PHONY: install-srcs
install-srcs:
	@(cd module; \
	  make -f Makefile.nyacc \
		SITE_SCM_DIR=$(SITE_SCM_DIR) \
		DESTDIR=$(DESTDIR) install-srcs)

.PHONY: install-ffi-help
install-ffi-help:
	@echo "FFI helper now part of normal distribution"

.PHONY: install-nx-languages \
	install-nx-javascript \
	install-nx-octave \
	install-nx-tcl
install-nx-languages \
	install-nx-javascript \
	install-nx-octave \
	install-nx-tcl \
	:
	@(cd examples; \
	  make -f Makefile.nyacc \
		SITE_SCM_DIR=$(SITE_SCM_DIR) \
		SITE_SCM_GO_DIR=$(SITE_SCM_GO_DIR) \
		DESTDIR=$(DESTDIR) install-nx-utils $@)

.PHONY: dist-files
dist-files:
	(cd module; \
	 make -f Makefile.nyacc GUILE=$(GUILE) GUILD=$(GUILD) dist-files)
	(cd doc/nyacc; \
	 make -f Makefile.nyacc GUILE=$(GUILE) dist-files)
	(cd examples; \
	 make -f Makefile.nyacc GUILE=$(GUILE) GUILD=$(GUILD) dist-files)

.PHONY: check
check:
	(cd test-suite/nyacc; \
	 make -f Makefile.nyacc GUILE=$(GUILE) check)

.PHONY: dist-clean
dist-clean:
	rm -f Makefile

# --- last line ---
