File: Makefile

package info (click to toggle)
ted 2.11-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 11,064 kB
  • ctags: 13,935
  • sloc: ansic: 120,446; makefile: 7,469; sh: 253
file content (224 lines) | stat: -rw-r--r-- 5,257 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
####
####	Makefile for Ted
####	================
####
####	No explicit 'configure' is needed as it is done by the 'make' process
####	for the various targets.
####
####	Sensible targets are:
####	---------------------
####
####	compile:	Just build an executable in the 'Ted' directory.
####	private:	Install the Ted executable and the most essential
####			files for yourself only.
####	package:	Build a package. Must be run as root.
####	install:	Install the package. Must be run as root.
####	clean:		Cleanup rubbish from previous attempts.
####
####	compile.shared:	Compile, do not try to link statically.
####	package.shared:	Build a package, using the dynamically linked
####			executable.
####	install.shared:	Install the package. Must be run as root.
####			Installs the package just made, does not force
####			the package to be dynamically linked. This target
####			exists only for convenience.
####
####	Actively supported 'configure' options are:
####	-------------------------------------------
####
####		--prefix		Use another place than /usr/local
####					for installation. E.G.
####					--prefix=/opt/Ted
####		--with-MOTIF		Use the Motif gui toolkit. (The
####					default)
####		--with-GTK		Use the Gtk+ gui toolkit. (Still
####					experimental)
####
####
####
####	P.S.	To port to Compaq OpenVMS, use the files in vms_files.tar.
####		It contains an explanatory note as well.
####
####	P.S.	I admit that this makefile is more like a shell script.
####

CONFIGURE_OPTIONS=--with-MOTIF

compile:	tedlibs		\
		Ted/Ted		\
		Ted/Ted.static
	:
	: Static executable Ted/Ted.static ready
	: *   To make an installation package
	:     you can now run 'make package' AS ROOT
	: *   To install Ted for yourself only
	:     you can now run 'make private'

compile.shared:	tedlibs		\
		Ted/Ted
	:
	: Dynamic executable Ted/Ted ready
	: *   To make an installation package
	:     you can now run 'make package.shared' AS ROOT
	: *   To install Ted for yourself only
	:     you can now run 'make private'

####
####	Make library directory.
####

lib:
	mkdir lib

####
####	Build ted libraries
####
tedlibs: 	lib		\
		lib/bitmap.a	\
		lib/ind.a	\
		lib/reg.a	\
		lib/appUtil.a	\
		lib/appFrame.a

####
####	Compile the bitmap manipulation library
####

lib/bitmap.a: bitmap/makefile
	cd bitmap && make

bitmap/makefile: bitmap/makefile.in
	cd bitmap && ./configure $(CONFIGURE_OPTIONS)

####
####	Compile the spell checker library
####

lib/ind.a: ind/makefile
	cd ind && make

ind/makefile: ind/makefile.in
	cd ind && ./configure $(CONFIGURE_OPTIONS)

####
####	Compile the regular expression library
####

lib/reg.a: libreg/makefile
	cd libreg && make

libreg/makefile: libreg/makefile.in
	cd libreg && ./configure $(CONFIGURE_OPTIONS)

####
####	Compile the application utility library
####

lib/appUtil.a: appUtil/makefile
	cd appUtil && make

appUtil/makefile: appUtil/makefile.in
	cd appUtil && ./configure $(CONFIGURE_OPTIONS)

####
####	Compile the application framework library
####

lib/appFrame.a: appFrame/makefile
	cd appFrame && make

appFrame/makefile: appFrame/makefile.in
	cd appFrame && ./configure $(CONFIGURE_OPTIONS)

####
####	Compile and link Ted
####

Ted/Ted.static: tedlibs Ted/makefile
	cd Ted && make Ted.static

Ted/Ted: tedlibs Ted/makefile
	cd Ted && make

Ted/makefile: Ted/makefile.in
	cd Ted && ./configure $(CONFIGURE_OPTIONS)

####
####	Make a ready to install package
####	Must be run as root
####

package: tedPackage/makefile compile
	cd tedPackage && make
	:
	: Package ready.
	: To install Ted, you can now run 'make install' AS ROOT

package.shared: tedPackage/makefile compile.shared
	cd tedPackage && make package.shared
	:
	: Dynamically linked package ready.
	: To install Ted, you can now run 'make install' AS ROOT

tedPackage/makefile: tedPackage/makefile.in
	cd tedPackage && ./configure $(CONFIGURE_OPTIONS)

####
####	Install Ted from the package just built
####

install: package
	sh ./tedPackage/installTed.sh

install.shared: package.shared
	sh ./tedPackage/installTed.sh

####
####	Install Ted for yourself
####

PRIVATE_FILES=\
	$(HOME)/afm/Helvetica.afm		\
	$(HOME)/afm/Courier.afm			\
	$(HOME)/afm/Symbol.afm			\
	$(HOME)/afm/Times-Roman.afm		\
	$(HOME)/Ted/TedDocument-en_US.rtf	\
	$(HOME)/Ted/Ted.ad.sample		\
	$(HOME)/ind/US_English.ind

$(HOME)/bin/Ted: Ted/Ted
	test -d $(HOME)/bin || mkdir $(HOME)/bin
	cp Ted/Ted.static $(HOME)/bin/Ted || cp Ted/Ted $(HOME)/bin/Ted

$(PRIVATE_FILES):
	h=`pwd` && cd && tar xvf $$h/tedPackage/TedBindist.tar

private: $(HOME)/bin/Ted $(PRIVATE_FILES)
	@echo ========= Include the following in $(HOME)/.Xdefaults =========
	@echo Ted.documentFileName: $(HOME)/Ted/TedDocument-en_US.rtf
	@echo Ted.afmDirectory: $(HOME)/afm
	@echo Ted.spellToolSystemDicts: $(HOME)/ind

####
####	Cleanup
####

clean:
	rm -fr	lib
	rm -f	*/config.cache */config.log */config.status
	rm -f	appUtil/appUtilConfig.h
	rm -f	appFrame/appFrameConfig.h
	rm -f	Ted/tedConfig.h
	rm -f	ind/indConfig.h
	rm -f	bitmap/bitmapConfig.h
	rm -f	*/makefile
	rm -f	*/*.o
	rm -f	Ted/Ted Ted/Ted.static
	rm -fr	tedPackage/scratch
	rm -f	tedPackage/*.gz
	rm -f	tedPackage/*.lsm
	rm -f	tedPackage/installTed.sh
	rm -f	tedPackage/README
	rm -f	tedPackage/package
	rm -f	tedPackage/package.shared