# Makefile for ncurses miscellany directory
#
# This makes/installs the terminfo database
#
# The variable 'srcdir' refers to the source-distribution, and can be set with
# the configure script by "--srcdir=DIR".
#
# The rules are organized to produce the libraries for the configured models,
# and the programs with the configured default model.

# turn off _all_ suffix rules; we'll generate our own
.SUFFIXES:

SHELL		= /bin/sh
THIS		= Makefile

NC_MFLAGS 	= @nc_cv_makeflags@
@SET_MAKE@

srcdir		= @srcdir@
prefix		= @prefix@
exec_prefix	= @exec_prefix@
bindir		= $(exec_prefix)/bin

# We'd put terminfo in /usr/share/terminfo, but that's not the convention...
ticdir		= @datadir@

################################################################################
all:

install: install.data

install.data: $(ticdir)
	rm -fr $(ticdir)/[0-9A-Za-z]
	@echo "Building terminfo database, please wait..."
	umask 022; TERMINFO=$(ticdir) $(bindir)/tic $(srcdir)/terminfo.src
	cp -r $(srcdir)/tabset $(prefix)/share
	find $(prefix)/share -type d -name CVS -print | xargs rm -rf

$(ticdir) :
	$(srcdir)/../mkinstalldirs $@

tags:

TAGS:

clean ::
	-rm -f tags TAGS *~

distclean: clean
	-rm -f Makefile 

mostlyclean: clean

realclean: distclean

###############################################################################
# The remainder of this file is automatically generated during configuration
###############################################################################
