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
42 @$(MAKE) update_spec_version
50 -rm -f config.h Makefile config.status config.cache config.log TAGS *~ "#"*
55 # This really makes me sick...
61 $(MAKE) distdepend ; \
62 sh xscreensaver.lsm.sh > xscreensaver.lsm.$$$$ ; \
63 mv xscreensaver.lsm.$$$$ xscreensaver.lsm ; \
65 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ; \
66 rm -rf $$NAME ; ln -s . $$NAME ; \
68 for subdir in $(SUBDIRS) ; do \
71 FILES="$$FILES `$(MAKE) echo_tarfiles \
72 | grep -v '^.*make\[' \
73 | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\" \
76 echo creating tar file $${NAME}.tar.$(COMPRESS_EXT)... ; \
78 `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` \
79 | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ; \
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.)
92 @TMP=configure.$$$$ ; \
93 echo "munging configure's --help message..." ; \
96 while (<>) { $$file .= $$_; } \
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; \
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; \
121 cat $$TMP > configure ) ; \
126 SRC=utils/version.h ; \
127 VERS=`sed -n 's/[^0-9]*\([0-9]\)\.\([0-9][0-9]*\).*/\1 \2/p' $$SRC` ; \
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."; \
136 if [ -f xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then \
137 echo "WARNING: xscreensaver-$$MAJOR.$$NEW.tar.gz already exists."; \
139 echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? "; \
141 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
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)/" \
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" \
151 cat $$TMP > $$SRC ; \
153 echo "overwrote $$SRC"; \
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\"... " ; \
162 sed "s/^\(Version:[^0-9]*\)\(.*\)/\1$$V/" \
164 if cmp -s $$S $$T ; then \
165 echo "unchanged." ; \
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
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'?" ; \
191 if [ -d $$D ]; then \
195 zcat $$D.tar.gz | tar -xf - ; \
202 mkdir BIN/lesstif ; \
208 ../../configure --with-athena ; \
209 echo --------------------------------------------------------------- ; \
211 echo --------------------------------------------------------------- ); \
216 ../../configure --without-xpm --without-xdbe --without-xshm \
217 --with-motif=/usr/local/motif ; \
218 echo --------------------------------------------------------------- ; \
220 ( cd driver; gmake xscreensaver-demo-Xaw ) ; \
221 echo --------------------------------------------------------------- ); \
226 ../../configure --with-motif=/usr/local/lesstif ; \
227 echo --------------------------------------------------------------- ; \
228 ( cd utils; gmake ) ; \
229 ( cd driver; gmake ) ; \
230 ( cd driver; gmake xscreensaver-demo-Xaw ) ; \
231 echo --------------------------------------------------------------- ); \
238 DEST=$$HOME/www/xscreensaver ; \
239 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
240 HEAD="xscreensaver-$$VERS" ; \
241 NAME="$$HEAD.tar.gz" ; \
243 if [ ! -f $$NAME ]; then \
244 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"