1 # Makefile.in --- xscreensaver, Copyright (c) 1999 Jamie Zawinski.
2 # the `../configure' script generates `Makefile' from this file.
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
16 COMPRESS = gzip --verbose --best
21 MAKE_SUBDIR = for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) $@) || exit 5; done
44 @$(MAKE) update_spec_version
52 -rm -f config.h Makefile config.status config.cache config.log TAGS *~ "#"*
57 # This really makes me sick...
63 $(MAKE) distdepend ; \
64 sh xscreensaver.lsm.sh > xscreensaver.lsm.$$$$ ; \
65 mv xscreensaver.lsm.$$$$ xscreensaver.lsm ; \
67 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ; \
68 rm -rf $$NAME ; ln -s . $$NAME ; \
70 for subdir in $(SUBDIRS) ; do \
73 FILES="$$FILES `$(MAKE) echo_tarfiles \
74 | grep -v '^.*make\[' \
75 | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\" \
78 echo creating tar file $${NAME}.tar.$(COMPRESS_EXT)... ; \
80 `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` \
81 | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ; \
85 # This also makes me sick...
86 # autoconf generates a configure script that begins with a very hard to read,
87 # nearly impossible to customize --help blurb. This horrid set of regexps
88 # go through and clean up the help text, by inserting whitespace and ripping
89 # out options we don't use. Odds are good that this will fail with any version
90 # of autoconf other than the ones I've tried (2.12 and 2.13.)
94 @TMP=configure.$$$$ ; \
95 echo "munging configure's --help message..." ; \
98 while (<>) { $$file .= $$_; } \
101 s/^(Configuration:)$$/\n$$1\n/m; \
102 s/^(Directory and file names:)$$/\n$$1\n/m; \
103 s/^ --sbindir=.*\n//m; \
104 s/^ --libexecdir.*\n//m; \
105 s/^ --datadir.*\n.*\n//m; \
106 s/^ --sysconfdir.*\n//m; \
107 s/^ --sharedstatedir.*\n.*\n//m; \
108 s/^ --localstatedir.*\n//m; \
109 s/^ --infodir.*\n//m; \
110 s/^(Host type:)$$/\n$$1\n/m; \
111 s/\nFeatures and packages:\n.*library files are in DIR\n/\n/s;\
112 s/--enable and --with options recognized://m; \
113 s/\n --with-x .*?(["\n])/$$1/s; \
114 s/\n(Installation options:\n)/$$1/s; \
116 s/^ --oldincludedir=.*$$/ \
117 --x-includes=DIR X include files are in DIR\n \
118 --x-libraries=DIR X library files are in DIR/m; \
123 cat $$TMP > configure ) ; \
128 SRC=utils/version.h ; \
129 VERS=`sed -n 's/[^0-9]*\([0-9]\)\.\([0-9][0-9]*\).*/\1 \2/p' $$SRC` ; \
131 MAJOR="$$1"; MINOR="$$2"; \
132 NEW=`echo $$MINOR + 1 | bc` ; \
133 NEW=`echo $$NEW | sed 's/^\([0-9]\)$$/0\1/'` ; \
134 D=`date '+%d-%b-%Y'`; \
135 if [ ! -f xscreensaver-$$MAJOR.$$MINOR.tar.gz ]; then \
136 echo "WARNING: xscreensaver-$$MAJOR.$$MINOR.tar.gz does not exist."; \
138 if [ -f xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then \
139 echo "WARNING: xscreensaver-$$MAJOR.$$NEW.tar.gz already exists."; \
141 echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? "; \
143 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
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)/" \
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" \
153 cat $$TMP > $$SRC ; \
155 echo "overwrote $$SRC"; \
158 update_spec_version::
159 @S=$(srcdir)/xscreensaver.spec ; \
160 U=$(srcdir)/utils/version.h ; \
161 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
162 echo -n "Updating version number in $$S to \"$$V\"... " ; \
164 sed "s/^\(%define.version[^0-9]*\)\(.*\)/\1$$V/" \
166 if cmp -s $$S $$T ; then \
167 echo "unchanged." ; \
176 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
177 DIR=/usr/src/redhat ; \
178 cp -p xscreensaver-$$VERS.tar.gz $$DIR/SOURCES/ ; \
179 rpm --define "USE_GL yes" -ba xscreensaver.spec ; \
180 rm -f $$DIR/xscreensaver-$$VERS.tar.gz ; \
181 rm -rf $$DIR/BUILD/xscreensaver-$$VERS ; \
182 mv $$DIR/SRPMS/xscreensaver*-$$VERS-*.rpm . ; \
183 mv $$DIR/RPMS/i386/xscreensaver*-$$VERS-*.rpm . ; \
185 ls -lFG xscreensaver*-$$VERS-*.rpm
189 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
190 D=xscreensaver-$$VERS ; \
191 NAME="$$D.tar.gz" ; \
192 if [ ! -f $$NAME ]; then \
193 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
200 if [ -d $$D ]; then \
204 zcat $$D.tar.gz | tar -xf - ; \
210 mkdir BIN/lesstif ; \
216 ../../configure --without-xpm --without-xdbe --without-xshm \
217 --with-motif=/usr/local/motif ; \
218 echo --------------------------------------------------------------- ; \
220 ( cd driver; gmake tests ) ; \
221 echo --------------------------------------------------------------- ); \
226 ../../configure --with-motif=/usr/local/lesstif --without-gnome ; \
227 echo --------------------------------------------------------------- ; \
228 ( cd utils; gmake all ) ; \
229 ( cd driver; gmake all ) ; \
230 echo --------------------------------------------------------------- ); \
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" ; \
242 if [ ! -f $$NAME ]; then \
243 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
247 if [ -f $$DEST/$$NAME ]; then \
248 echo -n "WARNING: $$DEST/$$NAME already exists! Overwrite? "; \
250 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
254 cp -p $$NAME $$DEST/$$NAME ; \
255 chmod u+w $$DEST/$$NAME ; \
259 sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ; \
261 diff -u0 download.html $$TMP ; \
264 OLDEST=`ls xscreensaver*.tar.gz | head -1` ; \
265 echo -n "Delete $$DEST/$$OLDEST? "; \
267 if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \
270 cvs remove $$OLDEST ; \
274 cvs add -kb $$NAME ; \
275 cat $$TMP > download.html ; \
278 (cd ..; $(MAKE) xscreensaver/changelog.html ); \
279 cvs diff -u0 changelog.html ; \
284 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
288 cvs commit -m "$$VERS"