File: makefile.in

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 (165 lines) | stat: -rw-r--r-- 4,249 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
########################################################################
#
#		Platform for distribution
SYSTEM=		@M_SYSTEM@
MACHINE=	@M_MACHINE@
PLATFORM=	$(SYSTEM)_$(MACHINE)
#
#		Location for distribution
I_PREFIX=	@PREFIX@

#
#		Name of the binary arrchive
BINDIST=	Ted_$(PLATFORM)
#
#
CHOWN_CMD=	test x_$$RPM_BUILD_ROOT != x_ || chown root:root
#
#
########################################################################

package:	../Ted/Ted.static	\
		TedBindist.tar		\
		$(BINDIST).lsm		\
		installTed.sh		\
		README
	:
	@test x_$$RPM_BUILD_ROOT != x_ || \
			echo ========== NEEDS TO BE RUN AS ROOT ==========
	:
	rm -rf scratch
	:
	mkdir scratch
	mkdir scratch/bin
	:
	$(CHOWN_CMD) scratch
	$(CHOWN_CMD) scratch/bin
	:
	chmod 755 scratch
	chmod 755 scratch/bin
	:
	( cd scratch && umask 0 && tar xvf ../TedBindist.tar )
	cp scratch/Ted/TedDocument-en_US.rtf readme.rtf
	cp rdm.txt readme.txt
	:
	cp ../Ted/Ted.static scratch/bin/Ted
	strip scratch/bin/Ted
	$(CHOWN_CMD) scratch/bin/Ted
	chmod 755 scratch/bin/Ted
	:
	( cd scratch && tar cvf - * | gzip -9 > ../$(BINDIST).tar.gz )
	:
	$(CHOWN_CMD) README
	$(CHOWN_CMD) readme.rtf
	$(CHOWN_CMD) readme.txt
	$(CHOWN_CMD) $(BINDIST).tar.gz
	$(CHOWN_CMD) $(BINDIST).lsm
	$(CHOWN_CMD) installTed.sh
	:
	test x_$$RPM_BUILD_ROOT != x_ || chmod 644 README
	test x_$$RPM_BUILD_ROOT != x_ || chmod 644 readme.rtf
	test x_$$RPM_BUILD_ROOT != x_ || chmod 644 readme.txt
	test x_$$RPM_BUILD_ROOT != x_ || chmod 644 $(BINDIST).tar.gz
	test x_$$RPM_BUILD_ROOT != x_ || chmod 644 $(BINDIST).lsm
	test x_$$RPM_BUILD_ROOT != x_ || chmod 755 installTed.sh
	:
	@echo Checking existence of distribution files
	test -s README
	test -s readme.rtf
	test -s readme.txt
	test -s $(BINDIST).tar.gz
	test -s $(BINDIST).lsm
	test -x installTed.sh
	:
	@date >> package
	@echo Distribution is complete

########################################################################
#
#	Package containing a dynamically linked executable
#
########################################################################

package.shared:	../Ted/Ted		\
		TedBindist.tar		\
		$(BINDIST).lsm		\
		installTed.sh		\
		README
	:
	@test x_$$RPM_BUILD_ROOT != x_ || \
			echo ========== NEEDS TO BE RUN AS ROOT ==========
	:
	rm -rf scratch
	:
	mkdir scratch
	mkdir scratch/bin
	:
	$(CHOWN_CMD) scratch
	$(CHOWN_CMD) scratch/bin
	:
	chmod 755 scratch
	chmod 755 scratch/bin
	:
	( cd scratch && umask 0 && tar xvf ../TedBindist.tar )
	cp scratch/Ted/TedDocument-en_US.rtf readme.rtf
	cp rdm.txt readme.txt
	:
	cp ../Ted/Ted scratch/bin/Ted
	$(CHOWN_CMD) scratch/bin/Ted
	chmod 755 scratch/bin/Ted
	:
	( cd scratch && tar cvf - * | gzip -9 > ../$(BINDIST).tar.gz )
	:
	$(CHOWN_CMD) README
	$(CHOWN_CMD) readme.rtf
	$(CHOWN_CMD) readme.txt
	$(CHOWN_CMD) $(BINDIST).tar.gz
	$(CHOWN_CMD) $(BINDIST).lsm
	$(CHOWN_CMD) installTed.sh
	:
	test x_$$RPM_BUILD_ROOT != x_ || chmod 644 README
	test x_$$RPM_BUILD_ROOT != x_ || chmod 644 readme.rtf
	test x_$$RPM_BUILD_ROOT != x_ || chmod 644 readme.txt
	test x_$$RPM_BUILD_ROOT != x_ || chmod 644 $(BINDIST).tar.gz
	test x_$$RPM_BUILD_ROOT != x_ || chmod 644 $(BINDIST).lsm
	test x_$$RPM_BUILD_ROOT != x_ || chmod 755 installTed.sh
	:
	@echo Checking existence of distribution files
	test -s README
	test -s readme.rtf
	test -s readme.txt
	test -s $(BINDIST).tar.gz
	test -s $(BINDIST).lsm
	test -x installTed.sh
	:
	@date > package.shared
	@echo Distribution is complete

########################################################################
#
#	Various files used in the package
#
########################################################################

$(BINDIST).lsm: TedBindist.lsm.in
	sed	-e "s:@SYSTEM@:$(SYSTEM):g"	\
		-e "s:@MACHINE@:$(MACHINE):g"	\
		-e "s:@PLATFORM@:$(PLATFORM):g"	\
		-e "s:@BINDIST@:$(BINDIST):g"	\
		TedBindist.lsm.in			> $@

installTed.sh: installTed.sh.in
	sed	-e "s:@SYSTEM@:$(SYSTEM):g"	\
		-e "s:@MACHINE@:$(MACHINE):g"	\
		-e "s:@PLATFORM@:$(PLATFORM):g"	\
		-e "s:@BINDIST@:$(BINDIST):g"	\
		-e "s:@I_PREFIX@:$(I_PREFIX):g"	\
		installTed.sh.in			> $@
	chmod 755 $@ || ( rm $@ && false )

README: README.in
	sed	-e "s:@SYSTEM@:$(SYSTEM):g"	\
		-e "s:@MACHINE@:$(MACHINE):g"	\
		-e "s:@PLATFORM@:$(PLATFORM):g"	\
		-e "s:@BINDIST@:$(BINDIST):g"	\
		README.in				> $@