1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483
|
# Makefile.in --- xscreensaver, Copyright © 1999-2023 Jamie Zawinski.
# the `../configure' script generates `Makefile' from this file.
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
SHELL = /bin/sh
SUBDIRS = utils jwxyz hacks/images hacks hacks/glx hacks/fonts \
driver po
SUBDIRS2 = $(SUBDIRS)
TARFILES = README README.hacking INSTALL \
configure configure.ac Makefile.in config.h.in \
install-sh config.guess config.rpath aclocal.m4 \
ax_pthread.m4 config.sub \
intltool-merge.in intltool-extract.in intltool-update.in \
xscreensaver.spec
TAR = gnutar
TAR_ARGS = --owner=0 --group=0 --posix --no-acls --no-xattrs --no-selinux
# Using $(MAKE) directly means the shell executes things even with "make -n"
MAKE2 = $(MAKE)
MAKE_SUBDIR = for dir in $(SUBDIRS); do (cd $$dir && $(MAKE2) $@) || exit 5; done
MAKE_SUBDIR2 = for dir in $(SUBDIRS2); do (cd $$dir && $(MAKE2) $@) || exit 5; done
default::
@+$(MAKE_SUBDIR)
all::
@+$(MAKE_SUBDIR)
install::
@+$(MAKE_SUBDIR)
install-program::
@+$(MAKE_SUBDIR)
install-man::
@+$(MAKE_SUBDIR)
install-strip::
@+$(MAKE_SUBDIR)
uninstall::
@$(MAKE_SUBDIR)
uninstall-program::
@$(MAKE_SUBDIR)
uninstall-man::
@$(MAKE_SUBDIR)
depend::
@$(MAKE_SUBDIR)
distdepend::
@$(MAKE2) update_spec_version
@$(MAKE_SUBDIR2)
@cd po ; $(MAKE2) update-po
TAGS:: tags
tags::
@$(MAKE_SUBDIR)
clean::
@$(MAKE_SUBDIR)
distclean:: clean
@$(MAKE_SUBDIR2)
-rm -f config.h Makefile config.status config.cache config.log TAGS *~ "#"* intltool-extract intltool-merge intltool-update
dist:: tar
# This really makes me sick...
tar::
@ \
sh config.status ; \
rm -f configure ; \
$(MAKE2) configure ; \
$(MAKE2) version-date distdepend ; \
$(MAKE2) _tar
list_tarfiles:
@find $(TARFILES) -type f -print | sort
_tar:
@ \
VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' utils/version.h | \
head -1` ; \
NAME="xscreensaver-$$VERS" ; \
rm -rf $$NAME ; ln -s . $$NAME ; \
LIST="tar$$$$.txt" ; \
ADIR=archive/ ; \
rm -f "$$LIST" ; \
for subdir in . $(SUBDIRS2) ; do \
( cd $$subdir ; \
$(MAKE2) list_tarfiles \
| grep -v '^.*make\[' \
| sed -e "s@^@$$NAME/$$subdir/@g" \
| sed -e "s@/\./@/@g" \
) >> "$$LIST" ; \
done ; \
echo creating tar file $$ADIR$$NAME.tar.gz... ; \
export COPYFILE_DISABLE=true ; \
export GZIP="-9v" ; \
$(TAR) -vczf $$ADIR$$NAME.tar.gz -T "$$LIST" $(TAR_ARGS) ; \
rm "$$LIST" "$$NAME"
# This also makes me sick...
# autoconf generates a configure script that begins with a very hard to read,
# nearly impossible to customize --help blurb. This horrid set of regexps
# go through and clean up the help text, by inserting whitespace and ripping
# out options we don't use. Odds are good that this will fail with any version
# of autoconf other than the ones I've tried (2.12 and 2.13.)
#
configure::
rm -f configure
aclocal
autoconf
autoheader
configure::
@TMP=configure.$$$$ ; \
echo "munging configure's --help message..." ; \
( perl -e ' \
my $$file=""; \
while (<>) { $$file .= $$_; } \
$$_ = $$file; \
\
s/\nInstallation directories:.*?\n\n/\n/s; \
s/\nOptional Features:.*?\n\n/\n/s; \
s/\nOptional Packages:.*?\n\n/\n/s; \
\
s/^ +--sbindir=.*\n//m; \
s/^ +--sysconfdir.*\n//m; \
s/^ +--sharedstatedir.*\n.*\n//m; \
s/^ +--oldincludedir.*\n//m; \
s/^ +--infodir.*\n//m; \
s/^ +--htmldir.*\n//m; \
s/^ +--dvidir.*\n//m; \
s/^ +--pdfdir.*\n//m; \
s/^ +--psdir.*\n//m; \
s/^ +--with-x .*\n//m; \
\
s/(\n\n)\n+/$$1/gs; \
\
s/rm -f conftest/rm -rf conftest/g; \
\
print;' \
< configure \
> $$TMP && \
cat $$TMP > configure ) ; \
rm -f $$TMP
# WARNING: This stands a good chance of breaking the world.
# Be prepared to roll back all of /opt/local/ from Time Machine.
automake-upgrade:
sudo port upgrade autoconf automake libtool autoconf-archive
cp -p /opt/local/share/automake*/{config.guess,config.sub,install-sh} .
cp -p /opt/local/share/libtool/aclocal.m4 .
cp -p /opt/local/share/aclocal/ax_pthread.m4 .
echo also consider autoupdate
$(MAKE2) configure
bump-version::
@ \
SRC=utils/version.h ; \
VERS=`sed -n \
's/[^0-9]*\([0-9]\)\.\([0-9][0-9]*\)\([^. \"]*\).*/\1 \2 \3/p' $$SRC | \
head -1` ; \
set - $$VERS ; \
MAJOR="$$1"; MINOR="$$2"; SUF="$$3"; \
VERS="$$MAJOR.$$MINOR$$SUF" ; \
if [ -z "$$SUF" ]; then \
MINOR=`echo $$MINOR + 1 | bc | sed 's/^\(.\)/0\1/'` ; \
else \
set - `echo $$SUF | sed 's/^\([^0-9]*\)/\1 /'` ; \
AA="$$1"; BB="$$2"; \
BB=`echo $$BB + 1 | bc` ; \
SUF="$$AA$$BB" ; \
fi ; \
VERS2="$$MAJOR.$$MINOR$$SUF" ; \
ADIR=archive/ ; \
if [ ! -f "$${ADIR}xscreensaver-$$VERS.tar.gz" ]; then \
echo "WARNING: $${ADIR}xscreensaver-$$VERS.tar.gz does not exist."; \
fi ; \
if [ -f "$${ADIR}xscreensaver-$$VERS2.tar.gz" ]; then \
echo "WARNING: $${ADIR}xscreensaver-$$VERS2.tar.gz already exists."; \
fi ; \
/bin/echo -n "Bumping $$VERS to $$VERS2, ok? "; \
read line; \
if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
exit 1 ; \
fi ; \
\
TMP=/tmp/bv.$$ ; \
sed -e "s/\([0-9]\.[0-9][^. \"]*\)/$$VERS2/" $$SRC > $$TMP ; \
if cmp -s $$SRC $$TMP ; then \
echo "ERROR! UNCHANGED!" ; \
exit 1 ; \
fi ; \
\
cat $$TMP > $$SRC ; \
rm -f $$TMP; \
\
VERS3=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. \"]*\).*/\1/p' < $$SRC | \
tail -1`; \
if [ x"$$VERS2" != x"$$VERS3" ]; then \
echo "ERROR! \"$$VERS2\" vs \"$$VERS3\"!" ; \
exit 1 ; \
fi ; \
\
echo "Updated $$SRC version to \"$$VERS3\"" ; \
\
$(MAKE2) version-date ; \
ls -lFd $$SRC
bump_version:: bump-version
tick-version:: bump-version
tick_version:: bump-version
version-date::
@ \
SRC=utils/version.h ; \
VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. \"]*\).*/\1/p' < $$SRC | \
head -1`; \
D=`date '+%d-%b-%Y'`; \
TIME_T=`perl -e "use Date::Parse; print str2time('$$D 12:00')"` ; \
TMP=/tmp/bv.$$ ; \
sed -e "s/\([0-9]\.[0-9][^. \"]*\)/$$VERS/" \
-e "s/([0-9][^()]*)/($$D)/" \
-e "s/\(_RELEASED *\)[0-9][0-9]*/\1$$TIME_T/" \
< $$SRC > $$TMP ; \
if ! cmp -s $$SRC $$TMP ; then \
cat $$TMP > $$SRC ; \
echo "Updated $$SRC date to \"$$D\"" ; \
fi ; \
rm -f $$TMP
update_spec_version::
@S=$(srcdir)/xscreensaver.spec ; \
U=$(srcdir)/utils/version.h ; \
VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' < $$U | \
head -1` ; \
/bin/echo -n "Updating $$S to \"$$VERS\"... " ; \
T=/tmp/xs.$$$$ ; \
sed "s/^\(%define.version[^0-9]*\)\(.*\)/\1$$VERS/" \
< $$S > $$T ; \
if cmp -s $$S $$T ; then \
echo "unchanged." ; \
else \
cat $$T > $$S ; \
echo "done." ; \
fi ; \
rm $$T
rpm::
@ \
VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' utils/version.h | \
head -1` ; \
DIR=`pwd`/rpm_build ; \
ARCH=`rpm --showrc | sed -n 's/^build arch *: //p'` ; \
ADIR=archive/ ; \
TGZ=xscreensaver-$$VERS.tar.gz ; \
if [ ! -f $${ADIR}$$TGZ ]; then \
echo "$${ADIR}$$TGZ does not exist! Did you forget to \`make tar'?" ; \
exit 1 ; \
fi ; \
rm -rf /var/tmp/xscreensaver-$$VERS-root ; \
rm -rf $$DIR ; \
mkdir $$DIR ; \
( cd $$DIR; mkdir BUILD RPMS RPMS/$$ARCH SOURCES SPECS SRPMS ) ; \
cp -p $${ADIR}$$TGZ $$DIR/SOURCES/ ; \
rpmbuild --define "_topdir $$DIR" \
--define "USE_GL yes" \
-v -ba xscreensaver.spec ; \
echo '' ; \
echo 'RPM build complete' ; \
echo '' ; \
rm -f $$DIR/$$TGZ ; \
rm -rf $$DIR/BUILD/xscreensaver-$$VERS ; \
mv $$DIR/SRPMS/xscreensaver*-$$VERS-*.rpm . ; \
mv $$DIR/RPMS/$$ARCH/xscreensaver*-$$VERS-*.rpm . ; \
rm -rf $$DIR ; \
echo '' ; \
ls -lFG xscreensaver*-$$VERS-*.rpm
dmg::
$(MAKE2) -C OSX release dmg
apk::
$(MAKE2) -C android apk
# Update the version numbers in faq.html, bugs.html, etc.
www_versions::
@ \
DEST=$$HOME/www/xscreensaver ; \
VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' utils/version.h | \
head -1` ; \
TMP=/tmp/xd.$$$$ ; \
for f in $$DEST/*.html ; do \
sed "s/\(CLASS=.latest.>\)[^<>]*\(<\)/\1$$VERS\2/gi" < "$$f" > "$$TMP" ;\
if ! cmp -s "$$f" "$$TMP" ; then \
diff -U0 "$$f" "$$TMP" ; \
cp -p "$$TMP" "$$f" ; \
fi ; \
rm -f "$$TMP" ; \
done
www::
@ \
DEST=$$HOME/www/xscreensaver ; \
VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' utils/version.h | \
head -1` ; \
HEAD="xscreensaver-$$VERS" ; \
ADIR=archive/ ; \
BNAME="$$HEAD.tar.gz" ; \
NAME="$$ADIR$$BNAME" ; \
DNAME="$$DEST/$$HEAD.tar.gz" ; \
BNAME2="$$HEAD.dmg" ; \
NAME2="$$ADIR$$BNAME2" ; \
DNAME2="$$DEST/$$HEAD.dmg" ; \
BNAME3="$$HEAD.apk" ; \
NAME3="$$ADIR$$BNAME3" ; \
DNAME3="$$DEST/$$HEAD.apk" ; \
\
if ! git diff --quiet ; then \
echo "uncommitted changes exist!" ; \
exit 1 ; \
fi ; \
\
$(MAKE2) www_versions ; \
$(MAKE2) -C OSX updates.xml ; \
\
if [ ! -f $$NAME ]; then \
echo "$$NAME does not exist! Did you forget to \`make tar'?" ; \
exit 1 ; \
fi ; \
if [ ! -f $$NAME2 ]; then \
echo "$$NAME2 does not exist! Did you forget to \`make dmg'?" ; \
exit 1 ; \
fi ; \
if [ ! -f $$NAME3 ]; then \
echo "$$NAME3 does not exist! Did you forget to \`make apk'?" ; \
exit 1 ; \
fi ; \
chmod a-w $$NAME ; \
if [ -f $$DNAME ]; then \
/bin/echo -n "WARNING: $$DNAME already exists! Overwrite? "; \
read line; \
if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
exit 1 ; \
fi ; \
fi ; \
if [ -f $$DNAME2 ]; then \
/bin/echo -n "WARNING: $$DNAME2 already exists! Overwrite? "; \
read line; \
if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
exit 1 ; \
fi ; \
fi ; \
if [ -f $$DNAME3 ]; then \
/bin/echo -n "WARNING: $$DNAME3 already exists! Overwrite? "; \
read line; \
if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
exit 1 ; \
fi ; \
fi ; \
\
git tag -a "v$$VERS" -m "$$VERS" ; \
git commit -m "$$VERS" . ; \
\
( cd $$DEST ; git pull ) ; \
\
cp -p $$NAME $$DNAME ; \
cp -p $$NAME2 $$DNAME2 ; \
cp -p $$NAME3 $$DNAME3 ; \
chmod u+w $$DNAME $$DNAME2 $$DNAME3 ; \
cp -p OSX/updates.xml $$DEST ; \
cd $$DEST ; \
\
TMP=/tmp/xd.$$$$ ; \
sed "s/xscreensaver-[56]\.[0-9][0-9ab]*/$$HEAD/g" download.html > $$TMP ; \
echo '' ; \
diff -U0 download.html $$TMP ; \
echo '' ; \
\
for EXT in tar.gz dmg apk ; do \
OLDEST=`ls xscreensaver*.$$EXT | \
fgrep -v 5.14 | \
fgrep -v 5.34 | \
fgrep -v 6.00 | \
head -n 1` ; \
/bin/echo -n "Delete $$DEST/$$OLDEST? "; \
read line; \
if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then \
set -x ; \
rm $$OLDEST ; \
git rm $$OLDEST ; \
set +x ; \
fi ; \
done ; \
set -x ; \
cat $$TMP > download.html ; \
rm -f $$TMP ; \
\
git add $$BNAME $$BNAME2 $$BNAME3 ; \
\
$(MAKE2) -C ../ xscreensaver/changelog.html xscreensaver/screenshots/index.html; \
git diff changelog.html ; \
set +x ; \
\
/bin/echo -n "Ok? "; \
read line; \
if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then \
exit 1 ; \
fi ; \
\
git tag -a "v$$VERS" -m "$$VERS" ; \
git commit -m "$$VERS" . ; \
git push ; \
count::
@ \
echo "Current hack count: " ; \
A=`cd hacks ; ( make -s INSTALL=true install-man | \
grep true | grep -v helper | grep -v ljlatest | wc -l )` ; \
echo " X11:" $$A ; \
B=`cd hacks/glx ; ( make -s INSTALL=true install-man | \
grep true | grep -v helper | grep -v ljlatest | wc -l )` ; \
echo " GLX:" $$B ; \
C=`echo $$A + $$B | bc` ; \
echo " Total:" $$C ; \
cerebrum::
rsync -vax . 10.0.1.12:xscreensaver/ \
--omit-dir-times \
--delete-during \
--exclude .git \
--exclude OSX \
--exclude android \
--exclude archive \
--exclude build \
--exclude gen \
--exclude videos \
--exclude config.h \
--exclude XScreenSaver_ad.h \
--include xscreensaver-getimage-file \
--include xscreensaver-getimage-video \
--include xscreensaver-text \
--exclude xscreensaver-5.45 \
--exclude xscreensaver-6.00 \
--exclude xscreensaver-6.01 \
--exclude xscreensaver-6.02 \
--exclude '*~' \
--include '*.asm' \
--include '*.c' \
--include '*.gif' \
--include '*.h' \
--include '*.in' \
--include '*.jpg' \
--include '*.m' \
--include '*.m4' \
--include '*.pdb' \
--include '*.png' \
--include '*.po' \
--include '*.xml' \
--include '*.xpm' \
--include '*.man' \
--include '*.ttf' \
--include '*.otf' \
--include '*.ui' \
--include '*.sh' \
--include '*.pl' \
--include 'configure*' \
--include 'config.sub' \
--include 'config.guess' \
--include 'config.rpath' \
--include 'install-sh' \
--include 'bin2c' \
--include 'ad2c' \
--include 'vidwhacker' \
--include 'webcollage' \
--include '*/' \
--exclude '*'
|