File: Makefile

package info (click to toggle)
tkman 2.0.6-3
  • links: PTS
  • area: non-free
  • in suites: hamm, slink
  • size: 876 kB
  • ctags: 296
  • sloc: tcl: 7,327; makefile: 250; sh: 6
file content (515 lines) | stat: -rw-r--r-- 18,666 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
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
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
#
# Makefile for TkMan
#    Tom Phelps (phelps@ACM.org)
#
# You also need the companion filter PolyglotMan, available from:
#    ftp://ftp.cs.berkeley.edu/ucb/people/phelps/tcltk/rman.tar.Z
# YOU MUST BY APPLY THE ELIDED TEXT PATCH IN FILE "elide.patch",
#    which is included with the TkMan distribution, to Tk 8.0.
#    This enhanced version of Tk is 100% compatible with the unenhanced version,
#    version, so you only need one installation of Tcl/Tk (the new -elide
#    option would have generated an error in the old version).
#    `patch' is useful for applying the elided text patch, to wit:
#	patch -d .../tk8.0/generic < elide.patch
#    If the patch program of your local flavor of UNIX doesn't seem to work,
#	try the GNU version of patch.
#    (I did request that the patch be incorporated into the Tk core--
#     it is broadly useful, small, high performance, memory leak free, 
#     100% compatible, and hard to replicate its effects in existing Tcl/Tk--
#     but to no avail.  If you want to voice your support, the most
#     appropriate place appears to be sunscript-core@sunscript.sun.com.)
# Users of the 4Dwm window manager on SGI Irix 6.3 and 6.4 should delete or comment out
#    the following line at around line 67 of gui.tcl:
#	wm protocol $w WM_SAVE_YOURSELF "$w.quit invoke"
#
#
#   It's helpful to read the README file first.
#   You should read over *all* parts of this file,
#      down to the "you shouldn't modify" line.
#   If you make tkman (`tkman'--all lowercase--refers to the 
#      executable) and subsequently find you need to change variables 
#      in the Makefile, make sure that these changes aren't being 
#      overridden in ~/.tkman.
#   Don't forget the interesting extensions in the contrib directory.
#



# required minimum versions of Tcl and Tk, for your information (don't modify these values)
# Don't to forget to apply the elided text patch in elide.patch to the Tk sources.
mintcl = 8.0
mintk = 8.0



### you need to localize the paths on these lines

#WISH = /usr/sww/tcl-8.0/bin/wish
#WISH = /private/share/bin/wish
#WISH = /usr/local/bin/wish8.0
WISH=/usr/bin/wish8.0

# the executable `tkman' is placed in BINDIR
# this should be a directory that's in your bin PATH
#BINDIR = /private/share/bin
#BINDIR = /usr/local/bin
BINDIR = $(prefix)/usr/bin

# OPTIONAL
# directory in which to make Texinfo summary databases/indexes and find file
# "dir.tkman" that points to Texinfo source files (which may be compressed).
# (Follow pattern in sample "dir.tkman".)
# This directory should not have any Texinfo source itself.
# More information is given in tkman-help.html
# if you don't have Texinfo files, leave this variable empty
texinfodir = ""
#texinfodir = /home/orodruin/h/bair/phelps/spine/tkman/info
#texinfodir = /usr/local/info
# In order to search within Texinfo files you need the GNU gzgrep,
# which can search within compressed files.  This should drive a version
# of GNU grep (or gzgrep, if you'll be searching in compressed files)
# such as 2.1, for which the -b (report byte offset) switch works.
gzgrep = "zgrep"
#gzgrep = gzgrep
#gzgrep = "gzgrep -w"


# OPTIONAL
# directory root of hierarchy of RFC files, with "rfc-index.txt" at the root
# This may just be a convention at my site.  
# If this makes no sense to you, ignore it without a second thought.
rfcdir = ""
#rfcdir = /usr/sww/doc/RFC


# OPTIONAL
# if you want to show man page version difference based on RCS
# information, create an RCS directory in the same directory as the pages
# and create revision files for those selected pages
# More information is given in tkman-help.html


