1 # Makefile.in --- xscreensaver, Copyright (c) 1997 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 2.12.
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 D=xscreensaver-$$VERS ; \
176 NAME="$$D.tar.gz" ; \
177 if [ ! -f $$NAME ]; then \
178 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
185 if [ -d $$D ]; then \
189 zcat $$D.tar.gz | tar -xf - ; \
196 mkdir BIN/lesstif ; \
202 ../../configure --with-athena ; \
203 echo --------------------------------------------------------------- ; \
205 echo --------------------------------------------------------------- ); \
210 ../../configure --with-motif=/usr/local/motif ; \
211 echo --------------------------------------------------------------- ; \
212 ( cd utils; gmake ) ; \
213 ( cd driver; gmake ) ; \
214 ( cd driver; gmake xscreensaver-demo-Xaw ) ; \
215 echo --------------------------------------------------------------- ); \
220 ../../configure --with-motif=/usr/local/lesstif ; \
221 echo --------------------------------------------------------------- ; \
222 ( cd utils; gmake ) ; \
223 ( cd driver; gmake ) ; \
224 ( cd driver; gmake xscreensaver-demo-Xaw ) ; \
225 echo --------------------------------------------------------------- ); \
232 DEST=$$HOME/www/xscreensaver ; \
233 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
234 HEAD="xscreensaver-$$VERS" ; \
235 NAME="$$HEAD.tar.gz" ; \
237 if [ ! -f $$NAME ]; then \
238 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
241 if [ -f $$DEST/$$NAME ]; then \
242 echo -n "WARNING: $$DEST/$$NAME already exists! Overwrite? "; \
244 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
248 cp -p $$NAME $$DEST/$$NAME ; \
249 chmod u+w $$DEST/$$NAME ; \
253 sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ; \
255 diff -u0 download.html $$TMP ; \
258 OLDEST=`ls xscreensaver*.tar.gz | head -1` ; \
259 echo -n "Delete $$DEST/$$OLDEST? "; \
261 if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \
264 cvs remove $$OLDEST ; \
268 cvs add -kb $$NAME ; \
269 cat $$TMP > download.html ; \
272 (cd ..; $(MAKE) xscreensaver/changelog.html ); \
273 cvs diff -u0 changelog.html ; \
278 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
282 cvs commit -m "$$VERS"