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 po |
---|
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 aclocal.m4 \ |
---|
13 | config.sub makevms.com \ |
---|
14 | intltool-merge.in intltool-extract.in intltool-update.in \ |
---|
15 | xscreensaver.lsm.sh xscreensaver.spec \ |
---|
16 | |
---|
17 | TAR = tar |
---|
18 | |
---|
19 | MAKE_SUBDIR = for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) $@) || exit 5; done |
---|
20 | |
---|
21 | default:: |
---|
22 | @$(MAKE_SUBDIR) |
---|
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 *~ "#"* intltool-extract intltool-merge intltool-update |
---|
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]*b\?[0-9]*\).*/xscreensaver-\1/p' \ |
---|
66 | utils/version.h` ; \ |
---|
67 | rm -rf $$NAME ; ln -s . $$NAME ; \ |
---|
68 | FILES= ; \ |
---|
69 | ADIR=archive/ ; \ |
---|
70 | for subdir in $(SUBDIRS) ; do \ |
---|
71 | d=`pwd` ; \ |
---|
72 | cd $$subdir ; \ |
---|
73 | FILES="$$FILES `$(MAKE) echo_tarfiles \ |
---|
74 | | grep -v '^.*make\[' \ |
---|
75 | | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\" \ |
---|
76 | ` "; \ |
---|
77 | cd $$d ; done ; \ |
---|
78 | echo creating tar file $$ADIR$$NAME.tar.gz... ; \ |
---|
79 | GZIP="-9v" $(TAR) -vchzf $$ADIR$$NAME.tar.gz \ |
---|
80 | `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` ; \ |
---|
81 | rm $$NAME |
---|
82 | |
---|
83 | |
---|
84 | # This also makes me sick... |
---|
85 | # autoconf generates a configure script that begins with a very hard to read, |
---|
86 | # nearly impossible to customize --help blurb. This horrid set of regexps |
---|
87 | # go through and clean up the help text, by inserting whitespace and ripping |
---|
88 | # out options we don't use. Odds are good that this will fail with any version |
---|
89 | # of autoconf other than the ones I've tried (2.12 and 2.13.) |
---|
90 | # |
---|
91 | configure:: |
---|
92 | autoconf |
---|
93 | @TMP=configure.$$$$ ; \ |
---|
94 | echo "munging configure's --help message..." ; \ |
---|
95 | ( perl -e ' \ |
---|
96 | my $$file=""; \ |
---|
97 | while (<>) { $$file .= $$_; } \ |
---|
98 | $$_ = $$file; \ |
---|
99 | \ |
---|
100 | s/^(Configuration:)$$/\n$$1\n/m; \ |
---|
101 | s/^(Directory and file names:)$$/\n$$1\n/m; \ |
---|
102 | s/^ --sbindir=.*\n//m; \ |
---|
103 | s/^ --libexecdir.*\n//m; \ |
---|
104 | s/^ --datadir.*\n.*\n//m; \ |
---|
105 | s/^ --sysconfdir.*\n//m; \ |
---|
106 | s/^ --sharedstatedir.*\n.*\n//m; \ |
---|
107 | s/^ --localstatedir.*\n//m; \ |
---|
108 | s/^ --infodir.*\n//m; \ |
---|
109 | s/^(Host type:)$$/\n$$1\n/m; \ |
---|
110 | s/\nFeatures and packages:\n.*library files are in DIR\n/\n/s;\ |
---|
111 | s/--enable and --with options recognized://m; \ |
---|
112 | s/\n --with-x .*?(["\n])/$$1/s; \ |
---|
113 | s/\n(Installation options:\n)/$$1/s; \ |
---|
114 | \ |
---|
115 | s/^ --oldincludedir=.*$$/ \ |
---|
116 | --x-includes=DIR X include files are in DIR\n \ |
---|
117 | --x-libraries=DIR X library files are in DIR/m; \ |
---|
118 | \ |
---|
119 | print;' \ |
---|
120 | < configure \ |
---|
121 | > $$TMP && \ |
---|
122 | cat $$TMP > configure ) ; \ |
---|
123 | rm -f $$TMP |
---|
124 | |
---|
125 | bump-version:: |
---|
126 | @ \ |
---|
127 | SRC=utils/version.h ; \ |
---|
128 | VERS=`sed -n 's/[^0-9]*\([0-9]\)\.\([0-9][0-9]*\).*/\1 \2/p' $$SRC` ; \ |
---|
129 | set - $$VERS ; \ |
---|
130 | MAJOR="$$1"; MINOR="$$2"; \ |
---|
131 | NEW=`echo $$MINOR + 1 | bc` ; \ |
---|
132 | NEW=`echo $$NEW | sed 's/^\([0-9]\)$$/0\1/'` ; \ |
---|
133 | D=`date '+%d-%b-%Y'`; \ |
---|
134 | ADIR=archive/ ; \ |
---|
135 | if [ ! -f $${ADIR}xscreensaver-$$MAJOR.$$MINOR.tar.gz ]; then \ |
---|
136 | echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$MINOR.tar.gz does not exist.";\ |
---|
137 | fi ; \ |
---|
138 | if [ -f $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then \ |
---|
139 | echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz already exists.";\ |
---|
140 | fi ; \ |
---|
141 | echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? "; \ |
---|
142 | read line; \ |
---|
143 | if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \ |
---|
144 | exit 1 ; \ |
---|
145 | fi ; \ |
---|
146 | TMP=/tmp/bv.$$ ; \ |
---|
147 | sed -e "s/\([0-9]\.[0-9][0-9]*\)/$$MAJOR.$$NEW/" \ |
---|
148 | -e "s/\(([0-9][0-9]*-[A-Za-z][a-z][a-z]-[0-9][0-9][0-9]*\))/($$D)/" \ |
---|
149 | $$SRC > $$TMP ; \ |
---|
150 | echo -n "New version and date are "; \ |
---|
151 | sed -n "s/[^0-9]*\([0-9]\.[0-9][0-9]*\) (\([-A-Za-z0-9]*\)).*/\1, \2./p" \ |
---|
152 | $$TMP; \ |
---|
153 | cat $$TMP > $$SRC ; \ |
---|
154 | rm -f $$TMP; \ |
---|
155 | echo "overwrote $$SRC"; \ |
---|
156 | ls -lFd $$SRC |
---|
157 | |
---|
158 | bump_version:: bump-version |
---|
159 | tick-version:: bump-version |
---|
160 | tick_version:: bump-version |
---|
161 | |
---|
162 | update_spec_version:: |
---|
163 | @S=$(srcdir)/xscreensaver.spec ; \ |
---|
164 | U=$(srcdir)/utils/version.h ; \ |
---|
165 | V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \ |
---|
166 | echo -n "Updating $$S to \"$$V\"... " ; \ |
---|
167 | T=/tmp/xs.$$$$ ; \ |
---|
168 | sed "s/^\(%define.version[^0-9]*\)\(.*\)/\1$$V/" \ |
---|
169 | < $$S > $$T ; \ |
---|
170 | if cmp -s $$S $$T ; then \ |
---|
171 | echo "unchanged." ; \ |
---|
172 | else \ |
---|
173 | cat $$T > $$S ; \ |
---|
174 | echo "done." ; \ |
---|
175 | fi ; \ |
---|
176 | rm $$T |
---|
177 | |
---|
178 | rpm:: |
---|
179 | @ \ |
---|
180 | VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \ |
---|
181 | DIR=`pwd`/rpm_build ; \ |
---|
182 | ARCH=`rpm --showrc | sed -n 's/^build arch *: //p'` ; \ |
---|
183 | ADIR=archive/ ; \ |
---|
184 | TGZ=xscreensaver-$$VERS.tar.gz ; \ |
---|
185 | if [ ! -f $${ADIR}$$TGZ ]; then \ |
---|
186 | echo "$${ADIR}$$TGZ does not exist! Did you forget to \`make tar'?" ; \ |
---|
187 | exit 1 ; \ |
---|
188 | fi ; \ |
---|
189 | rm -rf /var/tmp/xscreensaver-$$VERS-root ; \ |
---|
190 | rm -rf $$DIR ; \ |
---|
191 | mkdir $$DIR ; \ |
---|
192 | ( cd $$DIR; mkdir BUILD RPMS RPMS/$$ARCH SOURCES SPECS SRPMS ) ; \ |
---|
193 | cp -p $${ADIR}$$TGZ $$DIR/SOURCES/ ; \ |
---|
194 | rpmbuild --define "_topdir $$DIR" \ |
---|
195 | --define "USE_GL yes" \ |
---|
196 | -v -ba xscreensaver.spec ; \ |
---|
197 | echo '' ; \ |
---|
198 | echo 'RPM build complete' ; \ |
---|
199 | echo '' ; \ |
---|
200 | rm -f $$DIR/$$TGZ ; \ |
---|
201 | rm -rf $$DIR/BUILD/xscreensaver-$$VERS ; \ |
---|
202 | mv $$DIR/SRPMS/xscreensaver*-$$VERS-*.rpm . ; \ |
---|
203 | mv $$DIR/RPMS/$$ARCH/xscreensaver*-$$VERS-*.rpm . ; \ |
---|
204 | rm -rf $$DIR ; \ |
---|
205 | echo '' ; \ |
---|
206 | ls -lFG xscreensaver*-$$VERS-*.rpm |
---|
207 | |
---|
208 | test-tar:: |
---|
209 | @ \ |
---|
210 | VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \ |
---|
211 | D=xscreensaver-$$VERS ; \ |
---|
212 | ADIR=archive/ ; \ |
---|
213 | NAME="$${ADIR}$$D.tar.gz" ; \ |
---|
214 | if [ ! -f $$NAME ]; then \ |
---|
215 | echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \ |
---|
216 | exit 1 ; \ |
---|
217 | fi ; \ |
---|
218 | \ |
---|
219 | set -e ; \ |
---|
220 | set -x ; \ |
---|
221 | \ |
---|
222 | if [ -d $$D ]; then \ |
---|
223 | chmod -R u+w $$D ; \ |
---|
224 | fi ; \ |
---|
225 | rm -rf $$D ; \ |
---|
226 | zcat $${ADIR}$$D.tar.gz | tar -xf - ; \ |
---|
227 | cd $$D ; \ |
---|
228 | chmod -R a-w . ; \ |
---|
229 | chmod u+w . ; \ |
---|
230 | mkdir BIN ; \ |
---|
231 | mkdir BIN/motif ; \ |
---|
232 | mkdir BIN/lesstif ; \ |
---|
233 | chmod a-w . ; \ |
---|
234 | \ |
---|
235 | ( cd BIN/motif ; \ |
---|
236 | CC=cc ; \ |
---|
237 | export CC ; \ |
---|
238 | ../../configure --without-xpm --without-xdbe --without-xshm \ |
---|
239 | --with-motif=/usr/local/motif ; \ |
---|
240 | echo --------------------------------------------------------------- ; \ |
---|
241 | gmake all ; \ |
---|
242 | ( cd driver; gmake tests ) ; \ |
---|
243 | echo --------------------------------------------------------------- ); \ |
---|
244 | \ |
---|
245 | ( cd BIN/lesstif ; \ |
---|
246 | CC=cc ; \ |
---|
247 | export CC ; \ |
---|
248 | ../../configure --with-motif=/usr/local/lesstif --without-gnome ; \ |
---|
249 | echo --------------------------------------------------------------- ; \ |
---|
250 | ( cd utils; gmake all ) ; \ |
---|
251 | ( cd driver; gmake all ) ; \ |
---|
252 | echo --------------------------------------------------------------- ); \ |
---|
253 | \ |
---|
254 | chmod -R u+w . |
---|
255 | |
---|
256 | |
---|
257 | www:: |
---|
258 | @ \ |
---|
259 | DEST=$$HOME/www/xscreensaver ; \ |
---|
260 | VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \ |
---|
261 | HEAD="xscreensaver-$$VERS" ; \ |
---|
262 | ADIR=archive/ ; \ |
---|
263 | BNAME="$$HEAD.tar.gz" ; \ |
---|
264 | NAME="$$ADIR$$BNAME" ; \ |
---|
265 | DNAME="$$DEST/$$HEAD.tar.gz" ; \ |
---|
266 | \ |
---|
267 | if [ ! -f $$NAME ]; then \ |
---|
268 | echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \ |
---|
269 | exit 1 ; \ |
---|
270 | fi ; \ |
---|
271 | chmod a-w $$NAME ; \ |
---|
272 | if [ -f $$DNAME ]; then \ |
---|
273 | echo -n "WARNING: $$DNAME already exists! Overwrite? "; \ |
---|
274 | read line; \ |
---|
275 | if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \ |
---|
276 | exit 1 ; \ |
---|
277 | fi ; \ |
---|
278 | fi ; \ |
---|
279 | cp -p $$NAME $$DNAME ; \ |
---|
280 | chmod u+w $$DNAME ; \ |
---|
281 | cd $$DEST ; \ |
---|
282 | \ |
---|
283 | TMP=/tmp/xd.$$$$ ; \ |
---|
284 | sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ; \ |
---|
285 | echo '' ; \ |
---|
286 | diff -u0 download.html $$TMP ; \ |
---|
287 | echo '' ; \ |
---|
288 | \ |
---|
289 | OLDEST=`ls xscreensaver*.tar.gz | head -1` ; \ |
---|
290 | echo -n "Delete $$DEST/$$OLDEST? "; \ |
---|
291 | read line; \ |
---|
292 | if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \ |
---|
293 | set -x ; \ |
---|
294 | rm $$OLDEST ; \ |
---|
295 | cvs remove $$OLDEST ; \ |
---|
296 | else \ |
---|
297 | set -x ; \ |
---|
298 | fi ; \ |
---|
299 | cvs add -kb $$BNAME ; \ |
---|
300 | cat $$TMP > download.html ; \ |
---|
301 | rm -f $$TMP ; \ |
---|
302 | \ |
---|
303 | (cd ..; $(MAKE) xscreensaver/changelog.html ); \ |
---|
304 | cvs diff -u0 changelog.html ; \ |
---|
305 | set +x ; \ |
---|
306 | \ |
---|
307 | echo -n "Ok? "; \ |
---|
308 | read line; \ |
---|
309 | if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \ |
---|
310 | exit 1 ; \ |
---|
311 | fi ; \ |
---|
312 | \ |
---|
313 | cvs commit -m "$$VERS" |
---|
314 | |
---|
315 | count:: |
---|
316 | @ \ |
---|
317 | echo -n "Current hack count: " ; \ |
---|
318 | ( ( cd hacks; make -s INSTALL=true install-program install-scripts ) ; \ |
---|
319 | ( cd hacks/glx; make -s INSTALL=true install-program ) ) | \ |
---|
320 | grep true | \ |
---|
321 | grep -v helper | \ |
---|
322 | grep -v ljlatest | \ |
---|
323 | wc -l |
---|