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 makevms.com screenblank.txt \
15 intltool-merge.in intltool-extract.in intltool-update.in \
16 xscreensaver.lsm.sh xscreensaver.spec \
20 MAKE_SUBDIR = for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) $@) || exit 5; done
43 @$(MAKE) update_spec_version
51 -rm -f config.h Makefile config.status config.cache config.log TAGS *~ "#"* intltool-extract intltool-merge intltool-update
56 # This really makes me sick...
62 $(MAKE) distdepend ; \
63 sh xscreensaver.lsm.sh > xscreensaver.lsm.$$$$ ; \
64 mv xscreensaver.lsm.$$$$ xscreensaver.lsm ; \
66 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ; \
67 rm -rf $$NAME ; ln -s . $$NAME ; \
70 for subdir in $(SUBDIRS) ; do \
73 FILES="$$FILES `$(MAKE) echo_tarfiles \
74 | grep -v '^.*make\[' \
75 | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\" \
78 echo creating tar file $$ADIR$$NAME.tar.gz... ; \
79 GZIP="-9v" $(TAR) -vchzf $$ADIR$$NAME.tar.gz \
80 `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` ; \
84 # This also makes me sick...
85 # autoconf generates a configure script that begins with a very hard to read,
86 # nearly impossible to customize --help blurb. This horrid set of regexps
87 # go through and clean up the help text, by inserting whitespace and ripping
88 # out options we don't use. Odds are good that this will fail with any version
89 # of autoconf other than the ones I've tried (2.12 and 2.13.)
93 @TMP=configure.$$$$ ; \
94 echo "munging configure's --help message..." ; \
97 while (<>) { $$file .= $$_; } \
100 s/^(Configuration:)$$/\n$$1\n/m; \
101 s/^(Directory and file names:)$$/\n$$1\n/m; \
102 s/^ --sbindir=.*\n//m; \
103 s/^ --libexecdir.*\n//m; \
104 s/^ --datadir.*\n.*\n//m; \
105 s/^ --sysconfdir.*\n//m; \
106 s/^ --sharedstatedir.*\n.*\n//m; \
107 s/^ --localstatedir.*\n//m; \
108 s/^ --infodir.*\n//m; \
109 s/^(Host type:)$$/\n$$1\n/m; \
110 s/\nFeatures and packages:\n.*library files are in DIR\n/\n/s;\
111 s/--enable and --with options recognized://m; \
112 s/\n --with-x .*?(["\n])/$$1/s; \
113 s/\n(Installation options:\n)/$$1/s; \
115 s/^ --oldincludedir=.*$$/ \
116 --x-includes=DIR X include files are in DIR\n \
117 --x-libraries=DIR X library files are in DIR/m; \
122 cat $$TMP > configure ) ; \
127 SRC=utils/version.h ; \
128 VERS=`sed -n 's/[^0-9]*\([0-9]\)\.\([0-9][0-9]*\).*/\1 \2/p' $$SRC` ; \
130 MAJOR="$$1"; MINOR="$$2"; \
131 NEW=`echo $$MINOR + 1 | bc` ; \
132 NEW=`echo $$NEW | sed 's/^\([0-9]\)$$/0\1/'` ; \
133 D=`date '+%d-%b-%Y'`; \
135 if [ ! -f $${ADIR}xscreensaver-$$MAJOR.$$MINOR.tar.gz ]; then \
136 echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$MINOR.tar.gz does not exist.";\
138 if [ -f $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then \
139 echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz already exists.";\
141 echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? "; \
143 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
147 sed -e "s/\([0-9]\.[0-9][0-9]*\)/$$MAJOR.$$NEW/" \
148 -e "s/\(([0-9][0-9]*-[A-Za-z][a-z][a-z]-[0-9][0-9][0-9]*\))/($$D)/" \
150 echo -n "New version and date are "; \
151 sed -n "s/[^0-9]*\([0-9]\.[0-9][0-9]*\) (\([-A-Za-z0-9]*\)).*/\1, \2./p" \
153 cat $$TMP > $$SRC ; \
155 echo "overwrote $$SRC"; \
158 update_spec_version::
159 @S=$(srcdir)/xscreensaver.spec ; \
160 U=$(srcdir)/utils/version.h ; \
161 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
162 echo -n "Updating version number in $$S to \"$$V\"... " ; \
164 sed "s/^\(%define.version[^0-9]*\)\(.*\)/\1$$V/" \
166 if cmp -s $$S $$T ; then \
167 echo "unchanged." ; \
176 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
177 DIR=`pwd`/rpm_build ; \
178 ARCH=`rpm --showrc | sed -n 's/^build arch *: //p'` ; \
180 TGZ=xscreensaver-$$VERS.tar.gz ; \
181 if [ ! -f $${ADIR}$$TGZ ]; then \
182 echo "$${ADIR}$$TGZ does not exist! Did you forget to \`make tar'?" ; \
185 rm -rf /var/tmp/xscreensaver-$$VERS-root ; \
188 ( cd $$DIR; mkdir BUILD RPMS RPMS/$$ARCH SOURCES SPECS SRPMS ) ; \
189 cp -p $${ADIR}$$TGZ $$DIR/SOURCES/ ; \
190 rpm --define "_topdir $$DIR" \
191 --define "USE_GL yes" \
192 -v -ba xscreensaver.spec ; \
194 echo 'RPM build complete' ; \
196 rm -f $$DIR/$$TGZ ; \
197 rm -rf $$DIR/BUILD/xscreensaver-$$VERS ; \
198 mv $$DIR/SRPMS/xscreensaver*-$$VERS-*.rpm . ; \
199 mv $$DIR/RPMS/$$ARCH/xscreensaver*-$$VERS-*.rpm . ; \
202 ls -lFG xscreensaver*-$$VERS-*.rpm
206 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
207 D=xscreensaver-$$VERS ; \
209 NAME="$${ADIR}$$D.tar.gz" ; \
210 if [ ! -f $$NAME ]; then \
211 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
218 if [ -d $$D ]; then \
222 zcat $${ADIR}$$D.tar.gz | tar -xf - ; \
228 mkdir BIN/lesstif ; \
234 ../../configure --without-xpm --without-xdbe --without-xshm \
235 --with-motif=/usr/local/motif ; \
236 echo --------------------------------------------------------------- ; \
238 ( cd driver; gmake tests ) ; \
239 echo --------------------------------------------------------------- ); \
244 ../../configure --with-motif=/usr/local/lesstif --without-gnome ; \
245 echo --------------------------------------------------------------- ; \
246 ( cd utils; gmake all ) ; \
247 ( cd driver; gmake all ) ; \
248 echo --------------------------------------------------------------- ); \
255 DEST=$$HOME/www/xscreensaver ; \
256 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
257 HEAD="xscreensaver-$$VERS" ; \
259 BNAME="$$HEAD.tar.gz" ; \
260 NAME="$$ADIR$$BNAME" ; \
261 DNAME="$$DEST/$$HEAD.tar.gz" ; \
263 if [ ! -f $$NAME ]; then \
264 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
268 if [ -f $$DNAME ]; then \
269 echo -n "WARNING: $$DNAME already exists! Overwrite? "; \
271 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
275 cp -p $$NAME $$DNAME ; \
276 chmod u+w $$DNAME ; \
280 sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ; \
282 diff -u0 download.html $$TMP ; \
285 OLDEST=`ls xscreensaver*.tar.gz | head -1` ; \
286 echo -n "Delete $$DEST/$$OLDEST? "; \
288 if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \
291 cvs remove $$OLDEST ; \
295 cvs add -kb $$BNAME ; \
296 cat $$TMP > download.html ; \
299 (cd ..; $(MAKE) xscreensaver/changelog.html ); \
300 cvs diff -u0 changelog.html ; \
305 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
309 cvs commit -m "$$VERS"