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 po
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 aclocal.m4 \
13 config.sub install-sh makevms.com \
14 intltool-merge.in intltool-extract.in intltool-update.in \
15 xscreensaver.lsm.sh xscreensaver.spec \
19 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 *~ "#"* intltool-extract intltool-merge intltool-update
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 ; \
69 for subdir in $(SUBDIRS) ; do \
72 FILES="$$FILES `$(MAKE) echo_tarfiles \
73 | grep -v '^.*make\[' \
74 | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\" \
77 echo creating tar file $$ADIR$$NAME.tar.gz... ; \
78 GZIP="-9v" $(TAR) -vchzf $$ADIR$$NAME.tar.gz \
79 `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` ; \
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'`; \
134 if [ ! -f $${ADIR}xscreensaver-$$MAJOR.$$MINOR.tar.gz ]; then \
135 echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$MINOR.tar.gz does not exist.";\
137 if [ -f $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then \
138 echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz already exists.";\
140 echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? "; \
142 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
146 sed -e "s/\([0-9]\.[0-9][0-9]*\)/$$MAJOR.$$NEW/" \
147 -e "s/\(([0-9][0-9]*-[A-Za-z][a-z][a-z]-[0-9][0-9][0-9]*\))/($$D)/" \
149 echo -n "New version and date are "; \
150 sed -n "s/[^0-9]*\([0-9]\.[0-9][0-9]*\) (\([-A-Za-z0-9]*\)).*/\1, \2./p" \
152 cat $$TMP > $$SRC ; \
154 echo "overwrote $$SRC"; \
157 update_spec_version::
158 @S=$(srcdir)/xscreensaver.spec ; \
159 U=$(srcdir)/utils/version.h ; \
160 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
161 echo -n "Updating $$S to \"$$V\"... " ; \
163 sed "s/^\(%define.version[^0-9]*\)\(.*\)/\1$$V/" \
165 if cmp -s $$S $$T ; then \
166 echo "unchanged." ; \
175 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
176 DIR=`pwd`/rpm_build ; \
177 ARCH=`rpm --showrc | sed -n 's/^build arch *: //p'` ; \
179 TGZ=xscreensaver-$$VERS.tar.gz ; \
180 if [ ! -f $${ADIR}$$TGZ ]; then \
181 echo "$${ADIR}$$TGZ does not exist! Did you forget to \`make tar'?" ; \
184 rm -rf /var/tmp/xscreensaver-$$VERS-root ; \
187 ( cd $$DIR; mkdir BUILD RPMS RPMS/$$ARCH SOURCES SPECS SRPMS ) ; \
188 cp -p $${ADIR}$$TGZ $$DIR/SOURCES/ ; \
189 rpm --define "_topdir $$DIR" \
190 --define "USE_GL yes" \
191 -v -ba xscreensaver.spec ; \
193 echo 'RPM build complete' ; \
195 rm -f $$DIR/$$TGZ ; \
196 rm -rf $$DIR/BUILD/xscreensaver-$$VERS ; \
197 mv $$DIR/SRPMS/xscreensaver*-$$VERS-*.rpm . ; \
198 mv $$DIR/RPMS/$$ARCH/xscreensaver*-$$VERS-*.rpm . ; \
201 ls -lFG xscreensaver*-$$VERS-*.rpm
205 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
206 D=xscreensaver-$$VERS ; \
208 NAME="$${ADIR}$$D.tar.gz" ; \
209 if [ ! -f $$NAME ]; then \
210 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
217 if [ -d $$D ]; then \
221 zcat $${ADIR}$$D.tar.gz | tar -xf - ; \
227 mkdir BIN/lesstif ; \
233 ../../configure --without-xpm --without-xdbe --without-xshm \
234 --with-motif=/usr/local/motif ; \
235 echo --------------------------------------------------------------- ; \
237 ( cd driver; gmake tests ) ; \
238 echo --------------------------------------------------------------- ); \
243 ../../configure --with-motif=/usr/local/lesstif --without-gnome ; \
244 echo --------------------------------------------------------------- ; \
245 ( cd utils; gmake all ) ; \
246 ( cd driver; gmake all ) ; \
247 echo --------------------------------------------------------------- ); \
254 DEST=$$HOME/www/xscreensaver ; \
255 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
256 HEAD="xscreensaver-$$VERS" ; \
258 BNAME="$$HEAD.tar.gz" ; \
259 NAME="$$ADIR$$BNAME" ; \
260 DNAME="$$DEST/$$HEAD.tar.gz" ; \
262 if [ ! -f $$NAME ]; then \
263 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
267 if [ -f $$DNAME ]; then \
268 echo -n "WARNING: $$DNAME already exists! Overwrite? "; \
270 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
274 cp -p $$NAME $$DNAME ; \
275 chmod u+w $$DNAME ; \
279 sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ; \
281 diff -u0 download.html $$TMP ; \
284 OLDEST=`ls xscreensaver*.tar.gz | head -1` ; \
285 echo -n "Delete $$DEST/$$OLDEST? "; \
287 if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \
290 cvs remove $$OLDEST ; \
294 cvs add -kb $$BNAME ; \
295 cat $$TMP > download.html ; \
298 (cd ..; $(MAKE) xscreensaver/changelog.html ); \
299 cvs diff -u0 changelog.html ; \
304 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
308 cvs commit -m "$$VERS"