aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tf/0001-Add-DESTDIR-support.patch
blob: e45794bd4d718802ce93a480e3e066049042ceff (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
--- tf-50b8/unix/unix.mak
+++ tf-50b8.new/unix/unix.mak
@@ -87,57 +87,65 @@
 	-test -z "$(STRIP)" || $(STRIP) tf$(X) || true
 
 PREFIXDIRS:
-	test -d "$(bindir)" || mkdir $(bindir)
-	test -d "$(datadir)" || mkdir $(datadir)
 
 install_TF $(TF): tf$(X) $(BUILDERS)
-	-@rm -f $(TF)
-	cp tf$(X) $(TF)
-	chmod $(MODE) $(TF)
+	install -Dm755 tf$(X) $(DESTDIR)$(bindir)/tf
 
 SYMLINK $(SYMLINK): $(TF)
-	test -z "$(SYMLINK)" || { rm -f $(SYMLINK) && ln -s $(TF) $(SYMLINK); }
 
 LIBRARY $(TF_LIBDIR): ../tf-lib/tf-help ../tf-lib/tf-help.idx
-	@echo '## Creating library directory...'
-#	@# Overly simplified shell commands, to avoid problems on ultrix
-	-@test -n "$(TF_LIBDIR)" || echo "TF_LIBDIR is undefined."
-	test -n "$(TF_LIBDIR)"
-	test -d "$(TF_LIBDIR)" || mkdir $(TF_LIBDIR)
-	-@test -d "$(TF_LIBDIR)" || echo "Can't make $(TF_LIBDIR) directory.  See if"
-	-@test -d "$(TF_LIBDIR)" || echo "there is already a file with that name."
-	test -d "$(TF_LIBDIR)"
-#
-#	@#rm -f $(TF_LIBDIR)/*;  # wrong: this would remove local.tf, etc.
-	@echo '## Copying library files...'
-	cd ../tf-lib; \
-	for f in *; do test -f $$f && files="$$files $$f"; done; \
-	( cd $(TF_LIBDIR); rm -f $$files tf.help tf.help.index; ); \
-	cp $$files $(TF_LIBDIR); \
-	cd $(TF_LIBDIR); \
-	chmod $(MODE) $$files; chmod ugo-wx $$files
-	-rm -f $(TF_LIBDIR)/CHANGES 
-	cp ../CHANGES $(TF_LIBDIR)
-	chmod $(MODE) $(TF_LIBDIR)/CHANGES; chmod ugo-wx $(TF_LIBDIR)/CHANGES
-	chmod $(MODE) $(TF_LIBDIR)
-	-@cd $(TF_LIBDIR); old=`ls replace.tf 2>/dev/null`; \
-	if [ -n "$$old" ]; then \
-	    echo "## WARNING: Obsolete files found in $(TF_LIBDIR): $$old"; \
-	fi
-	@echo '## Creating links so old library names still work...'
-#	@# note: ln -sf isn't portable.
-	@cd $(TF_LIBDIR); \
-	rm -f bind-bash.tf;    ln -s  kb-bash.tf   bind-bash.tf;    \
-	rm -f bind-emacs.tf;   ln -s  kb-emacs.tf  bind-emacs.tf;   \
-	rm -f completion.tf;   ln -s  complete.tf  completion.tf;   \
-	rm -f factorial.tf;    ln -s  factoral.tf  factorial.tf;    \
-	rm -f file-xfer.tf;    ln -s  filexfer.tf  file-xfer.tf;    \
-	rm -f local.tf.sample; ln -s  local-eg.tf  local.tf.sample; \
-	rm -f pref-shell.tf;   ln -s  psh.tf       pref-shell.tf;   \
-	rm -f space_page.tf;   ln -s  spc-page.tf  space_page.tf;   \
-	rm -f speedwalk.tf;    ln -s  spedwalk.tf  speedwalk.tf;    \
-	rm -f stack_queue.tf;  ln -s  stack-q.tf   stack_queue.tf;  \
-	rm -f worldqueue.tf;   ln -s  world-q.tf   worldqueue.tf;
+	install -Dm644 ../tf-lib/lisp.tf $(DESTDIR)$(datadir)/tf-lib/lisp.tf
+	install -Dm644 ../tf-lib/hanoi.tf $(DESTDIR)$(datadir)/tf-lib/hanoi.tf
+	install -Dm644 ../tf-lib/spell.tf $(DESTDIR)$(datadir)/tf-lib/spell.tf
+	install -Dm644 ../tf-lib/spedwalk.tf $(DESTDIR)$(datadir)/tf-lib/spedwalk.tf
+	install -Dm644 ../tf-lib/kb-emacs.tf $(DESTDIR)$(datadir)/tf-lib/kb-emacs.tf
+	install -Dm644 ../tf-lib/tf-help.idx $(DESTDIR)$(datadir)/tf-lib/tf-help.idx
+	install -Dm644 ../tf-lib/tools.tf $(DESTDIR)$(datadir)/tf-lib/tools.tf
+	install -Dm644 ../tf-lib/watch.tf $(DESTDIR)$(datadir)/tf-lib/watch.tf
+	install -Dm644 ../tf-lib/kb_badterm.tf $(DESTDIR)$(datadir)/tf-lib/kb_badterm.tf
+	install -Dm644 ../tf-lib/world-q.tf $(DESTDIR)$(datadir)/tf-lib/world-q.tf
+	install -Dm644 ../tf-lib/changes.tf $(DESTDIR)$(datadir)/tf-lib/changes.tf
+	install -Dm644 ../tf-lib/stack-q.tf $(DESTDIR)$(datadir)/tf-lib/stack-q.tf
+	install -Dm644 ../tf-lib/factoral.tf $(DESTDIR)$(datadir)/tf-lib/factoral.tf
+	install -Dm644 ../tf-lib/cylon.tf $(DESTDIR)$(datadir)/tf-lib/cylon.tf
+	install -Dm644 ../tf-lib/quoter.tf $(DESTDIR)$(datadir)/tf-lib/quoter.tf
+	install -Dm644 ../tf-lib/psh.tf $(DESTDIR)$(datadir)/tf-lib/psh.tf
+	install -Dm644 ../tf-lib/textutil.tf $(DESTDIR)$(datadir)/tf-lib/textutil.tf
+	install -Dm644 ../tf-lib/finger.tf $(DESTDIR)$(datadir)/tf-lib/finger.tf
+	install -Dm644 ../tf-lib/savehist.tf $(DESTDIR)$(datadir)/tf-lib/savehist.tf
+	install -Dm644 ../tf-lib/textencode.tf $(DESTDIR)$(datadir)/tf-lib/textencode.tf
+	install -Dm644 ../tf-lib/spc-page.tf $(DESTDIR)$(datadir)/tf-lib/spc-page.tf
+	install -Dm644 ../tf-lib/teraterm.keyboard.cnf $(DESTDIR)$(datadir)/tf-lib/teraterm.keyboard.cnf
+	install -Dm644 ../tf-lib/testcolor.tf $(DESTDIR)$(datadir)/tf-lib/testcolor.tf
+	install -Dm644 ../tf-lib/tintin.tf $(DESTDIR)$(datadir)/tf-lib/tintin.tf
+	install -Dm644 ../tf-lib/grep.tf $(DESTDIR)$(datadir)/tf-lib/grep.tf
+	install -Dm644 ../tf-lib/tfrc $(DESTDIR)$(datadir)/tf-lib/tfrc
+	install -Dm644 ../tf-lib/rwho.tf $(DESTDIR)$(datadir)/tf-lib/rwho.tf
+	install -Dm644 ../tf-lib/alias.tf $(DESTDIR)$(datadir)/tf-lib/alias.tf
+	install -Dm644 ../tf-lib/kbbind.tf $(DESTDIR)$(datadir)/tf-lib/kbbind.tf
+	install -Dm644 ../tf-lib/complete.tf $(DESTDIR)$(datadir)/tf-lib/complete.tf
+	install -Dm644 ../tf-lib/kbregion.tf $(DESTDIR)$(datadir)/tf-lib/kbregion.tf
+	install -Dm644 ../tf-lib/color.tf $(DESTDIR)$(datadir)/tf-lib/color.tf
+	install -Dm644 ../tf-lib/kb-bash.tf $(DESTDIR)$(datadir)/tf-lib/kb-bash.tf
+	install -Dm644 ../tf-lib/kbstack.tf $(DESTDIR)$(datadir)/tf-lib/kbstack.tf
+	install -Dm644 ../tf-lib/filexfer.tf $(DESTDIR)$(datadir)/tf-lib/filexfer.tf
+	install -Dm644 ../tf-lib/activity_status.tf $(DESTDIR)$(datadir)/tf-lib/activity_status.tf
+	install -Dm644 ../tf-lib/tfstatus.tf $(DESTDIR)$(datadir)/tf-lib/tfstatus.tf
+	install -Dm644 ../tf-lib/relog.tf $(DESTDIR)$(datadir)/tf-lib/relog.tf
+	install -Dm644 ../tf-lib/local-eg.tf $(DESTDIR)$(datadir)/tf-lib/local-eg.tf
+	install -Dm644 ../tf-lib/stdlib.tf $(DESTDIR)$(datadir)/tf-lib/stdlib.tf
+	install -Dm644 ../tf-lib/at.tf $(DESTDIR)$(datadir)/tf-lib/at.tf
+	install -Dm644 ../tf-lib/tick.tf $(DESTDIR)$(datadir)/tf-lib/tick.tf
+	install -Dm644 ../tf-lib/kb-os2.tf $(DESTDIR)$(datadir)/tf-lib/kb-os2.tf
+	install -Dm644 ../tf-lib/kbfunc.tf $(DESTDIR)$(datadir)/tf-lib/kbfunc.tf
+	install -Dm644 ../tf-lib/pcmd.tf $(DESTDIR)$(datadir)/tf-lib/pcmd.tf
+	install -Dm644 ../tf-lib/map.tf $(DESTDIR)$(datadir)/tf-lib/map.tf
+	install -Dm644 ../tf-lib/activity_status2.tf $(DESTDIR)$(datadir)/tf-lib/activity_status2.tf
+	install -Dm644 ../tf-lib/kb-old.tf $(DESTDIR)$(datadir)/tf-lib/kb-old.tf
+	install -Dm644 ../tf-lib/tr.tf $(DESTDIR)$(datadir)/tf-lib/tr.tf
+	install -Dm644 ../CHANGES $(DESTDIR)$(datadir)/tf-lib/CHANGES
+	install -Dm644 ../README $(DESTDIR)$(datadir)/tf-lib/README
+	install -Dm644 ../tf-lib/examples.old $(DESTDIR)$(datadir)/tf-lib/examples.old
 
 makehelp: makehelp.c
 	$(CC) $(CFLAGS) -o makehelp makehelp.c