# Since manual pages and their corresponding binaries (if applicable) can be
# scattered hither and yon in a file system, it would be nice to know about 
# them if a search came up empty.  The following is a list of directories TkMan
# will examine for matches if a search in the usual locations fails while searching
# for a man pages and displaying its associated binaries (if any).
# Use this feature carefully as a large number of directories can slow down startup.
mastermen = "/usr/man /usr/local/man"
#mastermen = "/usr/man /usr/local/man /usr/sww/man /usr/share/man /usr/kerberos/man"
masterbin = "/usr/bin /usr/local/bin"
#masterbin = "/usr/bin /usr/local/bin /usr/sww/bin /usr/sww/share/bin /usr/sww/share/X11R5/bin"


# names of common printers, in addition to default printer (PRINTER or LPDEST)
# (individual users can edit this list in the Preferences panel)
printers = ""
#printers = "lws483a kp"


# list of font dpi's generated in the X server (see xlsfonts(1))
# At startup, TkMan will compute the screen DPI and use the font
# at the closest DPI in this list
dpis = "75 100"


# # # MACHINE DEPENDENCIES # # #

#manformat = {tbl | neqn | nroff -man }
# col performs the line overlays implied by reverse line-feeds,
# but seems to kill international characters, such as u-with-umlaut
#manformat = {tbl | neqn | nroff -man | col }
# ALTERNATIVES
#manformat = {groff -Tascii -te -man}
#manformat = {groff -Tlatin1 -te -man}
# Marco Melgazzi (marco@techie.com) prefers LONGER MAN PAGE LINES.
# The following line adds an entry in Preferences/See to set the length.
# You must use groff and the "/tmp/ll" path for this feature to take effect.
# lines are cached in .../man/cat<n>@<line-length>; 
#   that is, the line length is appended to the usual cache directory names
#manformat = {groff -te -Tascii -man /tmp/ll - 2>/dev/null}
manformat = {groff -te -Tlatin1 -man /tmp/ll - 2>/dev/null}
# Ultrix users should uncomment the following line (you don't have eqn)
#manformat = {tbl | nroff -man }
# BSD macros (.Sh, .Ss, .PP, ...) call for -mandoc
#manformat = {groff -Tascii -te -mandoc}
# BSDI
#manformat = {tbl | eqn -Tascii | nroff -man }


# if you have GNU's zip, use it!
# Especially if you're working in a herterogeneous environment.
# gzip works everywhere and produces the smallest compressed files.
# (give gzip -q option because we don't want a GZIP environment variable
#  with -v spitting out non-error statistics to stderr)

zcat = "gzip -dcfq"
compress = "gzip -9qn"
zlist = {gz z Z}

# If you don't have gzip try these:

# SGI users can use pcat instead of gzcat (though gzcat works great)
#zcat = pcat
#compress = "pack -f"
#zlist = z

# HP-UX needs these variations, if gzip isn't available
#zcat = "zcat < "
#compress = compress
#zlist = Z

# if nothing else, use these
#zcat = zcat
#compress = compress
#zlist = Z


# pick a printing pipeline for which your platform has all the constituants
manprint = {groff -man -Tps -te -l}
# alternatives
#manprint = {tbl | eqn | troff -man -t | lpr -t}
#manprint = {tbl | eqn | psroff -man}
#manprint = {tbl | eqn | gtroff -Tpsc | psdit | lpr}
# printing string for preformatted pages without [tn]roff source
catprint = lpr
#catprint = "lpr -h"
#catprint = enscript


shortnames = 0
# if you have an old UNIX with short limit to file name length
#shortnames = 1


# almost always, name of section starts at index three (zero-based), in form "man<name>"
dirnameindex = 3
# apparently SCO names it man directories "man.<name>"
#dirnameindex = 4



# # # GLIMPSE # # # 

# OPTIONAL
# Add full text search of manual pages with Glimpse.
# For more information about Glimpse see http://glimpse.cs.arizona.edu/
# or ftp the glimpse software from ftp.cs.arizona.edu:/glimpse
# Glimpse uses indexes of only "2-5%" of the size of the original text,
# indexes that are shared just like the man pages they index,
# and TkMan automates the process of creating the index files,
# so how can you lose?

# BY DEFAULT ON (Boolean scope set to entire file)
#glimpse = "glimpse -W"
# IF YOU DON'T WANT TO BOTHER WITH GLIMPSE, you can disable it here
glimpse = ""
# give the full path, if you'd like
#glimpse = /usr/sww/bin/glimpse
# variations (refer to the Glimpse manual page)
# no characters treated as meta characters:
#glimpse = "glimpse -Wk"

