⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ax_cvs.m4

📁 在LINUX下运行的仿真机器人服务器源代码
💻 M4
📖 第 1 页 / 共 2 页
字号:
# @synopsis AX_CVS([ANON_CVSROOT])# ---------------------------------------------------------# Author: Tom Howard <tomhoward@users.sf.net># Version: 1.2# Copyright (C) 2004, 2005, Tom Howard## Copying and distribution of this file, with or without# modification, are permitted in any medium without# royalty provided the copyright notice and this notice# are preserved.## Desc: Adds support cvs targets within your Makefile.  ##       Branching and releasing relies on you using the following#       version format:#         MAJOR.MINOR.POINT#       where MAJOR is the major version number, MINOR is the minor#       version number and POINT is the point release number.##       Targets:#		* update#			performs a cvs update##		* commitlog#			Generates a ChangeLog template with the modifed,#			added and removed files and opens it up for editing.#  			This is not normally used directly, but is instead#			called by commit.  It is usefull however if you want#			to document the work you have done, but don't want to#   			commit just yet.##		* commit#			performs a cvs commit after first performing a cvs#			update and generating a commit log.##		* cvs-rm FILES="file1 file2 ..."#   		  	 removes a file or files specified by the FILES#			 variable from the file system and from cvs.  It will#			 interactively ask you to confirm the file removal,# 			 unless the file does not exist on the file system.##		* make cvs-add FILES="file1 file2 ..."#   		       	 adds a file or files specified by the FILES variable#			 to cvs.##		* branch-major#			creates a branch based on the major version number, # 			increments the major version number, sets the minor#			and point versions to zero and checks out the branch#			into a new directory.##		* branch-minor#			creates a branch based on the minor version number,#			increments the minor version, sets the point version#			to zero number and checks out the branch into a new#			directory.##		* release#			performs a cvs update, followed by a distcheck, then#			creates a release for the current version,#			increaments the point release number and checks out#			the release into a new direcory##		* quick-release#			same as release, but distcheck is not performed## ChangeLog:# 2005-06-28	Tom Howard	<tomhoward@users.sf.net># #	* Now checks for awk instead of gawk#AC_DEFUN([AX_CVS],[AC_REQUIRE([AX_SPLIT_VERSION])AC_SUBST([ANON_CVSROOT], [$1])AC_MSG_CHECKING([ANON_CVSROOT])if test "x$ANON_CVSROOT" != "x"; then    AC_MSG_RESULT([$ANON_CVSROOT])    else    AC_MSG_RESULT([not found])    AC_MSG_ERROR([An anonymous CVSROOT must be specified to enable CVS support]) fiAC_ARG_ENABLE(cvs-support,	      AS_HELP_STRING(--enable-cvs-support[=ARG],			     [enable cvs support.  Used by the $PACKAGE developers.		  	      ARG can be "yes" or "no".  If the CVSROOT is found,			      then the default is yes,		  	      otherwise the default is no.]),	      AX_USING_CVS=$enableval )if test "x$AX_USING_CVS" != "xno"; then    AC_ARG_VAR(CVS, [cvs executable to use])    if test "x$CVS" = "x"; then        AC_CHECK_PROGS(CVS,[cvs])    fi    if test "x$CVS" = "x"; then        if test "x$AX_USING_CVS" = "x"; then	    AX_USING_CVS=no	else	    AC_MSG_ERROR([CVS support cannot be enabled: cvs executable not found])	fi    fifiAC_REQUIRE([AC_PROG_AWK])if test "x$AX_USING_CVS" != "xno"; then   if test "x$AWK" = "x"; then       if test "x$AX_USING_CVS" = "x"; then	    AX_USING_CVS=no	else	    AC_MSG_ERROR([CVS support cannot be enabled: awk could not be found])	fi    fifiif test "x$AX_USING_CVS" != "xno"; then    AC_ARG_VAR(CVSEDITOR, [text editor to use for cvs])    if test "x$CVSEDITOR" = "x"; then        if test "x$EDITOR" = "x"; then           AC_CHECK_PROGS(CVSEDITOR,[vim vi emacs])	else           AC_CHECK_PROGS(CVSEDITOR,[$EDITOR vim vi emacs])	fi    fi    if test "x$CVSEDITOR" = "x"; then        if test "x$AX_USING_CVS" = "x"; then	    AX_USING_CVS=no	else	    AC_MSG_ERROR([CVS support cannot be enabled: CVSEDITOR not set and editor not found])	fi    fifiif test "x$AX_USING_CVS" != "xno"; then    AC_ARG_VAR(CVSROOT, [the CVSROOT to use])    AC_MSG_CHECKING([CVSROOT])    if test -e "$srcdir/CVS/Root"; then        CVSROOT=`cat $srcdir/CVS/Root`;    	AC_MSG_RESULT([$CVSROOT])        else	AC_MSG_RESULT([not found])            if test "x$AX_USING_CVS" = "x"; then	    AX_USING_CVS=no	else	    AC_MSG_ERROR([CVS support cannot be enabled: CVSROOT not found.  Did you check out from CVS?])	fi    fifiif test "x$AX_USING_CVS" != "xno"; then    AC_MSG_CHECKING([USERNAME])    if test "x$USERNAME" != "x"; then        AC_MSG_RESULT([$USERNAME])    else         AC_MSG_RESULT([not set])        if test "x$AX_USING_CVS" = "x"; then	    AX_USING_CVS=no	else            AC_MSG_ERROR([CVS support cannot be enabled: USERNAME enviorment variable not set])	fi    fifiif test "x$AX_USING_CVS" != "xno"; then    AC_MSG_CHECKING([USEREMAIL])    if test "x$USERNAME" != "x"; then        AC_MSG_RESULT([$USEREMAIL])    else         AC_MSG_RESULT([not set])        if test "x$AX_USING_CVS" = "x"; then	    AX_USING_CVS=no	else            AC_MSG_ERROR([CVS support cannot be enabled: USEREMAIL enviorment variable not set])	fi    fifiif test "x$AX_USING_CVS" != "xno"; then   AC_MSG_NOTICE([cvs support enabled])   m4_pattern_allow([AC_INIT])   AX_PRINT_TO_FILE([ax_cvs_rel.awk],[[BEGIN {    if( change <= 0 )        exit -1;}/AC_INIT/ {    if( ${AX_DOLLAR}2 ~ /\\)${AX_DOLLAR}/ )        {            ver = substr( ${AX_DOLLAR}2, 0, length( ${AX_DOLLAR}2 ) - 1 );            tail=\")\";        }    else        ver = ${AX_DOLLAR}2;    if( ${AX_DOLLAR}2 ~ /${AX_BS}${AX_SRB}${AX_DOLLAR}/ )        {            ver = substr( ${AX_DOLLAR}2, 0, length( ${AX_DOLLAR}2 ) - 1 );            tail=\"${AX_SRB}\";        }    else        ver = ${AX_DOLLAR}2;    if( ${AX_DOLLAR}2 ~ /\\,${AX_DOLLAR}/ )        {            ver = substr( ${AX_DOLLAR}2, 0, length( ${AX_DOLLAR}2 ) - 1 );            tail=\",\";        }    else        ver = ${AX_DOLLAR}2;    n = split( ver, ver_array, \".\" );        while( change > n )        ver_array[ ++n ] = 0;        ver_array[ change ]++;    while( ++change <= n )        ver_array[ change ] = 0;    ${AX_DOLLAR}2 = \"\";    for( i = 1; i < n; ++i )

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -