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
17 MAKE_SUBDIR = for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) $@) || exit 5; done
40 @$(MAKE) update_spec_version
48 -rm -f config.h Makefile config.status config.cache config.log TAGS *~ "#"*
53 # This really makes me sick...
59 $(MAKE) distdepend ; \
60 sh xscreensaver.lsm.sh > xscreensaver.lsm.$$$$ ; \
61 mv xscreensaver.lsm.$$$$ xscreensaver.lsm ; \
63 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ; \
64 rm -rf $$NAME ; ln -s . $$NAME ; \
66 for subdir in $(SUBDIRS) ; do \
69 FILES="$$FILES `$(MAKE) echo_tarfiles \
70 | grep -v '^.*make\[' \
71 | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\" \
74 echo creating tar file $${NAME}.tar.gz... ; \
75 GZIP="-9v" $(TAR) -vchzf $${NAME}.tar.gz \
76 `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` ; \
80 # This also makes me sick...
81 # autoconf generates a configure script that begins with a very hard to read,
82 # nearly impossible to customize --help blurb. This horrid set of regexps
83 # go through and clean up the help text, by inserting whitespace and ripping
84 # out options we don't use. Odds are good that this will fail with any version
85 # of autoconf other than the ones I've tried (2.12 and 2.13.)
89 @TMP=configure.$$$$ ; \
90 echo "munging configure's --help message..." ; \
93 while (<>) { $$file .= $$_; } \
96 s/^(Configuration:)$$/\n$$1\n/m; \
97 s/^(Directory and file names:)$$/\n$$1\n/m; \
98 s/^ --sbindir=.*\n//m; \
99 s/^ --libexecdir.*\n//m; \
100 s/^ --datadir.*\n.*\n//m; \
101 s/^ --sysconfdir.*\n//m; \
102 s/^ --sharedstatedir.*\n.*\n//m; \
103 s/^ --localstatedir.*\n//m; \
104 s/^ --infodir.*\n//m; \
105 s/^(Host type:)$$/\n$$1\n/m; \
106 s/\nFeatures and packages:\n.*library files are in DIR\n/\n/s;\
107 s/--enable and --with options recognized://m; \
108 s/\n --with-x .*?(["\n])/$$1/s; \
109 s/\n(Installation options:\n)/$$1/s; \
111 s/^ --oldincludedir=.*$$/ \
112 --x-includes=DIR X include files are in DIR\n \
113 --x-libraries=DIR X library files are in DIR/m; \
118 cat $$TMP > configure ) ; \
123 SRC=utils/version.h ; \
124 VERS=`sed -n 's/[^0-9]*\([0-9]\)\.\([0-9][0-9]*\).*/\1 \2/p' $$SRC` ; \
126 MAJOR="$$1"; MINOR="$$2"; \
127 NEW=`echo $$MINOR + 1 | bc` ; \
128 NEW=`echo $$NEW | sed 's/^\([0-9]\)$$/0\1/'` ; \
129 D=`date '+%d-%b-%Y'`; \
130 if [ ! -f xscreensaver-$$MAJOR.$$MINOR.tar.gz ]; then \
131 echo "WARNING: xscreensaver-$$MAJOR.$$MINOR.tar.gz does not exist."; \
133 if [ -f xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then \
134 echo "WARNING: xscreensaver-$$MAJOR.$$NEW.tar.gz already exists."; \
136 echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? "; \
138 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
142 sed -e "s/\([0-9]\.[0-9][0-9]*\)/$$MAJOR.$$NEW/" \
143 -e "s/\(([0-9][0-9]*-[A-Za-z][a-z][a-z]-[0-9][0-9][0-9]*\))/($$D)/" \
145 echo -n "New version and date are "; \
146 sed -n "s/[^0-9]*\([0-9]\.[0-9][0-9]*\) (\([-A-Za-z0-9]*\)).*/\1, \2./p" \
148 cat $$TMP > $$SRC ; \
150 echo "overwrote $$SRC"; \
153 update_spec_version::
154 @S=$(srcdir)/xscreensaver.spec ; \
155 U=$(srcdir)/utils/version.h ; \
156 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
157 echo -n "Updating version number in $$S to \"$$V\"... " ; \
159 sed "s/^\(%define.version[^0-9]*\)\(.*\)/\1$$V/" \
161 if cmp -s $$S $$T ; then \
162 echo "unchanged." ; \
171 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
172 DIR=/usr/src/redhat ; \
173 cp -p xscreensaver-$$VERS.tar.gz $$DIR/SOURCES/ ; \
174 rpm --define "USE_GL yes" -ba xscreensaver.spec ; \
175 rm -f $$DIR/xscreensaver-$$VERS.tar.gz ; \
176 rm -rf $$DIR/BUILD/xscreensaver-$$VERS ; \
177 mv $$DIR/SRPMS/xscreensaver*-$$VERS-*.rpm . ; \
178 mv $$DIR/RPMS/i386/xscreensaver*-$$VERS-*.rpm . ; \
180 ls -lFG xscreensaver*-$$VERS-*.rpm
184 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
185 D=xscreensaver-$$VERS ; \
186 NAME="$$D.tar.gz" ; \
187 if [ ! -f $$NAME ]; then \
188 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
195 if [ -d $$D ]; then \
199 zcat $$D.tar.gz | tar -xf - ; \
205 mkdir BIN/lesstif ; \
211 ../../configure --without-xpm --without-xdbe --without-xshm \
212 --with-motif=/usr/local/motif ; \
213 echo --------------------------------------------------------------- ; \
215 ( cd driver; gmake tests ) ; \
216 echo --------------------------------------------------------------- ); \
221 ../../configure --with-motif=/usr/local/lesstif --without-gnome ; \
222 echo --------------------------------------------------------------- ; \
223 ( cd utils; gmake all ) ; \
224 ( cd driver; gmake all ) ; \
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'?" ; \
242 if [ -f $$DEST/$$NAME ]; then \
243 echo -n "WARNING: $$DEST/$$NAME already exists! Overwrite? "; \
245 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
249 cp -p $$NAME $$DEST/$$NAME ; \
250 chmod u+w $$DEST/$$NAME ; \
254 sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ; \
256 diff -u0 download.html $$TMP ; \
259 OLDEST=`ls xscreensaver*.tar.gz | head -1` ; \
260 echo -n "Delete $$DEST/$$OLDEST? "; \
262 if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \
265 cvs remove $$OLDEST ; \
269 cvs add -kb $$NAME ; \
270 cat $$TMP > download.html ; \
273 (cd ..; $(MAKE) xscreensaver/changelog.html ); \
274 cvs diff -u0 changelog.html ; \
279 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
283 cvs commit -m "$$VERS"