# glimpseindex indexes the manual pages, for each component of one's MANPATH,
# and places the results in a set of files named .glimpse_* in that MANPATH
# component directory.
#
# To create the necessary indexes, simply start up TkMan and
# choose `Rebuild Glimpse Database' under the Occasionals (named `...') menu.
#
# Refer to the Glimpse manual page for more information.
# Before reporting a problem with indexing under TkMan, turn on debugging
# (`-debug' option), obtain the problemmatic glimpseindex command,
# and make sure it works when executed by hand.

# Produce a larger index ("7-9%" of source text) allowing faster search w/"-o"
# You need either -o or -b in any set of glimpseindex options
#glimpseindex = "glimpseindex -o -B"
# To shorten most index build times by incrementally building index when possible.
# For me, this drops indexing time from ~25 minutes to ~3 minutes, depending
#glimpseindex = "glimpseindex -o -B -f"
# if you don't want give the power to index, disable glimpseindex here
glimpseindex = ""
#glimpseindex = "/usr/sww/bin/glimpseindex -o -B"

# directory in which to place stray man directories added with manDescAdd
# that don't correspond to a directory in MANPATH
# This can't be the same as a component in MANPATH.
glimpsestrays = /tmp
#glimpsestrays = $$env(HOME)/tmp
#glimpsestrays = /private

# By default Glimpse indexes are placed in the same directory trees as the pages
# they index.  This way indexes can be shared.  If you don't have permission
# to write in these directories, comment in "unified" below and the glimpsestrays
# directory given above (which should be writable) will hold a single index 
# of all pages.
indexglimpse = "distributed"
#indexglimpse = "unified"



# # # PUBLIC INSTALLATION # # #

# default MANPATH to use if user doesn't have a MANPATH environment variable set.
# Leave this empty to have TkMan calculate a MANPATH based on a users PATH
# (like Perl man does).
manpathdef = ""
#manpathdef = /usr/man:/usr/local/man
#manpathdef = /usr/man:/usr/local/man:/usr/sww/man:/usr/sww/X11/man
# for SGI
#manpathdef = /usr/share/catman:/usr/share/man:/usr/catman:/usr/man


# If a new user--as indicated by the lack of a ~/.tkman file--runs TkMan,
# you can execute some Tcl code of your own design to customize his 
# environment for the local site.
newuser = ""
#newuser = "exec cp /usr/local/lib/tkman-new.tcl $$env(HOME)/.tkman"
#newuser = "source /usr/local/lib/tkman-new.tcl"



# # # these lines are probably fine

co = co
rlog = rlog
#cksum = cksum
cksum = md5sum
rcsdiff = rcsdiff
vdiff = diff
# GNU diff can find a more minimal set of differences, though it may take longer
#vdiff = {gdiff -Bwd}
# do not use GNU's wdiff.  I tried to use it to generate more precise
# change information, but it has a bug with (not) associating newlines with old text


# if you don't want to put RosettaMan (rman) in your PATH, make the name fully qualified
# (that's probably a good idea if `tkman' is installed on a central server)
# RosettaMan is available from ftp://ftp.cs.berkeley.edu/ucb/people/phelps/tcltk/rman.tar.Z
rman = rman
#rman = /private/phelps/bin/rman

apropos = {man -k}
# Linux uses a shell script instead:
#apropos = apropos

catsig = {cat[^/]+(/[^/]+)?$$}
# if your flavor of UNIX puts formatted man pages in directories
# ending in manX rather than catX, uncomment the following line
#catsig = {.*}



#
# variables used in this Makefile only and not propagated to executable
#

CP = cp
# or you can use GNU's cp and backup files that are about to be overwritten
#CP = cp -b


#--------------------------------------------------
#
# you shouldn't modify anything below here
#
#--------------------------------------------------

version = 2.0.6

tkman = tkman-$(version)
srcs =	gui.tcl prefs.tcl highlights.tcl version.tcl glimpse.tcl stats.tcl \
	manualpage.tcl database.tcl manpath.tcl tkmandesc.tcl \
	texi.tcl bmb.tcl \
	tkman.tcl
#prof.tcl -- triggers compiler bug?
objs = tkman
libs = searchbox.tcl taputils.tcl
aux = ANNOUNCE-tkman README-tkman Makefile CHANGES scripthead info/dir.tkman elide.patch retkman.tcl
help = tkman-help.html tkman-help.tcl
distrib = $(srcs) $(libs) xbm $(aux) contrib $(help)

