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 ; \
67 for subdir in $(SUBDIRS) ; do \
70 FILES="$$FILES `$(MAKE) echo_tarfiles \
71 | grep -v '^.*make\[' \
72 | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\" \
75 echo creating tar file $$ADIR$$NAME.tar.gz... ; \
76 GZIP="-9v" $(TAR) -vchzf $$ADIR$$NAME.tar.gz \
77 `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` ; \
81 # This also makes me sick...
82 # autoconf generates a configure script that begins with a very hard to read,
83 # nearly impossible to customize --help blurb. This horrid set of regexps
84 # go through and clean up the help text, by inserting whitespace and ripping
85 # out options we don't use. Odds are good that this will fail with any version
86 # of autoconf other than the ones I've tried (2.12 and 2.13.)
90 @TMP=configure.$$$$ ; \
91 echo "munging configure's --help message..." ; \
94 while (<>) { $$file .= $$_; } \
97 s/^(Configuration:)$$/\n$$1\n/m; \
98 s/^(Directory and file names:)$$/\n$$1\n/m; \
99 s/^ --sbindir=.*\n//m; \
100 s/^ --libexecdir.*\n//m; \
101 s/^ --datadir.*\n.*\n//m; \
102 s/^ --sysconfdir.*\n//m; \
103 s/^ --sharedstatedir.*\n.*\n//m; \
104 s/^ --localstatedir.*\n//m; \
105 s/^ --infodir.*\n//m; \
106 s/^(Host type:)$$/\n$$1\n/m; \
107 s/\nFeatures and packages:\n.*library files are in DIR\n/\n/s;\
108 s/--enable and --with options recognized://m; \
109 s/\n --with-x .*?(["\n])/$$1/s; \
110 s/\n(Installation options:\n)/$$1/s; \
112 s/^ --oldincludedir=.*$$/ \
113 --x-includes=DIR X include files are in DIR\n \
114 --x-libraries=DIR X library files are in DIR/m; \
119 cat $$TMP > configure ) ; \
124 SRC=utils/version.h ; \
125 VERS=`sed -n 's/[^0-9]*\([0-9]\)\.\([0-9][0-9]*\).*/\1 \2/p' $$SRC` ; \
127 MAJOR="$$1"; MINOR="$$2"; \
128 NEW=`echo $$MINOR + 1 | bc` ; \
129 NEW=`echo $$NEW | sed 's/^\([0-9]\)$$/0\1/'` ; \
130 D=`date '+%d-%b-%Y'`; \
132 if [ ! -f $${ADIR}xscreensaver-$$MAJOR.$$MINOR.tar.gz ]; then \
133 echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$MINOR.tar.gz does not exist.";\
135 if [ -f $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then \
136 echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz already exists.";\
138 echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? "; \
140 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
144 sed -e "s/\([0-9]\.[0-9][0-9]*\)/$$MAJOR.$$NEW/" \
145 -e "s/\(([0-9][0-9]*-[A-Za-z][a-z][a-z]-[0-9][0-9][0-9]*\))/($$D)/" \
147 echo -n "New version and date are "; \
148 sed -n "s/[^0-9]*\([0-9]\.[0-9][0-9]*\) (\([-A-Za-z0-9]*\)).*/\1, \2./p" \
150 cat $$TMP > $$SRC ; \
152 echo "overwrote $$SRC"; \
155 update_spec_version::
156 @S=$(srcdir)/xscreensaver.spec ; \
157 U=$(srcdir)/utils/version.h ; \
158 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
159 echo -n "Updating version number in $$S to \"$$V\"... " ; \
161 sed "s/^\(%define.version[^0-9]*\)\(.*\)/\1$$V/" \
163 if cmp -s $$S $$T ; then \
164 echo "unchanged." ; \
173 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
174 DIR=`pwd`/rpm_build ; \
175 ARCH=`rpm --showrc | sed -n 's/^build arch *: //p'` ; \
179 ( cd $$DIR; mkdir BUILD RPMS RPMS/$$ARCH SOURCES SPECS SRPMS ) ; \
180 cp -p $${ADIR}xscreensaver-$$VERS.tar.gz $$DIR/SOURCES/ ; \
181 rpm --define "_topdir $$DIR" \
182 --define "USE_GL yes" \
183 -v -ba xscreensaver.spec ; \
185 echo 'RPM build complete' ; \
187 rm -f $$DIR/xscreensaver-$$VERS.tar.gz ; \
188 rm -rf $$DIR/BUILD/xscreensaver-$$VERS ; \
189 mv $$DIR/SRPMS/xscreensaver*-$$VERS-*.rpm . ; \
190 mv $$DIR/RPMS/$$ARCH/xscreensaver*-$$VERS-*.rpm . ; \
193 ls -lFG xscreensaver*-$$VERS-*.rpm
197 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
198 D=xscreensaver-$$VERS ; \
200 NAME="$${ADIR}$$D.tar.gz" ; \
201 if [ ! -f $$NAME ]; then \
202 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
209 if [ -d $$D ]; then \
213 zcat $${ADIR}$$D.tar.gz | tar -xf - ; \
219 mkdir BIN/lesstif ; \
225 ../../configure --without-xpm --without-xdbe --without-xshm \
226 --with-motif=/usr/local/motif ; \
227 echo --------------------------------------------------------------- ; \
229 ( cd driver; gmake tests ) ; \
230 echo --------------------------------------------------------------- ); \
235 ../../configure --with-motif=/usr/local/lesstif --without-gnome ; \
236 echo --------------------------------------------------------------- ; \
237 ( cd utils; gmake all ) ; \
238 ( cd driver; gmake all ) ; \
239 echo --------------------------------------------------------------- ); \
246 DEST=$$HOME/www/xscreensaver ; \
247 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
248 HEAD="xscreensaver-$$VERS" ; \
250 NAME="$$ADIR$$HEAD.tar.gz" ; \
252 if [ ! -f $$NAME ]; then \
253 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
257 if [ -f $$DEST/$$NAME ]; then \
258 echo -n "WARNING: $$DEST/$$NAME already exists! Overwrite? "; \
260 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
264 cp -p $$NAME $$DEST/$$NAME ; \
265 chmod u+w $$DEST/$$NAME ; \
269 sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ; \
271 diff -u0 download.html $$TMP ; \
274 OLDEST=`ls xscreensaver*.tar.gz | head -1` ; \
275 echo -n "Delete $$DEST/$$OLDEST? "; \
277 if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \
280 cvs remove $$OLDEST ; \
284 cvs add -kb $$NAME ; \
285 cat $$TMP > download.html ; \
288 (cd ..; $(MAKE) xscreensaver/changelog.html ); \
289 cvs diff -u0 changelog.html ; \
294 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
298 cvs commit -m "$$VERS"