From http://www.jwz.org/xscreensaver/xscreensaver-5.37.tar.gz
[xscreensaver] / Makefile.in
index c9ec0db3f8fd74cb0fd251b4417f135bd64d5ba6..cf80264b42dd5b8491fc43b8450caa4e842eb85f 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in --- xscreensaver, Copyright (c) 1999-2005 Jamie Zawinski.
+# Makefile.in --- xscreensaver, Copyright (c) 1999-2014 Jamie Zawinski.
 # the `../configure' script generates `Makefile' from this file.
 
 @SET_MAKE@
@@ -6,33 +6,33 @@ srcdir                = @srcdir@
 VPATH          = @srcdir@
 
 SHELL          = /bin/sh
-SUBDIRS                = utils driver hacks hacks/glx po
-SUBDIRS2       = $(SUBDIRS) OSX
+SUBDIRS        = utils jwxyz hacks hacks/glx driver po
+SUBDIRS2       = $(SUBDIRS) OSX android
 TARFILES       = README README.hacking README.VMS INSTALL \
                  configure configure.in Makefile.in config.h.in \
                  config.h-vms install-sh setup.com config.guess aclocal.m4 \
-                 config.sub makevms.com \
+                 ax_pthread.m4 config.sub makevms.com \
                  intltool-merge.in intltool-extract.in intltool-update.in \
                  xscreensaver.spec \
-                 xscreensaver.xcodeproj/project.pbxproj
+                 OSX/xscreensaver.xcodeproj/project.pbxproj
 
 TAR            = tar
 
 MAKE_SUBDIR  = for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) $@) || exit 5; done
-MAKE_SUBDIR2 = for dir in $(SUBDIRS2);do (cd $$dir; $(MAKE) $@) || exit 5; done
+MAKE_SUBDIR2 = for dir in $(SUBDIRS2); do (cd $$dir; $(MAKE) $@) || exit 5; done
 
 default::
-       @$(MAKE_SUBDIR)
+       @+$(MAKE_SUBDIR)
 all::
-       @$(MAKE_SUBDIR)
+       @+$(MAKE_SUBDIR)
 install::
-       @$(MAKE_SUBDIR)
+       @+$(MAKE_SUBDIR)
 install-program::
-       @$(MAKE_SUBDIR)
+       @+$(MAKE_SUBDIR)
 install-man::
-       @$(MAKE_SUBDIR)
+       @+$(MAKE_SUBDIR)
 install-strip::
-       @$(MAKE_SUBDIR)
+       @+$(MAKE_SUBDIR)
 uninstall::
        @$(MAKE_SUBDIR)
 uninstall-program::
@@ -44,7 +44,7 @@ depend::
 distdepend::
        @$(MAKE) update_spec_version
        @$(MAKE_SUBDIR2)
-       @cd po ; $(MAKE) generate_potfiles_in
+       @cd po ; $(MAKE) update-po
 
 TAGS:: tags
 tags::
@@ -80,7 +80,8 @@ tar::
       ` ";                                                                 \
     cd $$d ; done ;                                                        \
   echo creating tar file $$ADIR$$NAME.tar.gz... ;                          \
-  GZIP="-9v" $(TAR) -vchzf $$ADIR$$NAME.tar.gz                             \
+  export COPYFILE_DISABLE=true ;                                           \
+  GZIP="-9v" $(TAR) -vczf $$ADIR$$NAME.tar.gz                              \
     `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` ;            \
   rm $$NAME
 
@@ -93,6 +94,7 @@ tar::
 # of autoconf other than the ones I've tried (2.12 and 2.13.)
 #
 configure::
+       aclocal
        autoconf
        autoheader
        @TMP=configure.$$$$ ;                                                \
@@ -121,6 +123,8 @@ configure::
                                                                             \
                s@mandir=.\$${prefix}/man.@mandir=\\\$${datadir}/man@;       \
                                                                             \
+               s@rm -f conftest@rm -rf conftest@g;                          \
+                                                                            \
                print;'                                                      \
        < configure                                                          \
        > $$TMP &&                                                           \
@@ -143,7 +147,7 @@ bump-version::
   if [ -f $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz ]; then                \
     echo "WARNING: $${ADIR}xscreensaver-$$MAJOR.$$NEW.tar.gz already exists.";\
   fi ;                                                                     \
-  echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? ";          \
+  /bin/echo -n "Bumping $$MAJOR.$$MINOR to $$MAJOR.$$NEW ($$D), ok? ";     \
   read line;                                                               \
   if [ "x$$line" != "xyes" -a  "x$$line" != "xy" ]; then                   \
     exit 1 ;                                                               \
@@ -152,7 +156,7 @@ bump-version::
   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 ";                                     \
+  /bin/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 ;                                                      \
@@ -170,7 +174,7 @@ version-date::
   D=`date '+%d-%b-%Y'`;                                                            \
   TMP=/tmp/bv.$$ ;                                                         \
   sed -e "s/([0-9][^()]*)/($$D)/" < $$SRC > $$TMP ;                        \
-  echo -n "Updating date in $$SRC to \"$$D\"... " ;                        \
+  /bin/echo -n "Updating date in $$SRC to \"$$D\"... " ;                   \
   if cmp -s $$SRC $$TMP ; then                                             \
     echo "unchanged." ;                                                            \
   else                                                                     \
@@ -184,7 +188,7 @@ 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` ;      \
-       echo -n "Updating $$S to \"$$VERS\"... " ;                          \
+       /bin/echo -n "Updating $$S to \"$$VERS\"... " ;                     \
        T=/tmp/xs.$$$$ ;                                                    \
        sed "s/^\(%define.version[^0-9]*\)\(.*\)/\1$$VERS/"                 \
          < $$S > $$T ;                                                     \
