Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

478 lines
17KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_cvs.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_CVS([ANON_CVSROOT])
  8. #
  9. # DESCRIPTION
  10. #
  11. # Adds support cvs targets within your Makefile.
  12. #
  13. # Branching and releasing relies on you using the following version
  14. # format:
  15. #
  16. # MAJOR.MINOR.POINT
  17. #
  18. # where MAJOR is the major version number, MINOR is the minor version
  19. # number and POINT is the point release number.
  20. #
  21. # make update
  22. #
  23. # performs a cvs update
  24. #
  25. # make commitlog
  26. #
  27. # Generates a ChangeLog template with the modified, added
  28. # and removed files and opens it up for editing. This is
  29. # not normally used directly, but is instead called by
  30. # commit. It is useful however if you want to document
  31. # the work you have done, but don't want to commit just
  32. # yet.
  33. #
  34. # make commit
  35. #
  36. # performs a cvs commit after first performing a cvs
  37. # update and generating a commit log.
  38. #
  39. # make cvs-rm FILES="file1 file2 ..."
  40. #
  41. # removes a file or files specified by the FILES
  42. # variable from the file system and from cvs. It will
  43. # interactively ask you to confirm the file removal,
  44. # unless the file does not exist on the file system.
  45. #
  46. # make cvs-add FILES="file1 file2 ..."
  47. #
  48. # adds a file or files specified by the FILES variable
  49. # to cvs.
  50. #
  51. # make branch-major
  52. #
  53. # creates a branch based on the major version number,
  54. # increments the major version number, sets the minor
  55. # and point versions to zero and checks out the branch
  56. # into a new directory.
  57. #
  58. # make branch-minor
  59. #
  60. # creates a branch based on the minor version number,
  61. # increments the minor version, sets the point version
  62. # to zero number and checks out the branch into a new
  63. # directory.
  64. #
  65. # make release
  66. #
  67. # performs a cvs update, followed by a distcheck, then
  68. # creates a release for the current version, increments
  69. # the point release number and checks out the release
  70. # into a new directory
  71. #
  72. # make quick-release
  73. #
  74. # same as release, but distcheck is not performed
  75. #
  76. # LICENSE
  77. #
  78. # Copyright (c) 2009 Tom Howard <tomhoward@users.sf.net>
  79. #
  80. # Copying and distribution of this file, with or without modification, are
  81. # permitted in any medium without royalty provided the copyright notice
  82. # and this notice are preserved. This file is offered as-is, without any
  83. # warranty.
  84. #serial 21
  85. AC_DEFUN([AX_CVS],
  86. [
  87. AC_REQUIRE([AX_SPLIT_VERSION])
  88. AC_SUBST([ANON_CVSROOT], [$1])
  89. AC_MSG_CHECKING([ANON_CVSROOT])
  90. if test "x$ANON_CVSROOT" != "x"; then
  91. AC_MSG_RESULT([$ANON_CVSROOT])
  92. else
  93. AC_MSG_RESULT([not found])
  94. AC_MSG_ERROR([An anonymous CVSROOT must be specified to enable CVS support])
  95. fi
  96. AC_ARG_ENABLE(cvs-support,
  97. AS_HELP_STRING(--enable-cvs-support[=ARG],
  98. [enable cvs support. Used by the $PACKAGE developers.
  99. ARG can be "yes" or "no". If the CVSROOT is found,
  100. then the default is yes,
  101. otherwise the default is no.]),
  102. AX_USING_CVS=$enableval )
  103. if test "x$AX_USING_CVS" != "xno"; then
  104. AC_ARG_VAR(CVS, [cvs executable to use])
  105. if test "x$CVS" = "x"; then
  106. AC_CHECK_PROGS(CVS,[cvs])
  107. fi
  108. if test "x$CVS" = "x"; then
  109. if test "x$AX_USING_CVS" = "x"; then
  110. AX_USING_CVS=no
  111. else
  112. AC_MSG_ERROR([CVS support cannot be enabled: cvs executable not found])
  113. fi
  114. fi
  115. AC_SUBST([CVS])
  116. fi
  117. if test "x$AX_USING_CVS" != "xno"; then
  118. AC_ARG_VAR(GAWK, [gawk executable to use])
  119. if test "x$GAWK" = "x"; then
  120. AC_CHECK_PROGS(GAWK,[gawk])
  121. fi
  122. if test "x$GAWK" = "x"; then
  123. if test "x$AX_USING_CVS" = "x"; then
  124. AX_USING_CVS=no
  125. else
  126. AC_MSG_ERROR([CVS support cannot be enabled: gawk could not be found])
  127. fi
  128. fi
  129. AC_SUBST([GAWK])
  130. fi
  131. if test "x$AX_USING_CVS" != "xno"; then
  132. AC_ARG_VAR(CVSEDITOR, [text editor to use for cvs])
  133. if test "x$CVSEDITOR" = "x"; then
  134. if test "x$EDITOR" = "x"; then
  135. AC_CHECK_PROGS(CVSEDITOR,[vim vi emacs])
  136. else
  137. AC_CHECK_PROGS(CVSEDITOR,[$EDITOR vim vi emacs])
  138. fi
  139. fi
  140. if test "x$CVSEDITOR" = "x"; then
  141. if test "x$AX_USING_CVS" = "x"; then
  142. AX_USING_CVS=no
  143. else
  144. AC_MSG_ERROR([CVS support cannot be enabled: CVSEDITOR not set and editor not found])
  145. fi
  146. fi
  147. AC_SUBST([CVSEDITOR])
  148. fi
  149. if test "x$AX_USING_CVS" != "xno"; then
  150. AC_ARG_VAR(CVSROOT, [the CVSROOT to use])
  151. AC_MSG_CHECKING([CVSROOT])
  152. if test -e "$srcdir/CVS/Root"; then
  153. CVSROOT=`cat $srcdir/CVS/Root`;
  154. AC_MSG_RESULT([$CVSROOT])
  155. else
  156. AC_MSG_RESULT([not found])
  157. if test "x$AX_USING_CVS" = "x"; then
  158. AX_USING_CVS=no
  159. else
  160. AC_MSG_ERROR([CVS support cannot be enabled: CVSROOT not found. Did you check out from CVS?])
  161. fi
  162. fi
  163. AC_SUBST([CVSROOT])
  164. fi
  165. if test "x$AX_USING_CVS" != "xno"; then
  166. AC_MSG_CHECKING([USERNAME])
  167. if test "x$USERNAME" != "x"; then
  168. AC_MSG_RESULT([$USERNAME])
  169. else
  170. AC_MSG_RESULT([not set])
  171. if test "x$AX_USING_CVS" = "x"; then
  172. AX_USING_CVS=no
  173. else
  174. AC_MSG_ERROR([CVS support cannot be enabled: USERNAME environment variable not set])
  175. fi
  176. fi
  177. AC_SUBST([USERNAME])
  178. fi
  179. if test "x$AX_USING_CVS" != "xno"; then
  180. AC_MSG_CHECKING([USEREMAIL])
  181. if test "x$USERNAME" != "x"; then
  182. AC_MSG_RESULT([$USEREMAIL])
  183. else
  184. AC_MSG_RESULT([not set])
  185. if test "x$AX_USING_CVS" = "x"; then
  186. AX_USING_CVS=no
  187. else
  188. AC_MSG_ERROR([CVS support cannot be enabled: USEREMAIL environment variable not set])
  189. fi
  190. fi
  191. AC_SUBST([USEREMAIL])
  192. fi
  193. if test "x$AX_USING_CVS" != "xno"; then
  194. AC_MSG_NOTICE([cvs support enabled])
  195. m4_pattern_allow([AC_INIT])
  196. AX_PRINT_TO_FILE([ax_cvs_rel.awk],[[
  197. BEGIN {
  198. if( change <= 0 )
  199. exit -1;
  200. }
  201. /AC_INIT/ {
  202. if( ${AX_DOLLAR}2 ~ /\\)${AX_DOLLAR}/ )
  203. {
  204. ver = substr( ${AX_DOLLAR}2, 0, length( ${AX_DOLLAR}2 ) - 1 );
  205. tail=\")\";
  206. }
  207. else
  208. ver = ${AX_DOLLAR}2;
  209. if( ${AX_DOLLAR}2 ~ /${AX_BS}${AX_SRB}${AX_DOLLAR}/ )
  210. {
  211. ver = substr( ${AX_DOLLAR}2, 0, length( ${AX_DOLLAR}2 ) - 1 );
  212. tail=\"${AX_SRB}\";
  213. }
  214. else
  215. ver = ${AX_DOLLAR}2;
  216. if( ${AX_DOLLAR}2 ~ /\\,${AX_DOLLAR}/ )
  217. {
  218. ver = substr( ${AX_DOLLAR}2, 0, length( ${AX_DOLLAR}2 ) - 1 );
  219. tail=\",\";
  220. }
  221. else
  222. ver = ${AX_DOLLAR}2;
  223. n = split( ver, ver_array, \".\" );
  224. while( change > n )
  225. ver_array[ ++n ] = 0;
  226. ver_array[ change ]++;
  227. while( ++change <= n )
  228. ver_array[ change ] = 0;
  229. ${AX_DOLLAR}2 = \"\";
  230. for( i = 1; i < n; ++i )
  231. ${AX_DOLLAR}2 = ${AX_DOLLAR}2 ver_array[ i ] \".\";
  232. ${AX_DOLLAR}2 = ${AX_DOLLAR}2 ver_array[ n ];
  233. if( tail )
  234. ${AX_DOLLAR}2 = ${AX_DOLLAR}2 tail;
  235. }
  236. { print ${AX_DOLLAR}0; }
  237. ]])
  238. fi
  239. AM_CONDITIONAL([ax_cvs_enabled],[test "x$AX_USING_CVS" != "xno"])
  240. AX_ADD_AM_MACRO_STATIC([
  241. if ax_cvs_enabled
  242. update:
  243. @cd \"${AX_DOLLAR}(srcdir)\" && \$(CVS) -z9 update
  244. cvsalways:
  245. ${AX_DOLLAR}(top_builddir)/commitlog: cvsalways
  246. @(CURR=\`pwd\`; cd \"${AX_DOLLAR}(top_srcdir)\"; \$(CVS) -z9 diff -u --brief 2>&1 | \\
  247. \$(GAWK) \\
  248. \'/^Index/ { print \"\\\\t* ./\" ${AX_DOLLAR}${AX_DOLLAR}2; } \\
  249. /^cvs diff: .* was removed/ { print \"\\\\t* ./\" ${AX_DOLLAR}${AX_DOLLAR}3 \" (removed)\"; } \\
  250. /^cvs diff: .* is a new entry/ { print \"\\\\t* ./\" ${AX_DOLLAR}${AX_DOLLAR}3 \" (added)\"; }\' \\
  251. > \"${AX_DOLLAR}${AX_DOLLAR}CURR/commitlog.tmp\")
  252. @if test -s commitlog.tmp; then \\
  253. echo \"\" >> commitlog.tmp; \\
  254. if test -f ${AX_DOLLAR}(top_builddir)/commitlog; then \\
  255. cat ${AX_DOLLAR}(top_builddir)/commitlog >> commitlog.tmp; \\
  256. fi; \\
  257. echo \"/* -*-change-log-*- */\" > ${AX_DOLLAR}(top_builddir)/commitlog; \\
  258. DATE=\`date +\"%%Y-%%m-%%d\"\`; \\
  259. echo \"${AX_DOLLAR}${AX_DOLLAR}DATE ${USERNAME} <${USEREMAIL}>\" >> ${AX_DOLLAR}(top_builddir)/commitlog; \\
  260. echo \"\" >> ${AX_DOLLAR}(top_builddir)/commitlog; \\
  261. cat commitlog.tmp >> ${AX_DOLLAR}(top_builddir)/commitlog; \\
  262. rm -f commitlog.tmp; \\
  263. \$(CVSEDITOR) ${AX_DOLLAR}(top_builddir)/commitlog; \\
  264. \$(GAWK) \'BEGIN { blank=0; } \\
  265. /\\\\/\\\\* -\\\\*-change-log-\\\\*- \\\\*\\\\// { getline; } \\
  266. /^[[:blank:]]*\$\$/ { if( !blank ) { blank = 1; print; } } \\
  267. /[[:alnum:]]/ { print; blank = 0; } \\
  268. END{ if( !blank ) print \"\"; }\' \\
  269. ${AX_DOLLAR}(top_builddir)/commitlog > commitlog.tmp; \\
  270. mv commitlog.tmp ${AX_DOLLAR}(top_builddir)/commitlog; \\
  271. else \\
  272. echo \"no changes found\";\\
  273. fi
  274. commit: update ${AX_DOLLAR}(top_builddir)/commitlog
  275. @if test -f ${AX_DOLLAR}(top_builddir)/commitlog; then \\
  276. cat ${AX_DOLLAR}(top_builddir)/commitlog \"\$(top_srcdir)/ChangeLog\" > ChangeLog.tmp; \\
  277. mv ChangeLog.tmp \"\$(top_srcdir)/ChangeLog\"; \\
  278. CURR=\`(cd \"${AX_DOLLAR}(top_builddir)\"; pwd )\`; \\
  279. (cd \"\$(top_srcdir)\"; \$(CVS) -z9 commit -F \"${AX_DOLLAR}${AX_DOLLAR}CURR/commitlog\" ); \\
  280. rm -f ${AX_DOLLAR}(top_builddir)/commitlog; \\
  281. fi
  282. cvs-rm:
  283. @echo \"Removing files from CVS\"
  284. @if test \"x\$(FILES)\" != \"x\"; then \\
  285. NEWFILES=\"\"; \\
  286. for FILE in \$(FILES); do \\
  287. if test -e \"${AX_DOLLAR}${AX_DOLLAR}FILE\"; then \\
  288. rm -i \"${AX_DOLLAR}${AX_DOLLAR}FILE\"; \\
  289. fi; \\
  290. if test ! -e \"${AX_DOLLAR}${AX_DOLLAR}FILE\"; then \\
  291. if test \"\$(srcdir)\" != \".\"; then \\
  292. FILE=\`echo \"${AX_DOLLAR}${AX_DOLLAR}FILE\" | \$(SED) -e \'s|^\$(srcdir)|.|\'\`; \\
  293. fi; \\
  294. NEWFILES=\"${AX_DOLLAR}${AX_DOLLAR}NEWFILES ${AX_DOLLAR}${AX_DOLLAR}FILE\"; \\
  295. fi; \\
  296. done; \\
  297. if test \"x${AX_DOLLAR}${AX_DOLLAR}NEWFILES\" != \"x\"; then \\
  298. (cd \"\$(srddir)\"; \$(CVS) remove ${AX_DOLLAR}${AX_DOLLAR}NEWFILES; ); \\
  299. fi; \\
  300. else \\
  301. echo \"You must specify the file(s) you want to remove from cvs by using\"; \\
  302. echo \"the FILES environment variable. For example:\"; \\
  303. echo \" make cvs-rm FILES=\'foo bar\'\"; \\
  304. echo \"\"; \\
  305. exit 1; \\
  306. fi
  307. cvs-add:
  308. @echo \"Adding files to CVS\"
  309. @if test \"x${AX_DOLLAR}(FILES)\" != \"x\"; then \\
  310. NEWFILES=\"\"; \\
  311. for FILE in ${AX_DOLLAR}(FILES); do \\
  312. if test -e \"${AX_DOLLAR}${AX_DOLLAR}FILE\"; then \\
  313. if test \"${AX_DOLLAR}(srcdir)\" != \".\"; then \\
  314. FILE=\`echo \"${AX_DOLLAR}${AX_DOLLAR}FILE\" | sed -e \'s|^${AX_DOLLAR}(srcdir)|.|\'\`; \\
  315. fi; \\
  316. fi; \\
  317. NEWFILES=\"${AX_DOLLAR}${AX_DOLLAR}NEWFILES ${AX_DOLLAR}${AX_DOLLAR}FILE\"; \\
  318. done; \\
  319. if test \"x${AX_DOLLAR}${AX_DOLLAR}NEWFILES\" != \"x\"; then \\
  320. cd \"${AX_DOLLAR}(srcdir)\"; \$(CVS) add ${AX_DOLLAR}${AX_DOLLAR}NEWFILES; \\
  321. fi; \\
  322. else \\
  323. echo \"You must specify the file(s) you want to add to cvs by using\"; \\
  324. echo \"the FILES environment variable. For example:\"; \\
  325. echo \" make cvs-add FILES=\'foo bar\'\"; \\
  326. echo \"\"; \\
  327. exit 1; \\
  328. fi
  329. branch-major:
  330. @tag=\"\$(PACKAGE)-${AX_MAJOR_VERSION}\"; \\
  331. echo \"\"; \\
  332. echo \"Creating major brach: ${AX_DOLLAR}${AX_DOLLAR}tag\"; \\
  333. (cd \"${AX_DOLLAR}(top_srcdir)\"; \$(CVS) tag -b \"${AX_DOLLAR}${AX_DOLLAR}tag\"; ); \\
  334. \$(GAWK) -f ax_cvs_rel.awk -v change=1 \"${AX_DOLLAR}(top_srcdir)/configure.ac\" > configure.tmp; \\
  335. touch ${AX_DOLLAR}(top_builddir)/commitlog; \\
  336. DATE=\`date +\"%%Y-%%m-%%d\"\`; \\
  337. echo \"${AX_DOLLAR}${AX_DOLLAR}DATE \$(USERNAME) <\$(USEREMAIL)>\" > commitlog.tmp ; \\
  338. echo \"\" >> commitlog.tmp; \\
  339. echo \" * ./configure.ac\" >> commitlog.tmp; \\
  340. echo \" Created major branch: ${AX_DOLLAR}${AX_DOLLAR}tag\" >> commitlog.tmp; \\
  341. echo \" Use:\" >> commitlog.tmp; \\
  342. echo \" \\\\\`cvs -d\$(ANON_CVSROOT) login\\\\\`\" >> commitlog.tmp; \\
  343. echo \" \\\\\`cvs -d\$(ANON_CVSROOT) co -r ${AX_DOLLAR}${AX_DOLLAR}tag \$(PACKAGE)\\\\\`\" >> commitlog.tmp; \\
  344. echo \" to access the branch\" >> commitlog.tmp; \\
  345. echo \"\" >> commitlog.tmp; \\
  346. cat ${AX_DOLLAR}(top_builddir)/commitlog >> commitlog.tmp; \\
  347. mv commitlog.tmp ${AX_DOLLAR}(top_builddir)/commitlog; \\
  348. cat ${AX_DOLLAR}(top_builddir)/commitlog \"${AX_DOLLAR}(top_srcdir)/ChangeLog\" > ChangeLog.tmp; \\
  349. mv ChangeLog.tmp \"${AX_DOLLAR}(top_srcdir)/ChangeLog\"; \\
  350. mv configure.tmp \"${AX_DOLLAR}(top_srcdir)/configure.ac\"; \\
  351. CURR=\`(cd \"${AX_DOLLAR}(top_builddir)\"; pwd )\`; \\
  352. (cd \"${AX_DOLLAR}(top_srcdir)\"; \$(CVS) -z9 commit -F \"${AX_DOLLAR}${AX_DOLLAR}CURR/commitlog\"; ); \\
  353. rm -f ${AX_DOLLAR}(top_builddir)/commitlog; \\
  354. \$(CVS) -z9 -d${AX_DOLLAR}(CVSROOT) co -r ${AX_DOLLAR}${AX_DOLLAR}tag -d ${AX_DOLLAR}${AX_DOLLAR}tag \$(PACKAGE); \\
  355. echo \"The branch is now available in the ${AX_DOLLAR}${AX_DOLLAR}tag directory\"; \\
  356. echo \"\"
  357. branch-minor:
  358. @tag=\"\$(PACKAGE)-${AX_MAJOR_VERSION}_${AX_MINOR_VERSION}\"; \\
  359. echo \"\"; \\
  360. echo \"Creating minor brach: ${AX_DOLLAR}${AX_DOLLAR}tag\"; \\
  361. (cd \"${AX_DOLLAR}(top_srcdir)\"; \$(CVS) tag -b \"${AX_DOLLAR}${AX_DOLLAR}tag\"; ); \\
  362. \$(GAWK) -f ax_cvs_rel.awk -v change=1 \"${AX_DOLLAR}(top_srcdir)/configure.ac\" > configure.tmp; \\
  363. touch ${AX_DOLLAR}(top_builddir)/commitlog; \\
  364. DATE=\`date +\"%%Y-%%m-%%d\"\`; \\
  365. echo \"${AX_DOLLAR}${AX_DOLLAR}DATE \$(USERNAME) <\$(USEREMAIL)>\" > commitlog.tmp ; \\
  366. echo \"\" >> commitlog.tmp; \\
  367. echo \" * ./configure.ac\" >> commitlog.tmp; \\
  368. echo \" Created minor branch: ${AX_DOLLAR}${AX_DOLLAR}tag\" >> commitlog.tmp; \\
  369. echo \" Use:\" >> commitlog.tmp; \\
  370. echo \" \\\\\`cvs -d\$(ANON_CVSROOT) login\\\\\`\" >> commitlog.tmp; \\
  371. echo \" \\\\\`cvs -d\$(ANON_CVSROOT) co -r ${AX_DOLLAR}${AX_DOLLAR}tag \$(PACKAGE)\\\\\`\" >> commitlog.tmp; \\
  372. echo \" to access the branch\" >> commitlog.tmp; \\
  373. echo \"\" >> commitlog.tmp; \\
  374. cat ${AX_DOLLAR}(top_builddir)/commitlog >> commitlog.tmp; \\
  375. mv commitlog.tmp ${AX_DOLLAR}(top_builddir)/commitlog; \\
  376. cat ${AX_DOLLAR}(top_builddir)/commitlog \"${AX_DOLLAR}(top_srcdir)/ChangeLog\" > ChangeLog.tmp; \\
  377. mv ChangeLog.tmp \"${AX_DOLLAR}(top_srcdir)/ChangeLog\"; \\
  378. mv configure.tmp \"${AX_DOLLAR}(top_srcdir)/configure.ac\"; \\
  379. CURR=\`(cd \"${AX_DOLLAR}(top_builddir)\"; pwd )\`; \\
  380. (cd \"${AX_DOLLAR}(top_srcdir)\"; \$(CVS) -z9 commit -F \"${AX_DOLLAR}${AX_DOLLAR}CURR/commitlog\"; ); \\
  381. rm -f ${AX_DOLLAR}(top_builddir)/commitlog; \\
  382. \$(CVS) -z9 -d${AX_DOLLAR}(CVSROOT) co -r ${AX_DOLLAR}${AX_DOLLAR}tag -d ${AX_DOLLAR}${AX_DOLLAR}tag \$(PACKAGE); \\
  383. echo \"The branch is now available in the ${AX_DOLLAR}${AX_DOLLAR}tag directory\"; \\
  384. echo \"\"
  385. add_rel:
  386. @touch \"${AX_DOLLAR}(top_builddir)/commitlog\"
  387. @DATE=\`date +\"%%Y-%%m-%%d\"\`; \\
  388. echo \"${AX_DOLLAR}${AX_DOLLAR}DATE \$(USERNAME) <\$(USEREMAIL)>\" > commitlog.tmp
  389. @echo \"\" >> commitlog.tmp
  390. @echo \" * ./configure.ac\" >> commitlog.tmp
  391. @echo \" Released \$(PACKAGE)-\$(VERSION)\" >> commitlog.tmp
  392. @echo \" You can access this release by running:\" >> commitlog.tmp
  393. @echo \" \\\\\`cvs -d\$(ANON_CVSROOT) login\\\\\`\" >> commitlog.tmp
  394. @tag=\"\$(PACKAGE)-${AX_MAJOR_VERSION}_${AX_MINOR_VERSION}_${AX_POINT_VERSION}\"; \\
  395. echo \" \\\\\`cvs -d\$(ANON_CVSROOT) co -r ${AX_DOLLAR}${AX_DOLLAR}tag -d \$(PACKAGE)-\$(VERSION) \$(PACKAGE)\\\\\`\" >> commitlog.tmp
  396. @echo \" The release will then be available in the \$(PACKAGE)-\$(VERSION) directory\" >> commitlog.tmp
  397. @echo \"\" >> commitlog.tmp
  398. @cat \"${AX_DOLLAR}(top_builddir)/commitlog\" >> commitlog.tmp
  399. @mv commitlog.tmp \"${AX_DOLLAR}(top_builddir)/commitlog\"
  400. @cat \"${AX_DOLLAR}(top_builddir)/commitlog\" \"\$(top_srcdir)/ChangeLog\" > ChangeLog.tmp
  401. @mv ChangeLog.tmp \"\$(top_srcdir)/ChangeLog\"
  402. @CURR=\`(cd \"${AX_DOLLAR}(top_builddir)\"; pwd )\`; \\
  403. (cd \"\$(top_srcdir)\"; \$(CVS) -z9 commit -F \"${AX_DOLLAR}${AX_DOLLAR}CURR/commitlog\"; )
  404. @rm -f ${AX_DOLLAR}(top_builddir)/commitlog
  405. do_tag:
  406. @tag=\"\$(PACKAGE)-${AX_MAJOR_VERSION}_${AX_MINOR_VERSION}_${AX_POINT_VERSION}\"; \\
  407. echo \"tagging release with ${AX_DOLLAR}${AX_DOLLAR}tag\"; \\
  408. (cd \"\$(top_srcdir)\"; \$(CVS) tag -b \"${AX_DOLLAR}${AX_DOLLAR}tag\"; ); \\
  409. \$(CVS) -z9 -d\$(CVSROOT) co -r ${AX_DOLLAR}${AX_DOLLAR}tag -d ${AX_DOLLAR}${AX_DOLLAR}tag \$(PACKAGE); \\
  410. echo \"The release is now available in the ${AX_DOLLAR}${AX_DOLLAR}tag directory\"; \\
  411. echo \"\"
  412. inc_rel:
  413. @\$(GAWK) -f ax_cvs_rel.awk -v change=3 \"\$(top_srcdir)/configure.ac\" > configure.tmp;
  414. @mv configure.tmp \"\$(top_srcdir)/configure.ac\"
  415. @touch \"\$(top_builddir)/commitlog\"
  416. @DATE=\`date +\"%%Y-%%m-%%d\"\`; \\
  417. echo \"${AX_DOLLAR}${AX_DOLLAR}DATE \$(USERNAME) <\$(USEREMAIL)>\" > commitlog.tmp ; \\
  418. echo \"\" >> commitlog.tmp; \\
  419. echo \" * ./configure.ac\" >> commitlog.tmp; \\
  420. echo \" Update version number\" >> commitlog.tmp; \\
  421. echo \"\" >> commitlog.tmp; \\
  422. cat ${AX_DOLLAR}(top_builddir)/commitlog >> commitlog.tmp; \\
  423. mv commitlog.tmp ${AX_DOLLAR}(top_builddir)/commitlog; \\
  424. cat ${AX_DOLLAR}(top_builddir)/commitlog \"${AX_DOLLAR}(top_srcdir)/ChangeLog\" > ChangeLog.tmp; \\
  425. mv ChangeLog.tmp \"${AX_DOLLAR}(top_srcdir)/ChangeLog\"; \\
  426. CURR=\`(cd \"${AX_DOLLAR}(top_builddir)\"; pwd )\`; \\
  427. (cd \"${AX_DOLLAR}(top_srcdir)\"; \$(CVS) -z9 commit -F \"${AX_DOLLAR}${AX_DOLLAR}CURR/commitlog\"; ); \\
  428. rm -f ${AX_DOLLAR}(top_builddir)/commitlog;
  429. tag: do_tag inc_rel
  430. # creates a release for the current version, increments the point
  431. # release number and checkout the release into a new directory
  432. release: update distcheck add_rel tag
  433. # same as release, but distcheck is not performed before releasing
  434. quick-release: update add_rel tag
  435. endif # ax_cvs_enabled
  436. ])
  437. ])