all: tkman retkman
	@echo
	@echo 'TkMan is compiled in the current directory.'
	@echo 'You can test it by typing "./tkman".'
	@echo 'To install it and the man page, type "make install".'
	@echo


# Concatenate everything into a single script so we don't have to worry about library paths.
# Even with Tcl compiler need to retain comment zapping, 
# since we want lines that look like comments to be stripped and these can occur, 
# say, in the middle of lists
tkman: $(srcs) $(libs) Makefile
	cat scripthead > tkman
	echo 'exec $(WISH) $$0 $${1+"$$@"}' >> tkman
	echo 'set manx(version) $(version)' >> tkman
	echo 'set manx(mintcl) $(mintcl)' >> tkman
	echo 'set manx(mintk) $(mintk)' >> tkman
	echo 'set manx(newuser) $(newuser)' >> tkman
	echo 'set manx(dirnameindex) $(dirnameindex)' >> tkman
	echo 'set manx(mastermen) $(mastermen)' >> tkman
	echo 'set manx(masterbin) $(masterbin)' >> tkman
	echo 'set manx(manpathdef) $(manpathdef)' >> tkman
	echo 'set man(zcat) $(zcat)' >> tkman
	echo 'set man(compress) $(compress)' >> tkman
	echo 'set man(apropos) $(apropos)' >> tkman
	echo 'set man(glimpse) $(glimpse)' >> tkman
	echo 'set man(glimpseindex) $(glimpseindex)' >> tkman
	echo 'set man(glimpsestrays) $(glimpsestrays)' >> tkman
	echo 'set man(indexglimpse) $(indexglimpse)' >> tkman
	echo 'set man(texinfodir) $(texinfodir)' >> tkman
	echo 'set man(gzgrep) $(gzgrep)' >> tkman
	echo 'set man(rfcdir) $(rfcdir)' >> tkman
	echo 'set man(format) $(manformat)' >> tkman
	echo 'set man(printers) $(printers)' >> tkman
	echo 'set manx(dpis) $(dpis)' >> tkman
	echo 'set man(print) $(manprint)' >> tkman
	echo 'set man(cksum) $(cksum)' >> tkman
	echo 'set man(zlist) $(zlist)' >> tkman
	echo 'set man(co) $(co)' >> tkman
	echo 'set man(rlog) $(rlog)' >> tkman
	echo 'set man(rcsdiff) $(rcsdiff)' >> tkman
	echo 'set man(vdiff) $(vdiff)' >> tkman
	echo 'set manx(rman) $(rman)' >> tkman
	echo 'set man(catprint) $(catprint)' >> tkman
	echo 'set man(catsig) $(catsig)' >> tkman
	echo 'set man(shortnames) $(shortnames)' >> tkman
	echo 'set manx(changes) {' >> tkman
	cat CHANGES >> tkman
	echo '}' >> tkman
	echo 'proc manHelpDump {t} {' >> tkman
	cat tkman-help.tcl >> tkman
	echo '}' >> tkman
	echo 'image create bitmap icon -foreground black -background white -data {' >> tkman
	cat contrib/tkman.bitmap >> tkman
	echo '}' >> tkman
	echo 'image create bitmap face -foreground black -background white -data {' >> tkman
	cat xbm/face.xbm >> tkman
	echo '}' >> tkman
	echo 'image create bitmap opened -foreground black -background {} -data {' >> tkman
	cat xbm/opened.xbm >> tkman
	echo '}' >> tkman
	echo 'image create bitmap closed -foreground black -background {} -data {' >> tkman
	cat xbm/closed.xbm >> tkman
	echo '}' >> tkman
	echo 'image create bitmap sections -foreground black -background {} -data {' >> tkman
	cat xbm/sect.xbm >> tkman
	echo '}' >> tkman
	echo 'image create bitmap history -foreground black -background {} -data {' >> tkman
	cat xbm/history.xbm >> tkman
	echo '}' >> tkman
	echo 'image create bitmap random -foreground black -background {} -data {' >> tkman
	cat xbm/random.xbm >> tkman
	echo '}' >> tkman
	echo 'set manx(rebus) file|text|home|directory|disk|mail|Macintosh|TeX' >> tkman
	echo 'image create bitmap fileRebus -foreground black -background {} -data {' >> tkman
	cat xbm/file.xbm >> tkman
	echo '}' >> tkman
	echo 'image create bitmap diskRebus -foreground black -background {} -data {' >> tkman
	cat xbm/disk_tiny.xbm >> tkman
	echo '}' >> tkman
	echo 'image create bitmap homeRebus -foreground black -background {} -data {' >> tkman
	cat xbm/woodhouse.xbm >> tkman
	echo '}' >> tkman
	echo 'image create bitmap textRebus -foreground black -background {} -data {' >> tkman
	cat xbm/text.xbm >> tkman
	echo '}' >> tkman
	echo 'image create bitmap directoryRebus -foreground black -background {} -data {' >> tkman
	cat xbm/file_dir.xbm >> tkman
	echo '}' >> tkman
	echo 'image create bitmap mailRebus -foreground black -background {} -data {' >> tkman
	cat xbm/mail.xbm >> tkman
	echo '}' >> tkman
	echo 'image create bitmap macintoshRebus -foreground black -background {} -data {' >> tkman
	cat xbm/mac.xbm >> tkman
	echo '}' >> tkman
	echo 'image create bitmap texRebus -foreground black -background {} -data {' >> tkman
	cat xbm/tex.xbm >> tkman
	echo '}' >> tkman
	echo 'set manx(solaris-bindings) {' >> tkman
	cat contrib/solaris_bindings.tcl >> tkman
	echo '}' >> tkman
	echo 'set manx(solaris25-bindings) {' >> tkman
	cat contrib/solaris25_bindings.tcl >> tkman
	echo '}' >> tkman
	echo 'set manx(solaris26-bindings) {' >> tkman
	cat contrib/solaris26_bindings.tcl >> tkman
	echo '}' >> tkman
	echo 'set manx(irix-bindings) {' >> tkman
	cat contrib/irix_bindings.tcl >> tkman
	echo '}' >> tkman
	echo 'set manx(sco-bindings) {' >> tkman
	cat contrib/sco_bindings.tcl >> tkman
	echo '}' >> tkman
	sed -e 's/^[	 ]*//' -e '/^#/d' $(libs) $(srcs) >> tkman
	chmod +x tkman