@@ -269,13 +273,16 @@ test-tar::
     ../../configure --with-motif=/usr/local/lesstif --without-gnome ;      \
     echo --------------------------------------------------------------- ;  \
     ( cd utils; gmake all ) ;                                              \
+    ( cd jwxyz; gmake all ) ;                                              \
     ( cd driver; gmake all ) ;                                             \
     echo --------------------------------------------------------------- ); \
                                                                            \
   chmod -R u+w .
 
 dmg::
-       cd OSX ; $(MAKE) release dmg
+       $(MAKE) -C OSX release dmg
+apk::
+       $(MAKE) -C android apk
 
 www::
        @                                                                   \
@@ -289,6 +296,16 @@ www::
   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 ;                                                                     \
+                                                                           \
+  $(MAKE) -C OSX updates.xml ;                                             \
                                                                            \
   if [ ! -f $$NAME ]; then                                                 \
     echo "$$NAME does not exist!  Did you forget to \`make tar'?" ;        \
@@ -298,79 +315,88 @@ www::
     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                                                  \
-    echo -n "WARNING: $$DNAME already exists!  Overwrite? ";               \
+    /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                                                 \
-    echo -n "WARNING: $$DNAME2 already exists!  Overwrite? ";              \
+    /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 ;                                                 \
-  chmod u+w $$DNAME $$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-5\.[0-9][0-9ab]*/$$HEAD/g" download.html > $$TMP ;  \
+  sed "s/xscreensaver-5\.[0-9][0-9ab]*/$$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 $$BNAME $$BNAME2 ;                                           \
+  for EXT in tar.gz dmg ; do                                               \
+    OLDEST=`ls xscreensaver*.$$EXT |                                       \
+      fgrep -v 5.14 |                                                      \
+      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 ;                                                                    \
                                                                            \
-  (cd ..; $(MAKE) xscreensaver/changelog.html                              \
-                 xscreensaver/screenshots/index.html );                    \
-  cvs diff -U0 changelog.html ;                                                    \
+  git add $$BNAME $$BNAME2 $$BNAME3 ;                                      \
+                                                                           \
+  $(MAKE) -C ../ xscreensaver/changelog.html xscreensaver/screenshots/index.html; \
+  git diff changelog.html ;                                                \
   set +x ;                                                                 \
                                                                            \
-  echo -n "Ok? ";                                                          \
+  /bin/echo -n "Ok? ";                                                     \
   read line;                                                               \
   if [ "x$$line" != "xyes" -a "x$$line" != "xy" ]; then                            \
     exit 1 ;                                                               \
   fi ;                                                                     \
                                                                            \
-  cvs commit -m "$$VERS"
+  git tag -a "v$$VERS" -m "$$VERS" ;                                       \
+  git commit -m "$$VERS" . ;                                               \
+  git push ;                                                               \
 
-check_years::
-       @for file in `find . -name '*.*' \
-               \! -name '*~' \! -name '*.o' \! -name '*.gz' \! -name '*.Z' \
-               \! -name '*.po' \! -name 'config.*'  \! -name '*.glade*' \
-               \! -name '*.m4' \! -name '*.pdb' \! -name '*.xpm' \
-               \! -name '*.jpg' \! -name '*.gif' \! -name '*.eps' \
-               \! -name '*.png' \! -name '*.tif' \! -name '*.bak' \
-               | sort` \
-       ; do \
-         y=`date -r "$$file" '+%Y'` ; \
-         if ! ( grep "\b$$y\b" $$file >/dev/null ); then \
-           if ( grep "opyright\|(c)\|\.BR" $$file >/dev/null ); then \
-             echo "$$file              does not mention $$y" ; \
-           fi ; \
-         fi ; \
-       done
 
 count::
        @ \
-  echo -n "Current hack count: " ; \
+  /bin/echo -n "Current hack count: " ; \
   ( ( cd hacks;     make -s INSTALL=true install-program install-scripts ) ; \
     ( cd hacks/glx; make -s INSTALL=true install-program ) ) | \
     grep true | \