summaryrefslogtreecommitdiff
path: root/itcl/iwidgets/Makefile.in
blob: badce221550895d4b3e4156973971bf3bac0ca98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
#
# This file is a Makefile for [incr Widgets].  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.
#
# RCS: $Id$

# Current [incr Widgets] version;  used in various names.

ITCL_VERSION = @ITCL_VERSION@
IWIDGETS_VERSION = @VERSION@

#----------------------------------------------------------------
# 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 =	@prefix@
exec_prefix =	@exec_prefix@

srcdir = @srcdir@
bindir = @bindir@

# The following definition can be set to non-null for special systems
# like AFS with replication.  It allows the pathnames used for installation
# to be different than those used for actually reference files at
# run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
# when installing files.
INSTALL_ROOT =

# Path name to use when installing library scripts:

# REDHAT LOCAL
#SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/lib/iwidgets$(IWIDGETS_VERSION)
SCRIPT_INSTALL_DIR = @datadir@/iwidgets$(IWIDGETS_VERSION)
# END REDHAT LOCAL

# Directory in which to install the archive libtcl.a:
LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib

# Directory in which to install the program tclsh:
BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin

# Top-level directory in which to install manual entries:
MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man/mann

# Directory containing Tcl source code (for library used during test):
TCL_SRC_DIR = @TCL_SRC_DIR@

# Directory containing Tk source code (for library used during test):
TK_SRC_DIR = @TK_SRC_DIR@

# Itcl libraries can be found here:
ITCL_LIB_DIR = @ITCL_LIB_DIR@

# Directory containing Itcl source code (for library used during test):
ITCL_SRC_DIR = @ITCL_SRC_DIR@

# Itk libraries can be found here:
ITK_LIB_DIR = @ITK_LIB_DIR@

# Directory containing Itk source code (for library used during test):
ITK_SRC_DIR = @ITK_SRC_DIR@

# 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.
#----------------------------------------------------------------

# REDHAT LOCAL
#INSTALL =		$(TCLSH_PROG) `$(CYGPATH) $(ITCL_SRC_DIR)/../config/installFile.tcl` -c
INSTALL =	@INSTALL@
# END REDHAT LOCAL

INSTALL_PROGRAM =	$(INSTALL)
INSTALL_DATA =		$(INSTALL) -m 644
INSTALL_SCRIPT =	$(INSTALL) -m 555
MKINSTALLDIRS =		$(ITCL_SRC_DIR)/../config/mkinstalldirs
RANLIB =		@RANLIB@
LN_S =			ln -s
TOP_DIR =		$(srcdir)
GENERIC_DIR =		$(TOP_DIR)/generic
UNIX_DIR =		$(TOP_DIR)/unix

CYGPATH =		@CYGPATH@
TCLSH_PROG =		@TCLSH_PROG@

#----------------------------------------------------------------
# The information below should be usable as is.  The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------

info:
	@echo "Please specify either 'make test' or 'make install'."

all:
	@echo "Nothing to make for target 'all'.  Run 'make test' to \
	test the distribution"
	@echo "and 'make install' to install it."

install: install-libraries install-doc install-demos

test:
	LD_LIBRARY_PATH=$(ITCL_LIB_DIR):$(ITK_LIB_DIR):$(LD_LIBRARY_PATH); export LD_LIBRARY_PATH ; \
	TCL_LIBRARY=$(TCL_SRC_DIR)/library; export TCL_LIBRARY; \
	ITCL_LIBRARY=$(ITCL_LIB_DIR); export ITCL_LIBRARY; \
	TK_LIBRARY=$(TK_SRC_DIR)/library; export TK_LIBRARY; \
	ITK_LIBRARY=$(ITK_LIB_DIR); export ITK_LIBRARY; \
	IWIDGETS_LIBRARY=@IWIDGETS_SRC_DIR@; export IWIDGETS_LIBRARY; \
	$(TCLSH_PROG) `@CYGPATH@ $(srcdir)/tests/all.tcl` \
		-exedir `@CYGPATH@ $(TK_SRC_DIR)/unix` $(TESTFLAGS)

install-libraries:
	@$(MKINSTALLDIRS) $(SCRIPT_INSTALL_DIR) $(LIB_INSTALL_DIR)
	@rm -f $(LIB_INSTALL_DIR)/iwidgets
# REDHAT LOCAL
#	$(LN_S) $(SCRIPT_INSTALL_DIR) $(LIB_INSTALL_DIR)/iwidgets
# END REDHAT LOCAL
	@$(MKINSTALLDIRS) $(SCRIPT_INSTALL_DIR)/scripts
	@echo "Installing source files from $(GENERIC_DIR) into $(SCRIPT_INSTALL_DIR)"
	@for i in $(GENERIC_DIR)/*.itk $(GENERIC_DIR)/*.itcl $(GENERIC_DIR)/tclIndex $(GENERIC_DIR)/*.gif ; \
	    do \
	    $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/scripts; \
	    done;
	@echo "Installing iwidgets.tcl and pkgIndex.tcl into $(SCRIPT_INSTALL_DIR)"
	@for i in iwidgets.tcl pkgIndex.tcl ; \
	    do \
	    $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
	    done;

install-demos:
	@$(MKINSTALLDIRS) $(SCRIPT_INSTALL_DIR)/demos/images $(SCRIPT_INSTALL_DIR)/demos/html
	@echo "Installing demos from $(srcdir)/demos into $(SCRIPT_INSTALL_DIR)/demos"
	@for i in $(srcdir)/demos/*; \
	    do \
	    if [ -f $$i ] ; then \
	        $(INSTALL_SCRIPT) $$i $(SCRIPT_INSTALL_DIR)/demos; \
	    fi; \
	    done;
	@echo "Installing images from $(srcdir)/demos/images into $(SCRIPT_INSTALL_DIR)/demos/images"
	for i in $(srcdir)/demos/images/*; \
	    do \
	    if [ -f $$i ] ; then \
	        $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \
	    fi; \
	    done;
	@echo "Installing html man pages from $(srcdir)/demos/html into $(SCRIPT_INSTALL_DIR)/demos/html"
	for i in $(srcdir)/demos/html/*; \
	    do \
	    if [ -f $$i ] ; then \
	        $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/html; \
	    fi; \
	    done;

install-doc:
	@$(MKINSTALLDIRS) $(MAN_INSTALL_DIR)
	@echo "Installing man pages from $(TOP_DIR)/doc into $(MAN_INSTALL_DIR)"
	@cd $(TOP_DIR)/doc; for i in *.n; \
	    do \
	    rm -f $(MAN_INSTALL_DIR)/`basename $$i`; \
	    rm -f $(MAN_INSTALL_DIR)/`basename iwidgets_$$i`; \
	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
	        $$i > $(MAN_INSTALL_DIR)/`basename iwidgets_$$i`; \
	    chmod 444 $(MAN_INSTALL_DIR)/`basename iwidgets_$$i`; \
	    done;
	$(INSTALL_DATA) $(srcdir)/license.terms $(SCRIPT_INSTALL_DIR)

Makefile: $(srcdir)/Makefile.in
	$(SHELL) config.status

clean:
	rm -f core errs *~ \#* TAGS *.E a.out errors

distclean: clean
	rm -f Makefile config.status config.cache config.log

depend:
	makedepend -- $(CC_SWITCHES) -- $(SRCS)

configure: configure.in
	autoconf

# DO NOT DELETE THIS LINE -- make depend depends on it.