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'` ; \
177 TGZ=xscreensaver-$$VERS.tar.gz ; \
178 if [ ! -f $${ADIR}$$TGZ ]; then \
179 echo "$${ADIR}$$TGZ does not exist! Did you forget to \`make tar'?" ; \
182 rm -rf /var/tmp/xscreensaver-$$VERS-root ; \
185 ( cd $$DIR; mkdir BUILD RPMS RPMS/$$ARCH SOURCES SPECS SRPMS ) ; \
186 cp -p $${ADIR}$$TGZ $$DIR/SOURCES/ ; \
187 rpm --define "_topdir $$DIR" \
188 --define "USE_GL yes" \
189 -v -ba xscreensaver.spec ; \
191 echo 'RPM build complete' ; \
193 rm -f $$DIR/$$TGZ ; \
194 rm -rf $$DIR/BUILD/xscreensaver-$$VERS ; \
195 mv $$DIR/SRPMS/xscreensaver*-$$VERS-*.rpm . ; \
196 mv $$DIR/RPMS/$$ARCH/xscreensaver*-$$VERS-*.rpm . ; \
199 ls -lFG xscreensaver*-$$VERS-*.rpm
203 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
204 D=xscreensaver-$$VERS ; \
206 NAME="$${ADIR}$$D.tar.gz" ; \
207 if [ ! -f $$NAME ]; then \
208 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
215 if [ -d $$D ]; then \
219 zcat $${ADIR}$$D.tar.gz | tar -xf - ; \
225 mkdir BIN/lesstif ; \
231 ../../configure --without-xpm --without-xdbe --without-xshm \
232 --with-motif=/usr/local/motif ; \
233 echo --------------------------------------------------------------- ; \
235 ( cd driver; gmake tests ) ; \
236 echo --------------------------------------------------------------- ); \
241 ../../configure --with-motif=/usr/local/lesstif --without-gnome ; \
242 echo --------------------------------------------------------------- ; \
243 ( cd utils; gmake all ) ; \
244 ( cd driver; gmake all ) ; \
245 echo --------------------------------------------------------------- ); \
252 DEST=$$HOME/www/xscreensaver ; \
253 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
254 HEAD="xscreensaver-$$VERS" ; \
256 BNAME="$$HEAD.tar.gz" ; \
257 NAME="$$ADIR$$BNAME" ; \
258 DNAME="$$DEST/$$HEAD.tar.gz" ; \
260 if [ ! -f $$NAME ]; then \
261 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
265 if [ -f $$DNAME ]; then \
266 echo -n "WARNING: $$DNAME already exists! Overwrite? "; \
268 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
272 cp -p $$NAME $$DNAME ; \
273 chmod u+w $$DNAME ; \
277 sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ; \
279 diff -u0 download.html $$TMP ; \
282 OLDEST=`ls xscreensaver*.tar.gz | head -1` ; \
283 echo -n "Delete $$DEST/$$OLDEST? "; \
285 if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \
288 cvs remove $$OLDEST ; \
292 cvs add -kb $$BNAME ; \
293 cat $$TMP > download.html ; \
296 (cd ..; $(MAKE) xscreensaver/changelog.html ); \
297 cvs diff -u0 changelog.html ; \
302 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
306 cvs commit -m "$$VERS"