# Generated automatically from Makefile.in by configure.
#
# This file is a Makefile for Tix.  If it has the name "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.
#
# @(#) Makefile.in 1.19 95/01/08 16:55:30


#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run
# the configuration script).
#----------------------------------------------------------------

# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such
# as scripts (prefix).  The values specified here may be overridden
# at configure-time with the --exec-prefix and --prefix options
# to the "configure" script.

prefix      =	/usr/local/coda/2.5/common
exec_prefix =	/usr/local/coda/2.5/Linux



# Directory in which to install the library of Tix scripts and demos
# (note: you can set the TIX_LIBRARY environment variable at run-time to
# override the compiled-in location):
TIX_LIBRARY =	$(prefix)/lib/tix

# Directory in which to install the archive libtix.a:
LIB_DIR =	$(exec_prefix)/lib

# Directory in which to install the program wish:
BIN_DIR =	$(exec_prefix)/bin

# Directory in which to install the include file tix.h:
INCLUDE_DIR =	$(prefix)/include

# Top-level directory for manual entries:
MAN_DIR =	$(prefix)/man

# Directory in which to install manual entry for wish:
MAN1_DIR =	$(MAN_DIR)/man1

# Directory in which to install manual entries for Tix's C library
# procedures:
MAN3_DIR =	$(MAN_DIR)/man3

# Directory in which to install manual entries for the built-in
# Tcl commands implemented by Tix:
MANN_DIR =	$(MAN_DIR)/mann

# Some versions of make, like SGI's, use the following variable to
# determine which shell to use for executing commands:
SHELL =		/bin/sh

#----------------------------------------------------------------
# The information below is modified by the configure script when
# Makefile is generated from Makefile.in.  You shouldn't normally
# modify any of this stuff by hand.
#----------------------------------------------------------------
AC_FLAGS	=	 -DLINUX=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRERROR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRDUP=1 -DHAVE_STRCASECMP=1 -DHAVE_UNISTD_H=1 -DHAVE_ERRNO_H=1 -DHAVE_FCNTL_H=1 -DNO_STREAM_H=1 -DNO_UN_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_TOLOWER=1 -DHAVE_NTOHL=1 -DSTDC_HEADERS=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_FLOAT_H=1 -DHAVE_MALLOC_H=1 -DHAVE_ERRNO_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MEMORY_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_WAIT_H=1 -DTIME_WITH_SYS_TIME=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1 -DSVIPC_NO_UNION_SEMUN=1 -DTK_FILE_READ_PTR=1 
INSTALL		=	./install.sh -c
INSTALL_PROGRAM =	${INSTALL}
INSTALL_DATA	=	${INSTALL} -m 644
SRC_DIR		=	.
INC_DIR		=	$(SRC_DIR)/include
LIBRARY_DIR	=	$(SRC_DIR)/library
DEMOS_DIR	=	$(SRC_DIR)/demos
MANUAL_DIR	=	$(SRC_DIR)/man
DEMO_PROGS	=	widget
#----------------------------------------------------------------------
#
#			General
#
#----------------------------------------------------------------------

all:: tixConfig.tcl compile

test::
	cd test; $(MAKE) test
#----------------------------------------------------------------------
#
#			Compilation
#
#----------------------------------------------------------------------
compile:: unix-tk4.0 unix-itcl2.0

demos-c:: 
	@echo "Entering directory demos-c"
	cd demos-c; $(MAKE)

demos-c-bad::
	@echo error 
	@echo the demos-c target requires that you have installed the
	@echo Tcl 7.4 and Tk 4.0 source in your system.
	@echo

unix-tk4.0:: 
	@echo "Entering directory unix-tk4.0"
	cd unix-tk4.0; $(MAKE)

unix-tk4.0-bad::
	@echo error 
	@echo the unix-tk4.0 target requires that you have installed the
	@echo Tcl 7.4 and Tk 4.0 source in your system.
	@echo

unix-tk4.1:: 
	@echo "Entering directory unix-tk4.1"
	cd unix-tk4.1; $(MAKE)

unix-tk4.1-bad::
	@echo error 
	@echo the unix-tk4.1 target requires that you have installed the
	@echo Tcl 7.5 and Tk 4.1 source in your system.
	@echo

unix-itcl2.0:: 
	@echo "Entering directory unix-itcl2.0"
	cd unix-itcl2.0; $(MAKE)

unix-itcl2.0-bad::
	@echo error 
	@echo the unix-itcl2.0 target requires that you have installed the
	@echo 'ITCL 2.0 (non-beta) source in your system.'
	@echo

unix-et-tk4.0:: 
	@echo "Entering directory unix-et-tk4.0"
	cd unix-et-tk4.0; $(MAKE)

unix-et-tk4.0-bad::
	@echo error 
	@echo the unix-et-tk4.0 target requires that you have installed the
	@echo Tcl 7.4 and Tk 4.0 source in your system.
	@echo

abort-make::
	@exit 1

#----------------------------------------------------------------------
#
#			Installation
#
#----------------------------------------------------------------------
install:: install-basic install-binaries
	@echo done

