-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.in
207 lines (186 loc) · 6.94 KB
/
Makefile.in
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
#
# Toplevel Makefile for STk
#
#
# Copyright © 1993-1999 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
#
# Permission to use, copy, modify, distribute,and license this
# software and its documentation for any purpose is hereby granted,
# provided that existing copyright notices are retained in all
# copies and that this notice is included verbatim in any
# distributions. No written agreement, license, or royalty fee is
# required for any of the authorized uses.
# This software is provided ``AS IS'' without express or implied
# warranty.
#
# Author: Erick Gallesio [[email protected]]
# Creation date: ??-Sep-1993 ??:??
# Last file update: 3-Sep-1999 20:03 (eg)
#
SHELL = /bin/sh
CP = /bin/cp
STRIP = strip
RANLIB = @RANLIB@
MACHTYPE = @MACHINE@
MP = @[email protected]
FLAVOR = @FLAVOR@
prefix = @prefix@
include VERSION
include paths
all: $(FLAVOR)
unix: start tcl-dir mp-dir stack-dir tk-dir snow-dir src-dir stklos-dir ext-dir stop
win: start tcl-dir mp-dir stack-dir tk-dir snow-dir src-dir stklos-dir ext-dir stop
start:
@date > .start-date
@/bin/rm -f config.make
@echo "# Common startup for all Makefiles" > config.make
@echo "# This file is automatically generated" >> config.make
@echo "VERSION = $(VERSION)" >> config.make
@echo "FLAVOR = $(FLAVOR)" >> config.make
@echo "SHELL = $(SHELL)" >> config.make
@echo "MACHTYPE = $(MACHTYPE)" >> config.make
@echo "prefix = $(prefix)" >> config.make
@cat ./paths >> config.make
@echo "MACHINE = -DMACHINE=\\\"$(MACHTYPE)\\\"" >> config.make
@echo "CC = @CC@" >> config.make
@echo "STKCFLAGS = @STKCFLAGS@" >> config.make
@echo "STKLDFLAGS = @STKLDFLAGS@" >> config.make
@echo "CP = $(CP)" >> config.make
@echo "RANLIB = @RANLIB@" >> config.make
@echo "STRIP = @STRIP@" >> config.make
@echo "XINCLUDES = @XINCLUDES@" >> config.make
@echo "XLIBSW = @XLIBSW@" >> config.make
@echo "MP = @MP@" >> config.make
@echo "DFLGS = @DFLGS@" >> config.make
@echo "EOBJ = @EOBJ@" >> config.make
@echo "ETKOBJ = @ETKOBJ@" >> config.make
@echo "EXTRA_OBJ = @EXTRA_OBJ@" >> config.make
@echo "DYNLOAD = @DYNLOAD@" >> config.make
@echo "SH_CCFLAGS = @SH_CCFLAGS@" >> config.make
@echo "SH_LDFLAGS = @SH_LDFLAGS@" >> config.make
@echo "SH_LOADER = @SH_LOADER@" >> config.make
@echo "SH_SUFFIX = @SH_SUFFIX@" >> config.make
@echo "LIB_MALLOC = @LIB_MALLOC@" >> config.make
@echo "LIB_DLD = @LIB_DLD@" >> config.make
@echo "STK_LIBRARY = $(libdir)" >> config.make
stop:
@echo "Make started at `cat .start-date`"
@/bin/rm .start-date
@echo "Make completed at `date`"
tcl-dir:
@(echo "make Tcl"; cd Tcl; $(MAKE) $(FLAVOR))
tk-dir:
@(echo "make Tk"; cd Tk; $(MAKE) libtk.a)
mp-dir:
@(echo "make Mp"; cd Mp; $(MAKE) $(MP))
stack-dir:
@(echo "make Stack"; cd Stack; $(MAKE))
src-dir:
@(echo "make Src"; cd Src; $(MAKE) stk TK="-DUSE_TK")
snow-dir:
@(echo "make Snow"; cd Snow; $(MAKE) snow TK="-DNO_TK")
stklos-dir:
@(echo "make STklos"; cd STklos; $(MAKE) stklos)
ext-dir:
@(echo "Make Extensions"; cd Extensions; $(MAKE) all)
doc:
@(echo "Make Documentation"; cd Doc; $(MAKE) all)
dvi:
@(echo "Make Documentation(dvi)"; cd Doc; $(MAKE) dvi)
demos:
/bin/sh -c "(cd Demos; ../Src/test-stk -f S-scape README.html)"
install: install-no-strip
@echo "Stripping executables ..."
$(STRIP) $(root)$(execdir)/stk
$(STRIP) $(root)$(execdir)/snow
@echo ""
@echo "Installation completed."
install-no-strip: clean-before
(cd Tcl; $(MAKE) install prefix=$(root)$(prefix))
(cd Tk; $(MAKE) install INSTALL_ROOT=$(root))
(cd Mp; $(MAKE) install prefix=$(root)$(prefix))
(cd Src; $(MAKE) install.stk root=$(root))
(cd Snow; $(MAKE) install.snow root=$(root))
(cd Lib; $(MAKE) install root=$(root))
(cd STklos; $(MAKE) install prefix=$(root)$(prefix))
(cd Extensions; $(MAKE) install prefix=$(root)$(prefix))
(cd Demos; $(MAKE) install root=$(root))
(cd Help; $(MAKE) install prefix=$(root)$(prefix))
(cd Doc; $(MAKE) install prefix=$(root)$(prefix))
(cd Stack; $(MAKE) install prefix=$(root)$(prefix))
install.libs:
-if [ ! -d $(root)$(confdir) ] ; then mkdir -p $(root)$(confdir); fi
$(CP) config.make $(root)$(confdir)
-if [ ! -d $(root)$(incdir) ] ; then mkdir -p $(root)$(incdir); fi
/bin/rm -f $(root)$(stkdir)/include
(cd $(root)$(stkdir) ; ln -s $(VERSION)/include ./include)
(cd Tcl; $(MAKE) install.libs prefix=$(root)$(prefix))
(cd Tk; $(MAKE) install.libs prefix=$(root)$(prefix))
(cd Mp; $(MAKE) install.libs prefix=$(root)$(prefix))
(cd Src; $(MAKE) install.stk.libs root=$(root))
(cd Snow; $(MAKE) install.snow.libs root=$(root))
(cd Stack; $(MAKE) install.libs root=$(root))
chmod 0755 $(root)$(confdir) $(root)$(ardir) $(root)$(confdir)/* $(root)$(ardir)/*
@echo ""
@echo "Full installation completed."
binary-release: install install.man
(cd $(prefix)/lib; \
tar cvfz /tmp//STk-$(VERSION)-$(MACHINE).tar.gz stk/$(VERSION)/$(MACHINE))
@echo "The release is in the file /tmp/STk-$(VERSION)-$(MACHINE).tar.gz"
@echo "Don't forget to create the file STk-$(VERSION)-$(MACHINE).README"
@echo "to describe the content of your archive (a template is given in"
@echo "the file BINARY-DISTRIB"
common-release:
(cd $(prefix)/lib; \
tar cvfz /tmp/STk-$(VERSION)-common.tar.gz stk/$(VERSION)/Help \
stk/$(VERSION)/STk \
stk/$(VERSION)/demos \
stk/$(VERSION)/images \
stk/$(VERSION)/images \
stk/$(VERSION)/man \
stk/man)
@echo "Terminé. Le fichier est dans /tmp/STk-$(VERSION)-common.tar.gz"
clean-before:
@if [ -d $(root)$(prefix)/lib/stk ]; \
then \
echo "*** WARNING:"; \
echo "*** A previous version of STk has already been installed in"; \
echo "*** directory '$(stkdir)'. It is not a problem since"; \
echo "*** several versions can coexist now in this directory"; \
echo "*** However, if you are short in place, or if you don't use "; \
echo "*** a multi architecture file system, cleaning may be a good"; \
echo "*** thing to do."; \
echo "*** (Waiting 10s) " ; \
sleep 10;\
fi
@if [ -d $(root)$(prefix)/lib/stk/$(VERSION) ]; \
then \
echo "*** WARNING:"; \
echo "*** This STk version ($(VERSION)) has already been installed "; \
echo "*** on this machine. Should I clean this directory before "; \
echo "*** starting installation of STk-$(VERSION)? [no] " ; \
read a; \
case $$a in \
y*|Y*) echo "Deleting previous installation"; \
/bin/rm -rf $(stkdir)/$(VERSION);; \
*) echo "No cleaning!";; \
esac; \
fi
install.man:
(cd Doc; $(MAKE) install.man)
clean:
(cd Tcl; $(MAKE) clean)
(cd Tk; $(MAKE) clean)
(cd Mp; $(MAKE) clean)
(cd Stack; $(MAKE) clean)
(cd Src; $(MAKE) clean)
(cd Snow; $(MAKE) clean)
(cd STklos; $(MAKE) clean)
(cd Extensions; $(MAKE) clean)
(cd Help; $(MAKE) clean)
(cd Doc; $(MAKE) clean)
/bin/rm -f core *~ Makefile config.* Src/Makefile
cin:
@(cat VERSION; prcs checkin -n)
ci:
@(cat VERSION; prcs checkin)