summaryrefslogtreecommitdiff
path: root/tix/unix/Makefile.in
blob: 2489008cca87fff3c759524fb6007b41146af356 (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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# 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.
#

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

@SET_MAKE@

TIX_VERSION = @TIX_VERSION@

# 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)/share/tix$(TIX_VERSION)

# 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 = @SHELL@

#----------------------------------------------------------------
# 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.
#----------------------------------------------------------------
INSTALL		=	@SRC_DIR@/install.sh -c
INSTALL_PROGRAM =	@INSTALL_PROGRAM@
INSTALL_DATA	=	@INSTALL_DATA@
SRC_DIR		=	@SRC_DIR@
INC_DIR		=	@SRC_DIR@/generic
UNIX_DIR	=	@SRC_DIR@/unix
LIBRARY_DIR	=	@SRC_DIR@/library
DEMOS_DIR	=	@SRC_DIR@/demos
DEMO_PROGS	=	widget
TOOLS_DIR	=	@SRC_DIR@/tools
MANUAL_DIR	=	@SRC_DIR@/man
# CYGNUS LOCAL: Set VPATH to unix subdirectory, not top level.
VPATH		=	@SRC_DIR@/unix
CFLAGS		=	@CFLAGS@

# CYGNUS LOCAL: Just recur for most targets:

SUBDIR = @SUBDIR@

all test:
	@cd $(SUBDIR) && $(MAKE) $@

mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
	@cd $(SUBDIR) && $(MAKE) `echo $@ | sed 's/-recursive//'`

configure:
	cd $(SRC_DIR)/unix && autoconf

mostlyclean: mostlyclean-recursive

maintainer-clean: distclean-local maintainer-clean-recursive

config.status: configure
	$(SHELL) config.status --recheck

# END CYGNUS LOCAL

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

BINDIRS = tk4.0 tk4.1 tk4.2 tk4.3 tk8.0 itcl2.0 itcl2.1 itcl2.2

install-binaries::
	@for i in $(BINDIRS); \
	do \
	    if test -r $$i/Makefile; then \
	        echo "Entering directory $$i"; \
	        cd $$i; \
	        $(MAKE) prefix=$(prefix) \
		    exec_prefix=$(exec_prefix) _install_; \
	        cd ..; \
            fi; \
	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 building tclIndex for Tix scripts"
	@cd $(TOOLS_DIR); $(INSTALL_PROGRAM) 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 $(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/* .gif $(LIBRARY_DIR)/bitmaps/*.x*m; \
	    do \
	    if [ -f $$i ] ; then \
		echo "Installing $$i"; \
		$(INSTALL_DATA) $$i $(TIX_LIBRARY)/bitmaps; \
		fi; \
	    done;
	@for i in $(LIBRARY_DIR)/pref/*.f* $(LIBRARY_DIR)/pref/*.c* $(LIBRARY_DIR)/pref/tixmkpref; \
	    do \
	    if [ -f $$i ] ; then \
		echo "Installing $$i"; \
		$(INSTALL_DATA) $$i $(TIX_LIBRARY)/pref; \
		fi; \
	    done;
	@echo "Installing pkgIndex.tcl"
	@cat */pkgIndex.tcl > pkgIndex.tcl
	@$(INSTALL_DATA) pkgIndex.tcl $(TIX_LIBRARY)

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;

# CYGNUS LOCAL: install-minimal target.
install-minimal: install-libraries

tests::
	@for i in $(BINDIRS); \
	do \
	    if test -r $$i/Makefile; then \
	        echo "Entering directory $$i"; \
	        cd $$i; \
		$(MAKE) tests; \
		cd $(UNIX_DIR); \
	    fi; \
	done;

sa-tests::
	@for i in $(BINDIRS); \
	do \
	    if test -r $$i/Makefile; then \
	        echo "Entering directory $$i"; \
	        cd $$i; \
		$(MAKE) sa-tests; \
		cd $(UNIX_DIR); \
	    fi; \
	done;

compile::
	@for i in $(BINDIRS); \
	do \
	    if test -r $$i/Makefile; then \
	        echo "Entering directory $$i"; \
	        cd $$i; \
		$(MAKE) CFLAGS=$(CFLAGS) ; \
		cd $(UNIX_DIR); \
	    fi; \
	done;

clean::
	@for i in $(BINDIRS); \
	do \
	    if test -r $$i/Makefile; then \
	        echo "Entering directory $$i"; \
	        cd $$i; \
		$(MAKE) clean; \
		cd $(UNIX_DIR); \
	    fi; \
	done;
	- rm -f tixSamLib.c tixBitmaps.c

distclean::
	@for i in $(BINDIRS); \
	do \
	    if test -r $$i/Makefile; then \
	        echo "Entering directory $$i"; \
	        cd $$i; \
		$(MAKE) distclean; \
		cd $(UNIX_DIR); \
	    fi; \
	done;
	- rm -f config.status Makefile.bak config.status \
	  config.cache config.log tixConfig.tcl *~ Makefile

# CYGNUS LOCAL: Makefile depends upon config.status
Makefile:Makefile.in config.status
	./config.status

autoconf::
	autoconf

config::
	-cd tk4.0; ./configure
	-cd tk4.1; ./configure
	-cd tk4.2; ./configure
	-cd tk4.3; ./configure
	-cd tk8.0; ./configure
	-cd itcl2.0; ./configure
	-cd itcl2.1; ./configure
	-cd itcl2.2; ./configure

config-shared::
	-cd tk4.0; ./configure
	-cd tk4.1; ./configure --enable-shared
	-cd tk4.2; ./configure --enable-shared
	-cd tk4.3; ./configure --enable-shared
	-cd tk8.0; ./configure --enable-shared
	-cd itcl2.0; ./configure
	-cd itcl2.1; ./configure --enable-shared
	-cd itcl2.2; ./configure --enable-shared

config-shared-sam::
	-cd tk4.0; ./configure --enable-sam
	-cd tk4.1; ./configure --enable-shared --enable-sam
	-cd tk4.2; ./configure --enable-shared --enable-sam
	-cd tk4.3; ./configure --enable-shared
	-cd tk8.0; ./configure --enable-shared
	-cd itcl2.0; ./configure
	-cd itcl2.1; ./configure --enable-shared
	-cd itcl2.2; ./configure --enable-shared