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
44 @cd po ; $(MAKE) generate_potfiles_in
52 -rm -f config.h Makefile config.status config.cache config.log TAGS *~ "#"* intltool-extract intltool-merge intltool-update
57 # This really makes me sick...
63 $(MAKE) distdepend ; \
65 's/[^0-9]*\([0-9]\.[0-9][0-9]*[0-9]*\).*/xscreensaver-\1/p' \
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.)
94 @TMP=configure.$$$$ ; \
95 echo "munging configure's --help message..." ; \
98 while (<>) { $$file .= $$_; } \
101 s/^(Configuration:)$$/\n$$1\n/m; \
102 s/^(Directory and file names:)$$/\n$$1\n/m; \
103 s/^ --sbindir=.*\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; \
118 s@mandir=.\$${prefix}/man.@mandir=\\\$${datadir}/man@; \
123 cat $$TMP > configure ) ; \
128 SRC=utils/version.h ; \
129 VERS=`sed -n 's/[^0-9]*\([0-9]\)\.\([0-9][^. ]*\).*/\1 \2/p' $$SRC` ; \
131 MAJOR="$$1"; MINOR="$$2"; \
132 NEW=`echo $$MINOR + 1 | bc` ; \
133 NEW=`echo $$NEW | sed 's/^\([0-9]\)$$/0\1/'` ; \
134 D=`date '+%d-%b-%Y'`; \
136 if [ ! -f $${ADIR}xscreensaver-$$MAJOR.$$MINOR.tar.gz ]; then \
137 echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$MINOR.tar.gz does not exist.";\
139 if [ -f $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then \
140 echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz already exists.";\
142 echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? "; \
144 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
148 sed -e "s/\([0-9]\.[0-9][0-9]*\)/$$MAJOR.$$NEW/" \
149 -e "s/\(([0-9][0-9]*-[A-Za-z][a-z][a-z]-[0-9][0-9][0-9]*\))/($$D)/" \
151 echo -n "New version and date are "; \
152 sed -n "s/[^0-9]*\([0-9]\.[0-9][0-9]*\) (\([-A-Za-z0-9]*\)).*/\1, \2./p" \
154 cat $$TMP > $$SRC ; \
156 echo "overwrote $$SRC"; \
159 bump_version:: bump-version
160 tick-version:: bump-version
161 tick_version:: bump-version
163 update_spec_version::
164 @S=$(srcdir)/xscreensaver.spec ; \
165 U=$(srcdir)/utils/version.h ; \
166 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' < $$U` ; \
167 echo -n "Updating $$S to \"$$VERS\"... " ; \
169 sed "s/^\(%define.version[^0-9]*\)\(.*\)/\1$$VERS/" \
171 if cmp -s $$S $$T ; then \
172 echo "unchanged." ; \
181 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' utils/version.h` ; \
182 DIR=`pwd`/rpm_build ; \
183 ARCH=`rpm --showrc | sed -n 's/^build arch *: //p'` ; \
185 TGZ=xscreensaver-$$VERS.tar.gz ; \
186 if [ ! -f $${ADIR}$$TGZ ]; then \
187 echo "$${ADIR}$$TGZ does not exist! Did you forget to \`make tar'?" ; \
190 rm -rf /var/tmp/xscreensaver-$$VERS-root ; \
193 ( cd $$DIR; mkdir BUILD RPMS RPMS/$$ARCH SOURCES SPECS SRPMS ) ; \
194 cp -p $${ADIR}$$TGZ $$DIR/SOURCES/ ; \
195 rpmbuild --define "_topdir $$DIR" \
196 --define "USE_GL yes" \
197 -v -ba xscreensaver.spec ; \
199 echo 'RPM build complete' ; \
201 rm -f $$DIR/$$TGZ ; \
202 rm -rf $$DIR/BUILD/xscreensaver-$$VERS ; \
203 mv $$DIR/SRPMS/xscreensaver*-$$VERS-*.rpm . ; \
204 mv $$DIR/RPMS/$$ARCH/xscreensaver*-$$VERS-*.rpm . ; \
207 ls -lFG xscreensaver*-$$VERS-*.rpm
211 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' utils/version.h` ; \
212 D=xscreensaver-$$VERS ; \
214 NAME="$${ADIR}$$D.tar.gz" ; \
215 if [ ! -f $$NAME ]; then \
216 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
223 if [ -d $$D ]; then \
227 zcat $${ADIR}$$D.tar.gz | tar -xf - ; \
233 mkdir BIN/lesstif ; \
239 ../../configure --without-xpm --without-xdbe --without-xshm \
240 --with-motif=/usr/local/motif ; \
241 echo --------------------------------------------------------------- ; \
243 ( cd driver; gmake tests ) ; \
244 echo --------------------------------------------------------------- ); \
249 ../../configure --with-motif=/usr/local/lesstif --without-gnome ; \
250 echo --------------------------------------------------------------- ; \
251 ( cd utils; gmake all ) ; \
252 ( cd driver; gmake all ) ; \
253 echo --------------------------------------------------------------- ); \
260 DEST=$$HOME/www/xscreensaver ; \
261 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' utils/version.h` ; \
262 HEAD="xscreensaver-$$VERS" ; \
264 BNAME="$$HEAD.tar.gz" ; \
265 NAME="$$ADIR$$BNAME" ; \
266 DNAME="$$DEST/$$HEAD.tar.gz" ; \
268 if [ ! -f $$NAME ]; then \
269 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
273 if [ -f $$DNAME ]; then \
274 echo -n "WARNING: $$DNAME already exists! Overwrite? "; \
276 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
280 cp -p $$NAME $$DNAME ; \
281 chmod u+w $$DNAME ; \
285 sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ; \
287 diff -U0 download.html $$TMP ; \
290 OLDEST=`ls xscreensaver*.tar.gz | head -1` ; \
291 echo -n "Delete $$DEST/$$OLDEST? "; \
293 if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \
296 cvs remove $$OLDEST ; \
300 cvs add -kb $$BNAME ; \
301 cat $$TMP > download.html ; \
304 (cd ..; $(MAKE) xscreensaver/changelog.html ); \
305 cvs diff -U0 changelog.html ; \
310 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
314 cvs commit -m "$$VERS"
317 @for file in `find . -name '*.*' \
318 \! -name '*~' \! -name '*.o' \! -name '*.gz' \! -name '*.Z' \
319 \! -name '*.po' \! -name 'config.*' \! -name '*.glade*' \
320 \! -name '*.m4' \! -name '*.pdb' \! -name '*.xpm' \
321 \! -name '*.jpg' \! -name '*.gif' \! -name '*.eps' \
322 \! -name '*.png' \! -name '*.tif' \! -name '*.bak' \
325 y=`date -r "$$file" '+%Y'` ; \
326 if ! ( grep "\b$$y\b" $$file >/dev/null ); then \
327 if ( grep "opyright\|(c)\|\.BR" $$file >/dev/null ); then \
328 echo "$$file does not mention $$y" ; \
335 echo -n "Current hack count: " ; \
336 ( ( cd hacks; make -s INSTALL=true install-program install-scripts ) ; \
337 ( cd hacks/glx; make -s INSTALL=true install-program ) ) | \