From: Douglas William Thrift Date: Sun, 18 Apr 2010 05:32:05 +0000 (+0000) Subject: Nice little target to make a source distribution tarball. X-Git-Tag: v0.9.432~89 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/b65019fefcc6a025d409c4ed7ea024d527eb981a Nice little target to make a source distribution tarball. --- diff --git a/GNUmakefile.in b/GNUmakefile.in index 0d342ed..0dc6957 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -56,18 +56,31 @@ CY_EXECUTE := @CY_EXECUTE@ CY_OBJECTIVEC := @CY_OBJECTIVEC@ CY_OBJECTIVEC_MACH := @CY_OBJECTIVEC_MACH@ +svn := @SVN@ +svnversion := @SVNVERSION@ + +ifneq ($(svnversion),) +release := $(shell svnversion $(srcdir)) + +ifneq ($(release),exported) +gnutar := @GNUTAR@ +version := @PACKAGE_VERSION@.$(release) +tarname := @PACKAGE_TARNAME@-$(version) +endif +endif + paths := $(foreach path,$(paths),$(wildcard $(path))) cflags += $(foreach path,$(paths),-I$(path) -L$(path)) -svn := $(shell svnversion $(srcdir)) +#svn := $(shell svnversion $(srcdir)) all: all := cycript -dpkg_architecture := $(shell which dpkg-architecture 2>/dev/null) -ifneq ($(dpkg_architecture),) -arch := $(shell $(dpkg_architecture) -qDEB_HOST_ARCH 2>/dev/null) -endif +#dpkg_architecture := $(shell which dpkg-architecture 2>/dev/null) +#ifneq ($(dpkg_architecture),) +#arch := $(shell $(dpkg_architecture) -qDEB_HOST_ARCH 2>/dev/null) +#endif header := Cycript.tab.hh Parser.hpp Pooling.hpp cycript.hpp Internal.hpp Error.hpp String.hpp Exception.hpp Standard.hpp @@ -176,7 +189,7 @@ endif all: $(all) clean:: - rm -rf *.lo *.o *.d *.t.hpp .libs */*.lo */.libs libcycript.la $(all) Struct.hpp lex.cy.c Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh cyrver Cycript.yy Cycript.l control Bridge.gperf Bridge.hpp Cycript.output + rm -rf *.lo *.o *.d *.t.hpp .libs */*.d */*.lo */.libs libcycript.la $(all) Struct.hpp lex.cy.c Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh cyrver Cycript.yy Cycript.l control Bridge.gperf Bridge.hpp Cycript.output ifneq ($(srcdir),.) rm -rf Mach ObjectiveC sig endif @@ -226,6 +239,11 @@ 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: + $(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 @@ -235,4 +253,4 @@ uninstall: $(libtool) --mode=uninstall rm -f $(DESTDIR)$(bindir)/cycript $(libtool) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libcycript.la -.PHONY: all clean extra install uninstall package test control.tmp +.PHONY: all clean extra dist install uninstall package test control.tmp diff --git a/configure b/configure index 8aee5a1..cff1cbb 100755 --- a/configure +++ b/configure @@ -763,6 +763,8 @@ CXXCPP ac_ct_CXX CXXFLAGS CXX +SVNVERSION +SVN GNUTAR INSTALL_DATA INSTALL_SCRIPT @@ -4039,13 +4041,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4042: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4044: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4045: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4047: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4048: output\"" >&5) + (eval echo "\"\$as_me:4050: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5251,7 +5253,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5254 "configure"' > conftest.$ac_ext + echo '#line 5256 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6776,11 +6778,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6779: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6781: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6783: \$? = $ac_status" >&5 + echo "$as_me:6785: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7115,11 +7117,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7118: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7120: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7122: \$? = $ac_status" >&5 + echo "$as_me:7124: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7220,11 +7222,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7223: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7225: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7227: \$? = $ac_status" >&5 + echo "$as_me:7229: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -7275,11 +7277,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7278: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7280: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7282: \$? = $ac_status" >&5 + echo "$as_me:7284: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9659,7 +9661,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 9662 "configure" +#line 9664 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9755,7 +9757,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 9758 "configure" +#line 9760 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10580,6 +10582,90 @@ else $as_echo "not found" >&6; } fi +for ac_prog in svn +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 test "${ac_cv_prog_SVN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$SVN"; then + ac_cv_prog_SVN="$SVN" # 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_SVN="$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 +SVN=$ac_cv_prog_SVN +if test -n "$SVN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVN" >&5 +$as_echo "$SVN" >&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 test "${ac_cv_prog_SVNVERSION+set}" = set; 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 +done + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -12985,11 +13071,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12988: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13074: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12992: \$? = $ac_status" >&5 + echo "$as_me:13078: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13084,11 +13170,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13087: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13173: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13091: \$? = $ac_status" >&5 + echo "$as_me:13177: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13136,11 +13222,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13139: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13225: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13143: \$? = $ac_status" >&5 + echo "$as_me:13229: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized diff --git a/configure.ac b/configure.ac index 3095c81..0d9605e 100644 --- a/configure.ac +++ b/configure.ac @@ -48,6 +48,8 @@ AS_IF([test "x$ac_cv_path_GNUTAR" != x], [ AC_SUBST([GNUTAR], [:]) AC_MSG_RESULT([not found]) ]) +AC_CHECK_PROGS([SVN], [svn]) +AC_CHECK_PROGS([SVNVERSION], [svnversion]) AC_PROG_CXX AC_PROG_OBJCXX AC_ARG_WITH([frameworks], [AS_HELP_STRING(