# Makefile.in --
#
#	If ths is "Makefile.in" then it is a template for a Makefile;  to generate 
#	the actual Makefile, run "./configure", which is a configuration script
#	generated by the "autoconf" program (constructs like "@foo@" will get
#	replaced in the actual Makefile.
#
# Copyright (C) 2019 Alexander Schoepe, Bochum, DE
#

#========================================================================
# Nothing of the variables below this line need to be changed.
#========================================================================

SHELL		= /bin/sh

srcdir		= .
top_srcdir	= .
prefix		= /opt/tcl/8.6
exec_prefix	= /opt/tcl/8.6
datarootdir	= ${prefix}/share
libdir		= ${exec_prefix}/lib
mandir		= ${datarootdir}/man
bindir		= ${exec_prefix}/bin

DESTDIR		=
pkglibdir	= $(libdir)/ooxml1.8
top_builddir	= .

PACKAGE_NAME	= ooxml
PACKAGE_VERSION	= 1.8
CYGPATH		= echo

TCLSH_PROG	= /opt/tcl/8.6/bin/tclsh8.6

PKG_TCL_SOURCES	=  ooxml.tcl manifest.txt

CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl manifest.txt
CLEANFILES	= 

#========================================================================
# Start of user-definable TARGETS section
#========================================================================

manifest.txt: manifest manifest.uuid tools/mkversion.tcl
	$(TCLSH_PROG) tools/mkversion.tcl > $@

all: manifest.txt

install: all
	$(TCLSH_PROG) `echo $(srcdir)/helper.tcl` cp $(PKG_TCL_SOURCES) pkgIndex.tcl $(pkglibdir)

test:
	$(TCLSH_PROG) `echo $(srcdir)/tests/all.tcl` $(TESTFLAGS) \
	  -load "package ifneeded ${PACKAGE_NAME} ${PACKAGE_VERSION} [list source [file join `echo $(srcdir)` $(PACKAGE_NAME).tcl]]"

archive:
	sh tools/archive.sh ooxml 1.8 $(PKG_TCL_SOURCES)
	
clean:
	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
	-rm -rf doc

distclean: clean
	-rm -f $(CONFIG_CLEAN_FILES)
	-rm -rf autom4te.cache
	-rm -f config.cache config.log config.status

.PHONY: all install test clean distclean
