]> git.saurik.com Git - cycript.git/commitdiff
Replace the svnversion mechanism with git describe.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 3 Jun 2012 16:16:31 +0000 (16:16 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 3 Jun 2012 16:17:23 +0000 (16:17 +0000)
GNUmakefile.in
configure
configure.ac

index c1f81b5ce6bb1995d2233b4f2c89175e28baa6fc..471e1a2dda4b511c2ed4b3590cfe41267948af7e 100644 (file)
@@ -60,17 +60,12 @@ CY_OBJECTIVEC := @CY_OBJECTIVEC@
 CY_OBJECTIVEC_MACH := @CY_OBJECTIVEC_MACH@
 CY_ATTACH_GROUP := @CY_ATTACH_GROUP@
 
-svn := @SVN@
-svnversion := @SVNVERSION@
+git := @GIT@
 
-ifneq ($(svnversion),)
-release := $(shell svnversion $(srcdir))
-
-ifneq ($(release),exported)
-gnutar := @GNUTAR@
-version := @PACKAGE_VERSION@.$(release)
-tarname := @PACKAGE_TARNAME@-$(version)
-endif
+ifneq ($(git),)
+version := $(shell $(git) describe --always --tags --dirty="+" --match="v*" | $(sed) -e 's@-\([^-]*\)-\([^-]*\)$$@+\1.\2@;s@^v@@')
+else
+version := @PACKAGE_VERSION@
 endif
 
 paths := $(foreach path,$(paths),$(wildcard $(path)))
@@ -243,12 +238,6 @@ test: cycript
        if [[ -e jquery.js ]]; then $(time) ./cycript -c jquery.js >jquery.cyc.js; gzip -9c jquery.cyc.js >jquery.cyc.js.gz; wc -c jquery.{mam,gcc,cyc,bak,yui}.js; wc -c jquery.{cyc,gcc,bak,mam,yui}.js.gz; fi
        if [[ -e test.cy ]]; then ./cycript test.cy; fi
 
-ifneq ($(gnutar),:)
-dist:
-       echo -n >> $(tarname).tar.gz
-       $(gnutar) -cC $(srcdir) -f $(tarname).tar.gz -vX <($(svn) propget svn:ignore $(srcdir)) -z --exclude-vcs --show-transformed-names --transform='s#^\.#$(tarname)#' .
-endif
-
 install: cycript libcycript.la
        $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir)
        $(libtool) --mode=install $(INSTALL_PROGRAM) libcycript.la $(DESTDIR)$(libdir)/libcycript.la
index c0cfd2426ba4bed9292b66d5fcd8759a977c95af..de73b08fa65ac193926df5f19bbdce9d577d0b47 100755 (executable)
--- a/configure
+++ b/configure
@@ -640,8 +640,7 @@ CXXCPP
 ac_ct_CXX
 CXXFLAGS
 CXX
-SVNVERSION
-SVN
+GIT
 GNUTAR
 INSTALL_DATA
 INSTALL_SCRIPT
@@ -11419,17 +11418,17 @@ else
 $as_echo "no" >&6; }
 
 fi
-for ac_prog in svn
+for ac_prog in git
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_SVN+:} false; then :
+if ${ac_cv_prog_GIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$SVN"; then
-  ac_cv_prog_SVN="$SVN" # Let the user override the test.
+  if test -n "$GIT"; then
+  ac_cv_prog_GIT="$GIT" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -11438,7 +11437,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_SVN="$ac_prog"
+    ac_cv_prog_GIT="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -11448,59 +11447,17 @@ IFS=$as_save_IFS
 
 fi
 fi
-SVN=$ac_cv_prog_SVN
-if test -n "$SVN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVN" >&5
-$as_echo "$SVN" >&6; }
+GIT=$ac_cv_prog_GIT
+if test -n "$GIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5
+$as_echo "$GIT" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-  test -n "$SVN" && break
-done
-
-for ac_prog in svnversion
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_SVNVERSION+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$SVNVERSION"; then
-  ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_SVNVERSION="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-SVNVERSION=$ac_cv_prog_SVNVERSION
-if test -n "$SVNVERSION"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
-$as_echo "$SVNVERSION" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$SVNVERSION" && break
+  test -n "$GIT" && break
 done
 
 ac_ext=cpp
index 6cf476e5200ba39024e02df7c3a613fe0482f863..3900105a4077ee244d874aa2dd55b46b9434413b 100644 (file)
@@ -53,8 +53,7 @@ AS_IF([test "x$ac_cv_path_GNUTAR" != x], [
        AC_SUBST([GNUTAR], [:])
        AC_MSG_RESULT([no])
 ])
-AC_CHECK_PROGS([SVN], [svn])
-AC_CHECK_PROGS([SVNVERSION], [svnversion])
+AC_CHECK_PROGS([GIT], [git])
 AC_PROG_CXX
 AC_PROG_OBJCXX
 AC_LANG([C++])