1 # Makefile.in --- xscreensaver, Copyright (c) 1999-2005 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 \
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 \
14 intltool-merge.in intltool-extract.in intltool-update.in \
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 ; \
63 's/[^0-9]*\([0-9]\.[0-9][0-9]*b\?[0-9]*\).*/xscreensaver-\1/p' \
65 rm -rf $$NAME ; ln -s . $$NAME ; \
68 for subdir in $(SUBDIRS) ; do \
71 FILES="$$FILES `$(MAKE) echo_tarfiles \
72 | grep -v '^.*make\[' \
73 | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\" \
76 echo creating tar file $$ADIR$$NAME.tar.gz... ; \
77 GZIP="-9v" $(TAR) -vchzf $$ADIR$$NAME.tar.gz \
78 `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` ; \
82 # This also makes me sick...
83 # autoconf generates a configure script that begins with a very hard to read,
84 # nearly impossible to customize --help blurb. This horrid set of regexps
85 # go through and clean up the help text, by inserting whitespace and ripping
86 # out options we don't use. Odds are good that this will fail with any version
87 # of autoconf other than the ones I've tried (2.12 and 2.13.)
91 @TMP=configure.$$$$ ; \
92 echo "munging configure's --help message..." ; \
95 while (<>) { $$file .= $$_; } \
98 s/^(Configuration:)$$/\n$$1\n/m; \
99 s/^(Directory and file names:)$$/\n$$1\n/m; \
100 s/^ --sbindir=.*\n//m; \
101 s/^ --libexecdir.*\n//m; \
102 s/^ --datadir.*\n.*\n//m; \
103 s/^ --sysconfdir.*\n//m; \
104 s/^ --sharedstatedir.*\n.*\n//m; \
105 s/^ --localstatedir.*\n//m; \
106 s/^ --infodir.*\n//m; \
107 s/^(Host type:)$$/\n$$1\n/m; \
108 s/\nFeatures and packages:\n.*library files are in DIR\n/\n/s;\
109 s/--enable and --with options recognized://m; \
110 s/\n --with-x .*?(["\n])/$$1/s; \
111 s/\n(Installation options:\n)/$$1/s; \
113 s/^ --oldincludedir=.*$$/ \
114 --x-includes=DIR X include files are in DIR\n \
115 --x-libraries=DIR X library files are in DIR/m; \
120 cat $$TMP > configure ) ; \
125 SRC=utils/version.h ; \
126 VERS=`sed -n 's/[^0-9]*\([0-9]\)\.\([0-9][0-9]*\).*/\1 \2/p' $$SRC` ; \
128 MAJOR="$$1"; MINOR="$$2"; \
129 NEW=`echo $$MINOR + 1 | bc` ; \
130 NEW=`echo $$NEW | sed 's/^\([0-9]\)$$/0\1/'` ; \
131 D=`date '+%d-%b-%Y'`; \
133 if [ ! -f $${ADIR}xscreensaver-$$MAJOR.$$MINOR.tar.gz ]; then \
134 echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$MINOR.tar.gz does not exist.";\
136 if [ -f $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then \
137 echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz already exists.";\
139 echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? "; \
141 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
145 sed -e "s/\([0-9]\.[0-9][0-9]*\)/$$MAJOR.$$NEW/" \
146 -e "s/\(([0-9][0-9]*-[A-Za-z][a-z][a-z]-[0-9][0-9][0-9]*\))/($$D)/" \
148 echo -n "New version and date are "; \
149 sed -n "s/[^0-9]*\([0-9]\.[0-9][0-9]*\) (\([-A-Za-z0-9]*\)).*/\1, \2./p" \
151 cat $$TMP > $$SRC ; \
153 echo "overwrote $$SRC"; \
156 bump_version:: bump-version
157 tick-version:: bump-version
158 tick_version:: bump-version
160 update_spec_version::
161 @S=$(srcdir)/xscreensaver.spec ; \
162 U=$(srcdir)/utils/version.h ; \
163 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
164 echo -n "Updating $$S to \"$$V\"... " ; \
166 sed "s/^\(%define.version[^0-9]*\)\(.*\)/\1$$V/" \
168 if cmp -s $$S $$T ; then \
169 echo "unchanged." ; \
178 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
179 DIR=`pwd`/rpm_build ; \
180 ARCH=`rpm --showrc | sed -n 's/^build arch *: //p'` ; \
182 TGZ=xscreensaver-$$VERS.tar.gz ; \
183 if [ ! -f $${ADIR}$$TGZ ]; then \
184 echo "$${ADIR}$$TGZ does not exist! Did you forget to \`make tar'?" ; \
187 rm -rf /var/tmp/xscreensaver-$$VERS-root ; \
190 ( cd $$DIR; mkdir BUILD RPMS RPMS/$$ARCH SOURCES SPECS SRPMS ) ; \
191 cp -p $${ADIR}$$TGZ $$DIR/SOURCES/ ; \
192 rpmbuild --define "_topdir $$DIR" \
193 --define "USE_GL yes" \
194 -v -ba xscreensaver.spec ; \
196 echo 'RPM build complete' ; \
198 rm -f $$DIR/$$TGZ ; \
199 rm -rf $$DIR/BUILD/xscreensaver-$$VERS ; \
200 mv $$DIR/SRPMS/xscreensaver*-$$VERS-*.rpm . ; \
201 mv $$DIR/RPMS/$$ARCH/xscreensaver*-$$VERS-*.rpm . ; \
204 ls -lFG xscreensaver*-$$VERS-*.rpm
208 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
209 D=xscreensaver-$$VERS ; \
211 NAME="$${ADIR}$$D.tar.gz" ; \
212 if [ ! -f $$NAME ]; then \
213 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
220 if [ -d $$D ]; then \
224 zcat $${ADIR}$$D.tar.gz | tar -xf - ; \
230 mkdir BIN/lesstif ; \
236 ../../configure --without-xpm --without-xdbe --without-xshm \
237 --with-motif=/usr/local/motif ; \
238 echo --------------------------------------------------------------- ; \
240 ( cd driver; gmake tests ) ; \
241 echo --------------------------------------------------------------- ); \
246 ../../configure --with-motif=/usr/local/lesstif --without-gnome ; \
247 echo --------------------------------------------------------------- ; \
248 ( cd utils; gmake all ) ; \
249 ( cd driver; gmake all ) ; \
250 echo --------------------------------------------------------------- ); \
257 DEST=$$HOME/www/xscreensaver ; \
258 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
259 HEAD="xscreensaver-$$VERS" ; \
261 BNAME="$$HEAD.tar.gz" ; \
262 NAME="$$ADIR$$BNAME" ; \
263 DNAME="$$DEST/$$HEAD.tar.gz" ; \
265 if [ ! -f $$NAME ]; then \
266 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
270 if [ -f $$DNAME ]; then \
271 echo -n "WARNING: $$DNAME already exists! Overwrite? "; \
273 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
277 cp -p $$NAME $$DNAME ; \
278 chmod u+w $$DNAME ; \
282 sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ; \
284 diff -U0 download.html $$TMP ; \
287 OLDEST=`ls xscreensaver*.tar.gz | head -1` ; \
288 echo -n "Delete $$DEST/$$OLDEST? "; \
290 if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \
293 cvs remove $$OLDEST ; \
297 cvs add -kb $$BNAME ; \
298 cat $$TMP > download.html ; \
301 (cd ..; $(MAKE) xscreensaver/changelog.html ); \
302 cvs diff -U0 changelog.html ; \
307 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
311 cvs commit -m "$$VERS"
314 @for file in `find . -name '*.*' \
315 \! -name '*~' \! -name '*.o' \! -name '*.gz' \! -name '*.Z' \
316 \! -name '*.po' \! -name 'config.*' \! -name '*.glade*' \
317 \! -name '*.m4' \! -name '*.pdb' \! -name '*.xpm' \
318 \! -name '*.jpg' \! -name '*.gif' \! -name '*.eps' \
319 \! -name '*.png' \! -name '*.tif' \! -name '*.bak' \
322 y=`date -r "$$file" '+%Y'` ; \
323 if ! ( grep "\b$$y\b" $$file >/dev/null ); then \
324 if ( grep "opyright\|(c)\|\.BR" $$file >/dev/null ); then \
325 echo "$$file does not mention $$y" ; \
332 echo -n "Current hack count: " ; \
333 ( ( cd hacks; make -s INSTALL=true install-program install-scripts ) ; \
334 ( cd hacks/glx; make -s INSTALL=true install-program ) ) | \