retkman: retkman.tcl Makefile
	cat scripthead > retkman
	echo 'exec $(WISH) $$0 $${1+"$$@"}' >> retkman
	cat retkman.tcl >> retkman
	chmod +x retkman

install: tkman retkman
	$(CP) tkman $(BINDIR)
	chmod +rx $(BINDIR)/tkman
	$(CP) retkman $(BINDIR)
	chmod +rx $(BINDIR)/retkman
	@echo 'You also need RosettaMan to run TkMan.'
	@echo 'Have you installed the elided text patch to Tk?'

test: dox tkman
	cp tkman $(BINDIR)
	tkman -noiconify -debug

sww:
	rm -f tkman $(wildcard ~/bin/tkman)
	tkman

patch:
	cd ../patch
	rcsdiff -r3.0 -c $(wildcard RCS/tkText*) > elide.patch

dox: tkman-help.tcl CHANGES ANNOUNCE-tkman

ANNOUNCE-tkman: Announce-tkman
	sed -e /=========/,/bogusline/p -e d Announce-tkman > ANNOUNCE-tkman

tkman-help.tcl: tkman-help.html
	cat ../html/html.dtd tkman-help.html | sgmls | ../html/html2tk.pl > tkman-help.tcl

checkpoint:
	echo foreach i ($(srcs))
	echo rcsdiff $$i
	echo ci -l $$i
	echo end

wc:
	wc $(srcs)

clean:
	rm -f $(objs)

dist: dox
	rm -rf $(tkman)*
	mkdir $(tkman)
	cp -R $(distrib) $(tkman)
	rm -f $(tkman)/contrib/*~
	@echo 'gcksum crc   length name' > MANIFEST
	@echo '----------   ------ ----' >> MANIFEST
	@gcksum $(filter-out contrib, $(filter-out %~, $(distrib) $(wildcard contrib/*))) | gtee -a MANIFEST
	mv MANIFEST $(tkman)
	gtar chvf $(tkman).tar $(tkman)
	compress $(tkman).tar
#	gzip -9v $(tkman).tar
	ls -l $(tkman).tar.Z
	rm -rf $(tkman) ANNOUNCE-tkman
	@echo "*** Did you remember to ci -l first?"

uu: dist
	gznew $(tkman).tar.Z
	echo 'uudecode, gunzip (from GNU), untar' > $(tkman).tar.gz.uu
	uuencode $(tkman).tar.gz $(tkman).tar.gz >> $(tkman).tar.gz.uu