http://ftp.x.org/contrib/applications/xscreensaver-3.23.tar.gz
[xscreensaver] / Makefile.in
index 8638d53606ced959873206d1be0a69b289b7be47..f1a39486bbb1852b74b0a1e01b1fb0cbd996d014 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski.
+# Makefile.in --- xscreensaver, Copyright (c) 1999 Jamie Zawinski.
 # the `../configure' script generates `Makefile' from this file.
 
 @SET_MAKE@
@@ -11,15 +11,17 @@ TARFILES    = README README.VMS README.debugging INSTALL xscreensaver.lsm \
                  configure configure.in Makefile.in config.h.in \
                  config.h-vms install-sh setup.com config.guess \
                  config.sub makevms.com screenblank.txt \
-                 xscreensaver.lsm.sh
-TAR            = gtar
+                 xscreensaver.lsm.sh xscreensaver.spec
+TAR            = tar
 COMPRESS       = gzip --verbose --best
 COMPRESS_EXT   = gz
 # COMPRESS     = compress
 # COMPRESS_EXT = Z
 
-MAKE_SUBDIR    = for dir in $(SUBDIRS) ; do ( cd $$dir ; $(MAKE) $@ ) ; done
+MAKE_SUBDIR = for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) $@) || exit 5; done
 
+default::
+       @$(MAKE_SUBDIR)
 all::
        @$(MAKE_SUBDIR)
 install:
@@ -39,6 +41,7 @@ uninstall-man:
 depend:
        @$(MAKE_SUBDIR)
 distdepend:
+       @$(MAKE) update_spec_version
        @$(MAKE_SUBDIR)
 TAGS: tags
 tags:
@@ -46,7 +49,7 @@ tags:
 clean:
        @$(MAKE_SUBDIR)
 distclean: clean
-       -rm -f config.h Makefile config.status config.cache config.log *~ "#"*
+       -rm -f config.h Makefile config.status config.cache config.log TAGS *~ "#"*
        @$(MAKE_SUBDIR)
 
 dist: tar
@@ -55,13 +58,14 @@ dist: tar
 tar:
        @                                                                   \
   sh config.status ;                                                       \
