1 # Makefile.in --- xscreensaver, Copyright (c) 1997 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 \
16 COMPRESS = gzip --verbose --best
21 MAKE_SUBDIR = for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) $@) || exit 5; done
49 -rm -f config.h Makefile config.status config.cache config.log TAGS *~ "#"*
54 # This really makes me sick...
60 $(MAKE) distdepend ; \
61 sh xscreensaver.lsm.sh > xscreensaver.lsm.$$$$ ; \
62 mv xscreensaver.lsm.$$$$ xscreensaver.lsm ; \
64 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ; \
65 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 $${NAME}.tar.$(COMPRESS_EXT)... ; \
77 `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` \
78 | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ; \
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 2.12.
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 D=`date '+%d-%b-%y'`; \
131 if [ ! -f xscreensaver-$$MAJOR.$$MINOR.tar.gz ]; then \
132 echo "WARNING: xscreensaver-$$MAJOR.$$MINOR.tar.gz does not exist."; \
134 if [ -f xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then \
135 echo "WARNING: xscreensaver-$$MAJOR.$$NEW.tar.gz already exists."; \
137 echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? "; \
139 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
143 sed -e "s/\([0-9]\.[0-9][0-9]*\)/$$MAJOR.$$NEW/" \
144 -e "s/\(([0-9][0-9]*-[A-Za-z][a-z][a-z]-[0-9][0-9][0-9]*\))/($$D)/" \
146 echo -n "New version and date are "; \
147 sed -n "s/[^0-9]*\([0-9]\.[0-9][0-9]*\) (\([-A-Za-z0-9]*\)).*/\1, \2./p" \
149 cat $$TMP > $$SRC ; \
151 echo "overwrote $$SRC"; \
156 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
157 D=xscreensaver-$$VERS ; \
158 NAME="$$D.tar.gz" ; \
159 if [ ! -f $$NAME ]; then \
160 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
167 if [ -d $$D ]; then \
171 zcat $$D.tar.gz | tar -xf - ; \
178 mkdir BIN/lesstif ; \
184 ../../configure --with-athena ; \
185 echo --------------------------------------------------------------- ; \
187 echo --------------------------------------------------------------- ); \
192 ../../configure --with-motif=/usr/local/motif ; \
193 echo --------------------------------------------------------------- ; \
194 ( cd utils; gmake ) ; \
195 ( cd driver; gmake ) ; \
196 echo --------------------------------------------------------------- ); \
201 ../../configure --with-motif=/usr/local/lesstif ; \
202 echo --------------------------------------------------------------- ; \
203 ( cd utils; gmake ) ; \
204 ( cd driver; gmake ) ; \
205 echo --------------------------------------------------------------- ); \
212 DEST=$$HOME/www/xscreensaver ; \
213 VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
214 HEAD="xscreensaver-$$VERS" ; \
215 NAME="$$HEAD.tar.gz" ; \
217 if [ ! -f $$NAME ]; then \
218 echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
221 if [ -f $$DEST/$$NAME ]; then \
222 echo -n "WARNING: $$DEST/$$NAME already exists! Overwrite? "; \
224 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
228 cp -p $$NAME $$DEST/$$NAME ; \
229 chmod u+w $$DEST/$$NAME ; \
233 sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ; \
235 diff -u0 download.html $$TMP ; \
238 OLDEST=`ls xscreensaver*.tar.gz | head -1` ; \
239 echo -n "Delete $$DEST/$$OLDEST? "; \
241 if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \
244 cvs remove $$OLDEST ; \
248 cvs add -kb $$NAME ; \
249 cat $$TMP > download.html ; \
252 (cd ..; $(MAKE) xscreensaver/changelog.html ); \
253 cvs diff -u0 changelog.html ; \
257 if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
261 cvs commit -m "$$VERS"