File: Makefile

package info (click to toggle)
xotcl 0.85.3-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,832 kB
  • ctags: 2,734
  • sloc: ansic: 18,065; tcl: 1,256; makefile: 653; sh: 430
file content (276 lines) | stat: -rw-r--r-- 8,379 bytes parent folder | download
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
# Generated automatically from Makefile.in by configure.
# $Id: s.Makefile.in 1.35 01/03/26 17:10:24+02:00 neumann@mohegan.wu-wien.ac.at $
#
XOTCLVERSION=0.85
#
# prefix where XOTcl is installed
#
prefix = 	/usr
exec_prefix=	/usr
INST_XOLIBPKG=	$(prefix)/lib/xotcl-$(XOTCLVERSION)
INST_XOTCLSH=	$(exec_prefix)/bin
INST_XOWISH=	$(exec_prefix)/bin
INST_XOLIB=	$(prefix)/lib
XOTCLSHF=       $(INST_XOTCLSH)/xotclsh-$(XOTCLVERSION)
XOTCLSH=        $(INST_XOTCLSH)/xotclsh
XOWISHF=        $(INST_XOTCLSH)/xowish-$(XOTCLVERSION)
XOWISH=         $(INST_XOTCLSH)/xowish
#
# name of the xotcl full tree and of its subirs
#
XOTCL= xotcl-0.85
XOTCL_HOME=xotcl-0.85.3
XOTCL-SRC=src
XOTCL-LIB=lib
XOTCL-APPS=apps
GDBM-DIR= $(XOTCL-LIB)/store/XOTclGdbm
SDBM-DIR=$(XOTCL-LIB)/store/XOTclSdbm
EXPAT-DIR=$(XOTCL-LIB)/xml/TclExpat-1.1/
#
# doc dir, documentation tool command and files that 
# should be automatically documented
#
DOCDIR = doc
DOCCMD = lib/system/makeDoc.xotcl $(DOCDIR)
DOCFILES = doc/langRef.xotcl lib/system/*.xotcl \
	apps/scripts/*.xotcl \
	apps/comm/[flsw]*.xotcl \
	apps/actiweb/univ/UNIVERSAL.xotcl \
	apps/utils/xo-*[a-z0-8] \
	lib/comm/*.test \
	lib/store/*.xotcl lib/store/*.test \
	lib/script-creation/Serializer.xotcl 

# Top-level directory in which to install manual entries:
MAN_INSTALL_DIR = $(prefix)/man
# Directory in which to install manual entry for tclsh:
MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1

# for bitkeeper
.SCCS_GET:
	bk get -q $@
GET=bk get -S
#%.xotcl %.in:
#	$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $@

CC=		cc
AC_FLAGS =       -DHAVE_UNISTD_H=1 -DHAVE_MEMORY_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_FCNTL_H=1  
CFLAGS=		${CFLAGS_OPTIMIZE} -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES -I/usr/include/tcl8.3/tcl-private $(AC_FLAGS)  -DXOTCLVERSION=\\\"$(XOTCLVERSION)\\\" $(DMALLOC_DEFINES)
SHLIB_LD=	cc -shared
SHLIB_CFLAGS=	-fPIC
SHLIB_SUFFIX=	.so
SHLD_FLAGS=	
DL_LIBS=	-ldl
BUILD_GDBM=	no
#
# targets
#
all: config xotcl packages doc end

packages: xotclsh sdbm gdbm expat
	(cd $(XOTCL-LIB); ./system/make.xotcl -target $(INST_XOLIBPKG) -all)

end:
	@echo "" 
	@echo "************************************************************"
	@echo " Make completed."
	@echo ""
	@echo " In order to test XOTcl, invoke:"
	@echo "   make test"
	@echo ""
	@echo " In order install XOTcl, invoke:"
	@echo "   make install"
	@echo "************************************************************"



##### build targets
xotclsh: 
	@(cd $(XOTCL-SRC); $(MAKE) xotclsh)

libs: 
	@(cd $(XOTCL-SRC); $(MAKE) libs)

xotcl: 
	@(cd $(XOTCL-SRC); $(MAKE))

config: configure config.status 

configure: configure.in
	rm -f config.*
	autoconf

config.status: Makefile.in configure 
	./configure


##### sdbm
sdbm:
	@(cd $(SDBM-DIR) ; \
	$(MAKE) prefix=$(prefix) exec_prefix=$(exec_prefix) \
		CC="$(CC)" CFLAGS="$(CFLAGS)" SHLIB_LD="$(SHLIB_LD)")
clean::
	(cd $(SDBM-DIR) ; $(MAKE) clean)

##### gdbm
gdbm:
	@if test "$(BUILD_GDBM)" = "yes" ; then \
		(cd $(GDBM-DIR) ; \
		$(MAKE) prefix=$(prefix) exec_prefix=$(exec_prefix) \
			CC="$(CC)" CFLAGS="$(CFLAGS)" SHLIB_LD="$(SHLIB_LD)") \
	fi
clean::
	(cd $(GDBM-DIR) ; $(MAKE) clean)

##### expat
expat:
	@(cd $(EXPAT-DIR); \
	$(MAKE) TCL_PREFIX=$(prefix) TCL_EXEC_PREFIX=$(exec_prefix) \
		TCL_SHLIB_CFLAGS="$(SHLIB_CFLAGS)" \
		TCL_SHLIB_LD="$(SHLIB_LD)" )
clean::
	(cd $(EXPAT-DIR); $(MAKE) clean)

##### maintenance targets

clean:: 
	(cd $(XOTCL-SRC); $(MAKE) clean)
	(cd $(XOTCL-APPS); $(MAKE) clean)
	rm -f *~ config.* 

test: xotclsh
	./src/xotclsh lib/system/speedtest.xotcl
	./src/xotclsh lib/system/testx.xotcl
	./src/xotclsh lib/system/testo.xotcl
	(cd lib;  ./system/make.xotcl -target $(INST_XOLIBPKG) -test)

install: xotcl doc
	(cd $(XOTCL-LIB); ./system/make.xotcl -target $(INST_XOLIBPKG) -install)
	(cd $(XOTCL-SRC); $(MAKE) install  install_xowish)
	@if test ! -d $(INST_XOLIBPKG)/$(DOCDIR); then mkdir $(INST_XOLIBPKG)/$(DOCDIR); fi
	cp $(DOCDIR)/*.html $(DOCDIR)/*.gif $(DOCDIR)/*.jpg \
		ChangeLog README COMPILE COMPILE.win \
		$(INST_XOLIBPKG)/$(DOCDIR)
	@for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) ; do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir -p $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	    done;
	@echo "Installing top-level (.1) man-pages";
	    rm -f $(MAN1_INSTALL_DIR)/xotclsh.1;
	    rm -f $(MAN1_INSTALL_DIR)/xowish.1;
	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
		    man/xotclsh.1 > $(MAN1_INSTALL_DIR)/xotclsh.1;
	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
		    man/xowish.1 > $(MAN1_INSTALL_DIR)/xowish.1;
	    chmod 444 $(MAN1_INSTALL_DIR)/xotclsh.1;
	    chmod 444 $(MAN1_INSTALL_DIR)/xowish.1;
	for i in xo-whichPkg xo-daemon ; do \
		echo "#!$(XOTCLSH)" > "$(INST_XOTCLSH)/$$i" ;\
		cat apps/utils/$$i >> "$(INST_XOTCLSH)/$$i" ; \
		chmod +x "$(INST_XOTCLSH)/$$i"; \
	done


doc: xotclsh $(DOCFILES)
	./src/xotclsh $(DOCCMD) $(DOCFILES)

bin-tar: install
	(cd ..; tar zcvf xotcl-$(XOTCLVERSION)-bin-linux-i686-glibc.tar.gz \
		`find $(XOTCLSH) $(XOTCLSHF) $(XOWISH) $(XOWISHF) \
		$(INST_XOLIBPKG) \
		-type f -o -type l | fgrep -v submissions | fgrep -v CVS | fgrep -v SCCS | fgrep -v .junk| fgrep -v .db | fgrep -v "~" | fgrep -v "#"` \
	)

only-bin-tar: install
	(cd ..; tar zcvf xotcl-$(XOTCLVERSION)-binaries-linux-i686-glibc.tar.gz \
		`find $(XOTCLSH) $(XOTCLSHF) $(XOWISH) $(XOWISHF) \
		$(INST_XOLIBPKG) \
		-type f -o -type l | fgrep -v submissions | fgrep -v CVS | fgrep -v SCCS | fgrep -v .junk| fgrep -v .db | fgrep -v "~" | fgrep -v "#"` \
	)
src/COPYRIGHT: COPYRIGHT
	@for d in src lib/system apps doc \
		lib lib/awo lib/mos lib/comm \
		lib/patterns lib/rdf lib/store \
		lib/xml lib/script-creation \
		lib/registry ; do \
		cp COPYRIGHT $$d; \
	done

tar: clean src/COPYRIGHT
	(cd ..;tar cvf $(XOTCL_HOME)-src.tar \
		$(XOTCL_HOME)/src/Makefile.in \
		$(XOTCL_HOME)/src/Makefile.vc \
		$(XOTCL_HOME)/src/Makefile.win \
		$(XOTCL_HOME)/src/appendPkgIndex.xotcl \
		$(XOTCL_HOME)/src/dllEntryPoint.c \
		$(XOTCL_HOME)/src/mk_predefined.xotcl \
		$(XOTCL_HOME)/src/pkgIndex-xotcl.add \
		$(XOTCL_HOME)/src/pkgIndex-xotcl.add.in \
		$(XOTCL_HOME)/src/predefined.h \
		$(XOTCL_HOME)/src/predefined.xotcl \
		$(XOTCL_HOME)/src/winMain.c \
		$(XOTCL_HOME)/src/winDumpExts.c \
		$(XOTCL_HOME)/src/xotcl.c  \
		$(XOTCL_HOME)/src/xotcl.h \
		$(XOTCL_HOME)/src/xotclAppInit.c \
		$(XOTCL_HOME)/src/xotclError.c \
		$(XOTCL_HOME)/src/xotclInt.h \
		$(XOTCL_HOME)/src/xotclProfile.c \
		$(XOTCL_HOME)/src/xotclMetaData.c \
		$(XOTCL_HOME)/src/xotclReference.c \
		$(XOTCL_HOME)/src/xotclTrace.c \
		$(XOTCL_HOME)/src/xotclWinMain.c \
		$(XOTCL_HOME)/src/xotkAppInit.c \
		$(XOTCL_HOME)/src/aolstub.c \
	)
	(cd ..; tar cvf $(XOTCL_HOME)-lib.tar \
		`find $(XOTCL_HOME)/$(XOTCL-APPS) \
		$(XOTCL_HOME)/$(XOTCL-LIB) \
		$(XOTCL_HOME)/COPYRIGHT \
		$(XOTCL_HOME)/README \
		$(XOTCL_HOME)/COMPILE \
		$(XOTCL_HOME)/COMPILE.win \
		$(XOTCL_HOME)/installWin.tcl \
		$(XOTCL_HOME)/ChangeLog \
		$(XOTCL_HOME)/configure.in \
		$(XOTCL_HOME)/configure \
		$(XOTCL_HOME)/Makefile \
		$(XOTCL_HOME)/Makefile.vc \
		$(XOTCL_HOME)/Makefile.vc.in \
		$(XOTCL_HOME)/Makefile.in \
		$(XOTCL_HOME)/xotcl.spec.in \
		$(XOTCL_HOME)/doc/cascaded-message-filter.gif \
		$(XOTCL_HOME)/doc/features.gif \
		$(XOTCL_HOME)/doc/filter-inheritance.gif \
		$(XOTCL_HOME)/doc/tutorial.html \
		$(XOTCL_HOME)/doc/langRef.xotcl \
		$(XOTCL_HOME)/doc/logo-100.jpg \
		$(XOTCL_HOME)/doc/next-path-mixin-movement.gif \
		$(XOTCL_HOME)/doc/next-path.gif \
		$(XOTCL_HOME)/doc/obj_class_system.gif \
		$(XOTCL_HOME)/man/xotclsh.1 \
		$(XOTCL_HOME)/man/xowish.1 \
		$(XOTCL_HOME)/man/man.macros \
		$(XOTCL_HOME)/install-sh \
		-type f | fgrep -v submissions | fgrep -v CVS | fgrep -v SCCS | fgrep -v Attic | fgrep -v "~"|fgrep -v .db | fgrep -v "#" | grep -v "/o$$"` \
	)
	(cd ..; \
		tar Avf $(XOTCL_HOME).tar $(XOTCL_HOME)-src.tar; \
		tar Avf $(XOTCL_HOME).tar $(XOTCL_HOME)-lib.tar; \
		gzip -9 --force $(XOTCL_HOME).tar; \
		rm $(XOTCL_HOME)-src.tar; \
		rm $(XOTCL_HOME)-lib.tar; \
	)

RPMSOURCES=/usr/src/redhat/SOURCES
RPMSPECS=/usr/src/redhat/SPECS
rpm: tar
	@if test ! -d $(RPMSOURCES); then mkdir -p $(RPMSOURCES); fi
	@if test ! -d $(RPMSPECS); then mkdir -p $(RPMSPECS); fi
	cp ../xotcl-$(XOTCLVERSION).tar.gz  $(RPMSOURCES)
	cp xotcl.spec $(RPMSPECS)/xotcl-$(XOTCLVERSION).spec
	rpm -ba $(RPMSPECS)/xotcl-$(XOTCLVERSION).spec