1 | # Makefile.in --- xscreensaver, Copyright (c) 1999 Jamie Zawinski. |
---|
2 | # the `../configure' script generates `Makefile' from this file. |
---|
3 | |
---|
4 | @SET_MAKE@ |
---|
5 | srcdir = @srcdir@ |
---|
6 | VPATH = @srcdir@ |
---|
7 | |
---|
8 | SHELL = /bin/sh |
---|
9 | SUBDIRS = utils driver hacks hacks/glx |
---|
10 | TARFILES = README README.VMS README.debugging INSTALL xscreensaver.lsm \ |
---|
11 | configure configure.in Makefile.in config.h.in \ |
---|
12 | config.h-vms install-sh setup.com config.guess \ |
---|
13 | config.sub makevms.com screenblank.txt \ |
---|
14 | xscreensaver.lsm.sh xscreensaver.spec |
---|
15 | TAR = tar |
---|
16 | COMPRESS = gzip --verbose --best |
---|
17 | COMPRESS_EXT = gz |
---|
18 | # COMPRESS = compress |
---|
19 | # COMPRESS_EXT = Z |
---|
20 | |
---|
21 | MAKE_SUBDIR = for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) $@) || exit 5; done |
---|
22 | |
---|
23 | all:: |
---|
24 | @$(MAKE_SUBDIR) |
---|
25 | install: |
---|
26 | @$(MAKE_SUBDIR) |
---|
27 | install-program: |
---|
28 | @$(MAKE_SUBDIR) |
---|
29 | install-man: |
---|
30 | @$(MAKE_SUBDIR) |
---|
31 | install-strip: |
---|
32 | @$(MAKE_SUBDIR) |
---|
33 | uninstall: |
---|
34 | @$(MAKE_SUBDIR) |
---|
35 | uninstall-program: |
---|
36 | @$(MAKE_SUBDIR) |
---|
37 | uninstall-man: |
---|
38 | @$(MAKE_SUBDIR) |
---|
39 | depend: |
---|
40 | @$(MAKE_SUBDIR) |
---|
41 | distdepend: |
---|
42 | @$(MAKE) update_spec_version |
---|
43 | @$(MAKE_SUBDIR) |
---|
44 | TAGS: tags |
---|
45 | tags: |
---|
46 | @$(MAKE_SUBDIR) |
---|
47 | clean: |
---|
48 | @$(MAKE_SUBDIR) |
---|
49 | distclean: clean |
---|
50 | -rm -f config.h Makefile config.status config.cache config.log TAGS *~ "#"* |
---|
51 | @$(MAKE_SUBDIR) |
---|
52 | |
---|
53 | dist: tar |
---|
54 | |
---|
55 | # This really makes me sick... |
---|
56 | tar: |
---|
57 | @ \ |
---|
58 | sh config.status ; \ |
---|
59 | rm -f configure ; \ |
---|
60 | $(MAKE) configure ; \ |
---|
61 | $(MAKE) distdepend ; \ |
---|
62 | sh xscreensaver.lsm.sh > xscreensaver.lsm.$$$$ ; \ |
---|
63 | mv xscreensaver.lsm.$$$$ xscreensaver.lsm ; \ |
---|
64 | NAME=`sed -n \ |
---|
65 | 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ; \ |
---|
66 | rm -rf $$NAME ; ln -s . $$NAME ; \ |
---|
67 | FILES= ; \ |
---|
68 | for subdir in $(SUBDIRS) ; do \ |
---|
69 | d=`pwd` ; \ |
---|
70 | cd $$subdir ; \ |
---|
71 | FILES="$$FILES `$(MAKE) echo_tarfiles \ |
---|
72 | | grep -v '^.*make\[' \ |
---|
73 | | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\" \ |
---|
74 | ` "; \ |
---|
75 | cd $$d ; done ; \ |
---|
76 | echo creating tar file $${NAME}.tar.$(COMPRESS_EXT)... ; \ |
---|
77 | $(TAR) -vchf - \ |
---|
78 | `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` \ |
---|
79 | | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ; \ |
---|
80 | rm $$NAME |
---|
81 | |
---|
82 | |
---|
83 | # This also makes me sick... |
---|
84 | # autoconf generates a configure script that begins with a very hard to read, |
---|
85 | # nearly impossible to customize --help blurb. This horrid set of regexps |
---|
86 | # go through and clean up the help text, by inserting whitespace and ripping |
---|
87 | # out options we don't use. Odds are good that this will fail with any version |
---|
88 | # of autoconf other than the ones I've tried (2.12 and 2.13.) |
---|
89 | # |
---|
90 | configure:: |
---|
91 | autoconf |
---|
92 | @TMP=configure.$$$$ ; \ |
---|
93 | echo "munging configure's --help message..." ; \ |
---|
94 | ( perl -e ' \ |
---|
95 | my $$file=""; \ |
---|
96 | while (<>) { $$file .= $$_; } \ |
---|
97 | $$_ = $$file; \ |
---|
98 | \ |
---|
99 | s/^(Configuration:)$$/\n$$1\n/m; \ |
---|
100 | s/^(Directory and file names:)$$/\n$$1\n/m; \ |
---|
101 | s/^ --sbindir=.*\n//m; \ |
---|
102 | s/^ --libexecdir.*\n//m; \ |
---|
103 | s/^ --datadir.*\n.*\n//m; \ |
---|
104 | s/^ --sysconfdir.*\n//m; \ |
---|
105 | s/^ --sharedstatedir.*\n.*\n//m; \ |
---|
106 | s/^ --localstatedir.*\n//m; \ |
---|
107 | s/^ --infodir.*\n//m; \ |
---|
108 | s/^(Host type:)$$/\n$$1\n/m; \ |
---|
109 | s/\nFeatures and packages:\n.*library files are in DIR\n/\n/s;\ |
---|
110 | s/--enable and --with options recognized://m; \ |
---|
111 | s/\n --with-x .*?(["\n])/$$1/s; \ |
---|
112 | s/\n(Installation options:\n)/$$1/s; \ |
---|
113 | \ |
---|
114 | s/^ --oldincludedir=.*$$/ \ |
---|
115 | --x-includes=DIR X include files are in DIR\n \ |
---|
116 | --x-libraries=DIR X library files are in DIR/m; \ |
---|
117 | \ |
---|
118 | print;' \ |
---|
119 | < configure \ |
---|
120 | > $$TMP && \ |
---|
121 | cat $$TMP > configure ) ; \ |
---|
122 | rm -f $$TMP |
---|
123 | |
---|
124 | bump-version:: |
---|
125 | @ \ |
---|
126 | SRC=utils/version.h ; \ |
---|
127 | VERS=`sed -n 's/[^0-9]*\([0-9]\)\.\([0-9][0-9]*\).*/\1 \2/p' $$SRC` ; \ |
---|
128 | set - $$VERS ; \ |
---|
129 | MAJOR="$$1"; MINOR="$$2"; \ |
---|
130 | NEW=`echo $$MINOR + 1 | bc` ; \ |
---|
131 | NEW=`echo $$NEW | sed 's/^\([0-9]\)$$/0\1/'` ; \ |
---|
132 | D=`date '+%d-%b-%y'`; \ |
---|
133 | if [ ! -f xscreensaver-$$MAJOR.$$MINOR.tar.gz ]; then \ |
---|
134 | echo "WARNING: xscreensaver-$$MAJOR.$$MINOR.tar.gz does not exist."; \ |
---|
135 | fi ; \ |
---|
136 | if [ -f xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then \ |
---|
137 | echo "WARNING: xscreensaver-$$MAJOR.$$NEW.tar.gz already exists."; \ |
---|
138 | fi ; \ |
---|
139 | echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? "; \ |
---|
140 | read line; \ |
---|
141 | if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \ |
---|
142 | exit 1 ; \ |
---|
143 | fi ; \ |
---|
144 | TMP=/tmp/bv.$$ ; \ |
---|
145 | sed -e "s/\([0-9]\.[0-9][0-9]*\)/$$MAJOR.$$NEW/" \ |
---|
146 | -e "s/\(([0-9][0-9]*-[A-Za-z][a-z][a-z]-[0-9][0-9][0-9]*\))/($$D)/" \ |
---|
147 | $$SRC > $$TMP ; \ |
---|
148 | echo -n "New version and date are "; \ |
---|
149 | sed -n "s/[^0-9]*\([0-9]\.[0-9][0-9]*\) (\([-A-Za-z0-9]*\)).*/\1, \2./p" \ |
---|
150 | $$TMP; \ |
---|
151 | cat $$TMP > $$SRC ; \ |
---|
152 | rm -f $$TMP; \ |
---|
153 | echo "overwrote $$SRC"; \ |
---|
154 | ls -lFd $$SRC |
---|
155 | |
---|
156 | update_spec_version:: |
---|
157 | @S=$(srcdir)/xscreensaver.spec ; \ |
---|
158 | U=$(srcdir)/utils/version.h ; \ |
---|
159 | V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \ |
---|
160 | echo -n "Updating version number in $$S to \"$$V\"... " ; \ |
---|
161 | T=/tmp/xs.$$$$ ; \ |
---|
162 | sed "s/^\(Version:[^0-9]*\)\(.*\)/\1$$V/" \ |
---|
163 | < $$S > $$T ; \ |
---|
164 | if cmp -s $$S $$T ; then \ |
---|
165 | echo "unchanged." ; \ |
---|
166 | else \ |
---|
167 | cat $$T > $$S ; \ |
---|
168 | echo "done." ; \ |
---|
169 | fi ; \ |
---|
170 | rm $$T |
---|
171 | |
---|
172 | rpm:: |
---|
173 | @ \ |
---|
174 | VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \ |
---|
175 | cp -p xscreensaver-$$VERS.tar.gz /usr/src/redhat/SOURCES/ ; \ |
---|
176 | rpm -ba xscreensaver.spec |
---|
177 | |
---|
178 | test-tar:: |
---|
179 | @ \ |
---|
180 | VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \ |
---|
181 | D=xscreensaver-$$VERS ; \ |
---|
182 | NAME="$$D.tar.gz" ; \ |
---|
183 | if [ ! -f $$NAME ]; then \ |
---|
184 | echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \ |
---|
185 | exit 1 ; \ |
---|
186 | fi ; \ |
---|
187 | \ |
---|
188 | set -e ; \ |
---|
189 | set -x ; \ |
---|
190 | \ |
---|
191 | if [ -d $$D ]; then \ |
---|
192 | chmod -R u+w $$D ; \ |
---|
193 | fi ; \ |
---|
194 | rm -rf $$D ; \ |
---|
195 | zcat $$D.tar.gz | tar -xf - ; \ |
---|
196 | cd $$D ; \ |
---|
197 | chmod -R a-w . ; \ |
---|
198 | chmod u+w . ; \ |
---|
199 | mkdir BIN ; \ |
---|
200 | mkdir BIN/athena ; \ |
---|
201 | mkdir BIN/motif ; \ |
---|
202 | mkdir BIN/lesstif ; \ |
---|
203 | chmod a-w . ; \ |
---|
204 | \ |
---|
205 | ( cd BIN/athena ; \ |
---|
206 | CC=cc ; \ |
---|
207 | export CC ; \ |
---|
208 | ../../configure --with-athena ; \ |
---|
209 | echo --------------------------------------------------------------- ; \ |
---|
210 | gmake ; \ |
---|
211 | echo --------------------------------------------------------------- ); \ |
---|
212 | \ |
---|
213 | ( cd BIN/motif ; \ |
---|
214 | CC=cc ; \ |
---|
215 | export CC ; \ |
---|
216 | ../../configure --without-xpm --with-motif=/usr/local/motif ; \ |
---|
217 | echo --------------------------------------------------------------- ; \ |
---|
218 | gmake ; \ |
---|
219 | ( cd driver; gmake xscreensaver-demo-Xaw ) ; \ |
---|
220 | echo --------------------------------------------------------------- ); \ |
---|
221 | \ |
---|
222 | ( cd BIN/lesstif ; \ |
---|
223 | CC=cc ; \ |
---|
224 | export CC ; \ |
---|
225 | ../../configure --with-motif=/usr/local/lesstif ; \ |
---|
226 | echo --------------------------------------------------------------- ; \ |
---|
227 | ( cd utils; gmake ) ; \ |
---|
228 | ( cd driver; gmake ) ; \ |
---|
229 | ( cd driver; gmake xscreensaver-demo-Xaw ) ; \ |
---|
230 | echo --------------------------------------------------------------- ); \ |
---|
231 | \ |
---|
232 | chmod -R u+w . |
---|
233 | |
---|
234 | |
---|
235 | www:: |
---|
236 | @ \ |
---|
237 | DEST=$$HOME/www/xscreensaver ; \ |
---|
238 | VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \ |
---|
239 | HEAD="xscreensaver-$$VERS" ; \ |
---|
240 | NAME="$$HEAD.tar.gz" ; \ |
---|
241 | \ |
---|
242 | if [ ! -f $$NAME ]; then \ |
---|
243 | echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \ |
---|
244 | exit 1 ; \ |
---|
245 | fi ; \ |
---|
246 | if [ -f $$DEST/$$NAME ]; then \ |
---|
247 | echo -n "WARNING: $$DEST/$$NAME already exists! Overwrite? "; \ |
---|
248 | read line; \ |
---|
249 | if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \ |
---|
250 | exit 1 ; \ |
---|
251 | fi ; \ |
---|
252 | fi ; \ |
---|
253 | cp -p $$NAME $$DEST/$$NAME ; \ |
---|
254 | chmod u+w $$DEST/$$NAME ; \ |
---|
255 | cd $$DEST ; \ |
---|
256 | \ |
---|
257 | TMP=/tmp/xd.$$$$ ; \ |
---|
258 | sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ; \ |
---|
259 | echo '' ; \ |
---|
260 | diff -u0 download.html $$TMP ; \ |
---|
261 | echo '' ; \ |
---|
262 | \ |
---|
263 | OLDEST=`ls xscreensaver*.tar.gz | head -1` ; \ |
---|
264 | echo -n "Delete $$DEST/$$OLDEST? "; \ |
---|
265 | read line; \ |
---|
266 | if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \ |
---|
267 | set -x ; \ |
---|
268 | rm $$OLDEST ; \ |
---|
269 | cvs remove $$OLDEST ; \ |
---|
270 | else \ |
---|
271 | set -x ; \ |
---|
272 | fi ; \ |
---|
273 | cvs add -kb $$NAME ; \ |
---|
274 | cat $$TMP > download.html ; \ |
---|
275 | rm -f $$TMP ; \ |
---|
276 | \ |
---|
277 | (cd ..; $(MAKE) xscreensaver/changelog.html ); \ |
---|
278 | cvs diff -u0 changelog.html ; \ |
---|
279 | set +x ; \ |
---|
280 | \ |
---|
281 | echo -n "Ok? "; \ |
---|
282 | read line; \ |
---|
283 | if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \ |
---|
284 | exit 1 ; \ |
---|
285 | fi ; \ |
---|
286 | \ |
---|
287 | cvs commit -m "$$VERS" |
---|