-  $(MAKE) hack_configure ;                                                 \
+  rm -f configure ;                                                        \
+  $(MAKE) configure ;                                                      \
   $(MAKE) distdepend ;                                                     \
   sh xscreensaver.lsm.sh > xscreensaver.lsm.$$$$ ;                         \
   mv xscreensaver.lsm.$$$$ xscreensaver.lsm ;                              \
   NAME=`sed -n                                                             \
   's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ;  \
-  rm -f $$NAME ; ln -s . $$NAME ;                                          \
+  rm -rf $$NAME ; ln -s . $$NAME ;                                         \
   FILES= ;                                                                 \
   for subdir in $(SUBDIRS) ; do                                                    \
     d=`pwd` ;                                                              \
@@ -83,9 +87,9 @@ tar:
 # 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 2.12.
+# of autoconf other than the ones I've tried (2.12 and 2.13.)
 #
-hack_configure::
+configure::
        autoconf
        @TMP=configure.$$$$ ;                                                \
        echo "munging configure's --help message..." ;                       \
@@ -108,7 +112,6 @@ hack_configure::
                s/--enable and --with options recognized://m;                \
                s/\n  --with-x .*?(["\n])/$$1/s;                             \
                s/\n(Installation options:\n)/$$1/s;                         \
-               s/\n(X Server Extension options:\n)/$$1/s;                   \
                                                                             \
                s/^  --oldincludedir=.*$$/ \
  --x-includes=DIR        X include files are in DIR\n \
@@ -119,3 +122,167 @@ hack_configure::
        > $$TMP &&                                                           \
        cat $$TMP > configure ) ;                                            \
        rm -f $$TMP
+
+bump-version::
+       @                                                                   \
+  SRC=utils/version.h ;                                                            \
+  VERS=`sed -n 's/[^0-9]*\([0-9]\)\.\([0-9][0-9]*\).*/\1 \2/p' $$SRC` ;            \
+  set - $$VERS ;                                                           \
+  MAJOR="$$1"; MINOR="$$2";                                                \
+  NEW=`echo $$MINOR + 1 | bc` ;                                                    \
+  NEW=`echo $$NEW | sed 's/^\([0-9]\)$$/0\1/'` ;                           \
+  D=`date '+%d-%b-%y'`;                                                            \
+  if [ ! -f xscreensaver-$$MAJOR.$$MINOR.tar.gz ]; then                            \
+    echo "WARNING: xscreensaver-$$MAJOR.$$MINOR.tar.gz does not exist.";    \
+  fi ;                                                                     \
+  if [ -f xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then                        \
+    echo "WARNING: xscreensaver-$$MAJOR.$$NEW.tar.gz already exists.";     \
+  fi ;                                                                     \
+  echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), 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][0-9]*\)/$$MAJOR.$$NEW/"                         \
+      -e "s/\(([0-9][0-9]*-[A-Za-z][a-z][a-z]-[0-9][0-9][0-9]*\))/($$D)/"   \
+        $$SRC > $$TMP ;                                                            \
+  echo -n "New version and date are ";                                     \
+  sed -n "s/[^0-9]*\([0-9]\.[0-9][0-9]*\) (\([-A-Za-z0-9]*\)).*/\1, \2./p"  \
+     $$TMP;                                                                \
+  cat $$TMP > $$SRC ;                                                      \
+  rm -f $$TMP;                                                             \
+  echo "overwrote $$SRC";                                                  \
+  ls -lFd $$SRC
+
+update_spec_version::
+       @S=$(srcdir)/xscreensaver.spec ;                                    \
+       U=$(srcdir)/utils/version.h ;                                       \
+       V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ;             \
+       echo -n "Updating version number in $$S to \"$$V\"... " ;           \
+       T=/tmp/xs.$$$$ ;                                                    \
+       sed "s/^\(%define.version[^0-9]*\)\(.*\)/\1$$V/"                    \
+         < $$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][0-9]*\).*/\1/p' utils/version.h` ; \
+  DIR=/usr/src/redhat ;                                                           \
+  cp -p xscreensaver-$$VERS.tar.gz $$DIR/SOURCES/ ;                       \
+  rpm --define "USE_GL yes" -ba xscreensaver.spec ;                       \
+  rm -f $$DIR/xscreensaver-$$VERS.tar.gz ;                                \
+  rm -rf $$DIR/BUILD/xscreensaver-$$VERS ;                                \
+  mv $$DIR/SRPMS/xscreensaver*-$$VERS-*.rpm . ;                                   \
+  mv $$DIR/RPMS/i386/xscreensaver*-$$VERS-*.rpm . ;                       \
+  echo '' ;                                                               \
+  ls -lFG xscreensaver*-$$VERS-*.rpm
+
+test-tar::
+       @                                                                   \
+  VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ;  \
+  D=xscreensaver-$$VERS ;                                                  \
+  NAME="$$D.tar.gz" ;                                                      \
+  if [ ! -f $$NAME ]; then                                                 \
+    echo "$$NAME does not exist!  Did you forget to \`make tar'?" ;        \
+    exit 1 ;                                                               \
+  fi ;                                                                     \
+                                                                           \
+  set -e ;                                                                 \
+  set -x ;                                                                 \
+                                                                           \
+  if [ -d $$D ]; then                                                      \
+   chmod -R u+w $$D ;                                                      \
+  fi ;                                                                     \
+  rm -rf $$D ;                                                             \
+  zcat $$D.tar.gz | tar -xf - ;                                                    \
+  cd $$D ;                                                                 \
+  chmod -R a-w . ;                                                         \
+  chmod u+w . ;                                                                    \
+  mkdir BIN ;                                                              \
+  mkdir BIN/motif ;                                                        \
+  mkdir BIN/lesstif ;                                                      \
+  chmod a-w . ;                                                                    \
+                                                                           \
+  ( cd BIN/motif ;                                                         \
+    CC=cc ;                                                                \
+    export CC ;                                                                    \
+    ../../configure --without-xpm --without-xdbe --without-xshm            \
+                   --with-motif=/usr/local/motif ;                         \
+    echo --------------------------------------------------------------- ;  \
+    gmake all ;                                                                    \
+    ( cd driver; gmake tests ) ;                                           \
+    echo --------------------------------------------------------------- ); \
+                                                                           \
+  ( cd BIN/lesstif ;                                                       \
+    CC=cc ;                                                                \
+    export CC ;                                                                    \
+    ../../configure --with-motif=/usr/local/lesstif ;                      \
+    echo --------------------------------------------------------------- ;  \
+    ( cd utils; gmake all ) ;                                              \
+    ( cd driver; gmake all ) ;                                             \
+    echo --------------------------------------------------------------- ); \
+                                                                           \
+  chmod -R u+w .
+
+
+www::
+       @                                                                   \
+  DEST=$$HOME/www/xscreensaver ;                                           \
+  VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ;  \
+  HEAD="xscreensaver-$$VERS" ;                                             \
+  NAME="$$HEAD.tar.gz" ;                                                   \
+                                                                           \
+  if [ ! -f $$NAME ]; then                                                 \
+    echo "$$NAME does not exist!  Did you forget to \`make tar'?" ;        \
+    exit 1 ;                                                               \
+  fi ;                                                                     \
+  chmod a-w $$NAME ;                                                       \
+  if [ -f $$DEST/$$NAME ]; then                                                    \
+    echo -n "WARNING: $$DEST/$$NAME already exists!  Overwrite? ";         \
+    read line;                                                             \
+    if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then                  \
+      exit 1 ;                                                                     \
+    fi ;                                                                   \
+  fi ;                                                                     \
+  cp -p $$NAME $$DEST/$$NAME ;                                             \
+  chmod u+w $$DEST/$$NAME ;                                                \
+  cd $$DEST ;                                                              \
+                                                                           \
+  TMP=/tmp/xd.$$$$ ;                                                       \
+  sed "s/xscreensaver-[0-9]\.[0-9][0-9]*/$$HEAD/g" download.html > $$TMP ;  \
+  echo '' ;                                                                \
+  diff -u0 download.html $$TMP ;                                           \
+  echo '' ;                                                                \
+                                                                           \
+  OLDEST=`ls xscreensaver*.tar.gz | head -1` ;                             \
+  echo -n "Delete $$DEST/$$OLDEST? ";                                      \
+  read line;                                                               \
+  if [ "x$$line" = "xyes" -o "x$$line" = "xy" ]; then                      \
+    set -x ;                                                               \
+    rm $$OLDEST ;                                                          \
+    cvs remove $$OLDEST ;                                                  \
+  else                                                                     \
+    set -x ;                                                               \
+  fi ;                                                                     \
+  cvs add -kb $$NAME ;                                                     \
+  cat $$TMP > download.html ;                                              \
+  rm -f $$TMP ;                                                                    \
+                                                                           \
+  (cd ..; $(MAKE) xscreensaver/changelog.html );                           \
+  cvs diff -u0 changelog.html ;                                                    \
+  set +x ;                                                                 \
+                                                                           \
+  echo -n "Ok? ";                                                          \
+  read line;                                                               \
+  if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then                            \
+    exit 1 ;                                                               \
+  fi ;                                                                     \
+                                                                           \
+  cvs commit -m "$$VERS"