install-binaries::
	@for i in unix-tk4.0 unix-itcl2.0; \
	    do \
		echo "Entering directory $$i"; \
		cd $$i; \
		$(MAKE) install; \
		cd ..; \
	    done;

#
# Basic installtion
#
install-basic:: install-libraries install-headers install-demos \
	install-man install-tools 

install-tools:
	@for i in $(BIN_DIR) ; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	    done;
	@echo "installing the tixindex program for builing tclIndex for Tix scripts"
	$(INSTALL_PROGRAM) tools/tixindex $(BIN_DIR)/tixindex

install-headers:
	@for i in $(INCLUDE_DIR); \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	    done;
	@for i in $(INC_DIR)/tix.h; \
	    do \
	    echo "Installing $$i"; \
	    $(INSTALL_DATA) $$i $(INCLUDE_DIR); \
	    done;

install-libraries:
	@for i in $(prefix)/lib $(TIX_LIBRARY) $(TIX_LIBRARY)/bitmaps $(TIX_LIBRARY)/pref; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	    done;
	@for i in $(LIBRARY_DIR)/*.tcl $(LIBRARY_DIR)/tclIndex; \
	    do \
	    echo "Installing $$i"; \
	    $(INSTALL_DATA) $$i $(TIX_LIBRARY); \
	    done;
	@for i in $(LIBRARY_DIR)/bitmaps/*; \
	    do \
	    if [ -f $$i ] ; then \
		echo "Installing $$i"; \
		$(INSTALL_DATA) $$i $(TIX_LIBRARY)/bitmaps; \
		fi; \
	    done;
	@for i in $(LIBRARY_DIR)/pref/*; \
	    do \
	    if [ -f $$i ] ; then \
		echo "Installing $$i"; \
		$(INSTALL_DATA) $$i $(TIX_LIBRARY)/pref; \
		fi; \
	    done;

install-demos:
	@for i in $(prefix)/lib $(TIX_LIBRARY) $(TIX_LIBRARY)/demos \
		$(TIX_LIBRARY)/demos/bitmaps $(TIX_LIBRARY)/demos/samples ; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	    done;
	@cd $(DEMOS_DIR); for i in *; \
	    do \
	    if [ -f $$i ] ; then \
		echo "Installing demos/$$i"; \
		sed -e '1 s|/usr/local/bin/tixwish|$(BIN_DIR)/tixwish|' \
			$$i > $(TIX_LIBRARY)/demos/$$i; \
	    fi; \
	    done;
	@for i in $(DEMO_PROGS); \
	    do \
	    chmod 755 $(TIX_LIBRARY)/demos/$$i; \
	    done;
	@for i in $(DEMOS_DIR)/bitmaps/*; \
	    do \
	    if [ -f $$i ] ; then \
		echo "Installing $$i"; \
		$(INSTALL_DATA) $$i $(TIX_LIBRARY)/demos/bitmaps; \
		fi; \
	    done;
	@for i in $(DEMOS_DIR)/samples/*; \
	    do \
	    if [ -f $$i ] ; then \
		echo "Installing $$i"; \
		$(INSTALL_DATA) $$i $(TIX_LIBRARY)/demos/samples; \
		fi; \
	    done;

install-man:
	@for i in $(MAN_DIR) $(MAN1_DIR) $(MAN3_DIR) $(MANN_DIR) ; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	    done;
	@cd $(MANUAL_DIR); for i in *.n *.1; \
	    do \
	    echo "Installing doc/$$i"; \
	    rm -f $(MANN_DIR)/$$i; \
	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
		    $$i > $(MANN_DIR)/$$i; \
	    chmod 444 $(MANN_DIR)/$$i; \
	    done;



#----------------------------------------------------------------------
#
#       For generating the documentation files inside the Tix package
#
#----------------------------------------------------------------------

.SUFFIXES: .html .txt

DOCS = README.txt ABOUT.txt

docs:: html txt

html::
	cd docs; $(MAKE) html
	cd man; $(MAKE) html
	hanno.tcl -v

txt:: $(DOCS)
	$(MAKE) $(DOCS)
	cd docs; $(MAKE) txt
	cd man; $(MAKE) txt

clean::
	cd unix-tk4.0; $(MAKE) clean
	cd unix-itcl2.0; $(MAKE) clean
	cd unix-et-tk4.0; $(MAKE) clean
	cd demos-c; $(MAKE) clean
	cd unix-tk4.1; $(MAKE) clean
	cd docs; $(MAKE) clean
	cd man; $(MAKE) clean
	cd generic
	- rm -f *~

distclean:: clean
	cd docs; $(MAKE) distclean
	cd man; $(MAKE) distclean
	- cd unix-tk4.0; $(MAKE) distclean
	- cd unix-tk4.1; $(MAKE) distclean
	- cd unix-itcl2.0; $(MAKE) distclean
	- cd demos-c; $(MAKE) distclean
	- cd et; $(MAKE) distclean
	- rm -f Makefile config.status Makefile.bak config.status \
		config.cache config.log tixConfig.tcl

release-docs:: $(DOCS)

.html.txt:
	lynx -dump $< > $@


