File: ax_cvs.html

package info (click to toggle)
autoconf-archive 20060312-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,180 kB
  • ctags: 13
  • sloc: sh: 455; makefile: 44
file content (529 lines) | stat: -rw-r--r-- 20,076 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
 <head>
  <title>
   Autoconf Macro: ax_cvs
  </title>
  <link rel="stylesheet" type="text/css" href="ac-archive.css">
 </head>
 <body>
  <table summary="web navigation" style="width:100%;">
   <tbody>
    <tr>
     <td style="width:50%;" align="center">
      <a href="http://autoconf-archive.cryp.to/ax_cvs.m4">Download M4
      Source</a>
     </td>
     <td style="width:50%;" align="center">
      <a href="macros-by-category.html">Macro Index Page</a>
     </td>
    </tr>
   </tbody>
  </table>
  <hr>
  <h1>
   ax_cvs
  </h1>
  <h2>
   Synopsis
  </h2>
  <p class="indent" style="white-space:nowrap;">
   <code>AX_CVS([ANON_CVSROOT])</code>
  </p>
  <h2>
   Description
  </h2>
  <div class="indent">
   <p>
    Adds support cvs targets within your Makefile.
   </p>
   <p>
    Branching and releasing relies on you using the following version format:
   </p>
   <pre>
   MAJOR.MINOR.POINT
</pre>
   <p>
    where MAJOR is the major version number, MINOR is the minor version number
    and POINT is the point release number.
   </p>
   <p>
    make update
   </p>
   <pre>
  performs a cvs update
</pre>
   <p>
    make commitlog
   </p>
   <pre>
  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 instad 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.
</pre>
   <p>
    make commit
   </p>
   <pre>
  performs a cvs commit after first performing a cvs
  update and generating a commit log.
</pre>
   <p>
    make cvs-rm FILES="file1 file2 ..."
   </p>
   <pre>
  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.
</pre>
   <p>
    make cvs-add FILES="file1 file2 ..."
   </p>
   <pre>
  adds a file or files specified by the FILES variable
  to cvs.
</pre>
   <p>
    make branch-major
   </p>
   <pre>
  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.
</pre>
   <p>
    make branch-minor
   </p>
   <pre>
  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.
</pre>
   <p>
    make release
   </p>
   <pre>
  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
</pre>
   <p>
    make quick-release
   </p>
   <pre>
  same as release, but distcheck is not performed
</pre>
  </div>
  <h2>
   Author
  </h2>
  <p class="indent">
   Tom Howard &lt;tomhoward@users.sf.net&gt;
  </p>
  <h2>
   Last Modified
  </h2>
  <p class="indent">
   2005-01-14
  </p>
  <h2>
   M4 Source Code
  </h2>
  <div class="indent">
   <pre class="m4source">
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])
fi


AC_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
    fi
fi

if test "x$AX_USING_CVS" != "xno"; then
   AC_ARG_VAR(GAWK, [gawk executable to use])
   if test "x$GAWK" = "x"; then
      AC_CHECK_PROGS(GAWK,[gawk])
   fi
   if test "x$GAWK" = "x"; then
       if test "x$AX_USING_CVS" = "x"; then
            AX_USING_CVS=no
        else
            AC_MSG_ERROR([CVS support cannot be enabled: gawk could not be found])
        fi
    fi
fi

if 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
    fi
fi

if 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
    fi
fi

if 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
    fi
fi

if 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
    fi
fi


if 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 &lt;= 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 &gt; n )
        ver_array[ ++n ] = 0;

    ver_array[ change ]++;

    while( ++change &lt;= n )
        ver_array[ change ] = 0;

    ${AX_DOLLAR}2 = \"\";
    for( i = 1; i &lt; n; ++i )
        ${AX_DOLLAR}2 = ${AX_DOLLAR}2 ver_array[ i ] \".\";
    ${AX_DOLLAR}2 = ${AX_DOLLAR}2 ver_array[ n ];
    if( tail )
        ${AX_DOLLAR}2 = ${AX_DOLLAR}2 tail;
}

{ print ${AX_DOLLAR}0; }

]])
    AX_ADD_AM_MACRO([[

update:
        @cd \"${AX_DOLLAR}(srcdir)\" &amp;&amp; $CVS -z9 update

cvsalways:

${AX_DOLLAR}(top_builddir)/commitlog: cvsalways
        @(CURR=\`pwd\`; cd \"${AX_DOLLAR}(top_srcdir)\"; $CVS -z9 diff -u --brief 2&gt;&amp;1 | \\
        $GAWK \\
        \'/^Index/ { print \"\\\\t* ./\" ${AX_DOLLAR}${AX_DOLLAR}2; } \\
        /^cvs diff: .* was removed/ { print \"\\\\t* ./\" ${AX_DOLLAR}${AX_DOLLAR}3 \" (removed)\"; } \\
        /^cvs diff: .* is a new entry/ { print \"\\\\t* ./\" ${AX_DOLLAR}${AX_DOLLAR}3 \" (added)\"; }\' \\
        &gt; \"${AX_DOLLAR}${AX_DOLLAR}CURR/commitlog.tmp\")
        @if test -s commitlog.tmp; then \\
                echo \"\" &gt;&gt; commitlog.tmp; \\
                if test -f ${AX_DOLLAR}(top_builddir)/commitlog; then \\
                        cat ${AX_DOLLAR}(top_builddir)/commitlog &gt;&gt; commitlog.tmp; \\
                fi; \\
                echo \"/* -*-change-log-*- */\" &gt; ${AX_DOLLAR}(top_builddir)/commitlog; \\
                DATE=\`date +\"%%Y-%%m-%%d\"\`; \\
                echo \"${AX_DOLLAR}${AX_DOLLAR}DATE        ${USERNAME}     &lt;${USEREMAIL}&gt;\" &gt;&gt; ${AX_DOLLAR}(top_builddir)/commitlog; \\
                echo \"\" &gt;&gt; ${AX_DOLLAR}(top_builddir)/commitlog; \\
                cat commitlog.tmp  &gt;&gt; ${AX_DOLLAR}(top_builddir)/commitlog; \\
                rm -f commitlog.tmp; \\
                $CVSEDITOR ${AX_DOLLAR}(top_builddir)/commitlog; \\
                $GAWK \'BEGIN { blank=0; } \\
                /\\\\/\\\\* -\\\\*-change-log-\\\\*- \\\\*\\\\// { getline; } \\
                /^[[:blank:]]*\$\$/ { if( !blank ) { blank = 1; print; } } \\
                /[[:alnum:]]/ { print; blank = 0; } \\
                END{ if( !blank ) print \"\"; }\' \\
                ${AX_DOLLAR}(top_builddir)/commitlog &gt; commitlog.tmp; \\
                mv commitlog.tmp ${AX_DOLLAR}(top_builddir)/commitlog; \\
        else \\
                echo \"no changes found\";\\
        fi

commit: update ${AX_DOLLAR}(top_builddir)/commitlog
        @if test -f ${AX_DOLLAR}(top_builddir)/commitlog; then \\
            cat ${AX_DOLLAR}(top_builddir)/commitlog \"\$(top_srcdir)/ChangeLog\" &gt; ChangeLog.tmp; \\
            mv ChangeLog.tmp \"\$(top_srcdir)/ChangeLog\"; \\
            CURR=\`(cd \"${AX_DOLLAR}(top_builddir)\"; pwd )\`; \\
            (cd \"\$(top_srcdir)\"; $CVS -z9 commit -F \"${AX_DOLLAR}${AX_DOLLAR}CURR/commitlog\" ); \\
            rm -f ${AX_DOLLAR}(top_builddir)/commitlog; \\
        fi

cvs-rm:
        @echo \"Removing files from CVS\"
        @if test \"x\$(FILES)\" != \"x\"; then \\
            NEWFILES=\"\"; \\
            for FILE in \$(FILES); do \\
                if test -e \"${AX_DOLLAR}${AX_DOLLAR}FILE\"; then \\
                    rm -i \"${AX_DOLLAR}${AX_DOLLAR}FILE\"; \\
                fi; \\
                if test ! -e \"${AX_DOLLAR}${AX_DOLLAR}FILE\"; then \\
                    if test \"\$(srcdir)\" != \".\"; then \\
                        FILE=\`echo \"${AX_DOLLAR}${AX_DOLLAR}FILE\" | $SED -e \'s|^\$(srcdir)|.|\'\`; \\
                    fi; \\
                    NEWFILES=\"${AX_DOLLAR}${AX_DOLLAR}NEWFILES ${AX_DOLLAR}${AX_DOLLAR}FILE\"; \\
                fi; \\
            done; \\
            if test \"x${AX_DOLLAR}${AX_DOLLAR}NEWFILES\" != \"x\"; then \\
                (cd \"\$(srddir)\"; $CVS remove ${AX_DOLLAR}${AX_DOLLAR}NEWFILES; ); \\
            fi; \\
        else \\
            echo \"You must specify the file(s) you want to remove from cvs by using\"; \\
            echo \"the FILES environment variable.  For example:\"; \\
            echo \"    make cvs-rm FILES=\'foo bar\'\"; \\
            echo \"\"; \\
            exit 1; \\
        fi

cvs-add:
        @echo \"Adding files to CVS\"
        @if test \"x${AX_DOLLAR}(FILES)\" != \"x\"; then \\
            NEWFILES=\"\"; \\
            for FILE in ${AX_DOLLAR}(FILES); do \\
                if test -e \"${AX_DOLLAR}${AX_DOLLAR}FILE\"; then \\
                    if test \"${AX_DOLLAR}(srcdir)\" != \".\"; then \\
                        FILE=\`echo \"${AX_DOLLAR}${AX_DOLLAR}FILE\" | sed -e \'s|^${AX_DOLLAR}(srcdir)|.|\'\`; \\
                    fi; \\
                fi; \\
                NEWFILES=\"${AX_DOLLAR}${AX_DOLLAR}NEWFILES ${AX_DOLLAR}${AX_DOLLAR}FILE\"; \\
            done; \\
            if test \"x${AX_DOLLAR}${AX_DOLLAR}NEWFILES\" != \"x\"; then \\
                cd \"${AX_DOLLAR}(srcdir)\"; $CVS add ${AX_DOLLAR}${AX_DOLLAR}NEWFILES; \\
            fi; \\
        else \\
            echo \"You must specify the file(s) you want to add to cvs by using\"; \\
            echo \"the FILES environment variable.  For example:\"; \\
            echo \"    make cvs-add FILES=\'foo bar\'\"; \\
            echo \"\"; \\
            exit 1; \\
        fi

branch-major:
        @tag=\"$PACKAGE-${AX_MAJOR_VERSION}\"; \\
        echo \"\"; \\
        echo \"Creating major brach: ${AX_DOLLAR}${AX_DOLLAR}tag\"; \\
        (cd \"${AX_DOLLAR}(top_srcdir)\"; $CVS tag -b \"${AX_DOLLAR}${AX_DOLLAR}tag\"; ); \\
        $GAWK -f ax_cvs_rel.awk -v change=1 \"${AX_DOLLAR}(top_srcdir)/configure.ac\" &gt; configure.tmp; \\
        touch ${AX_DOLLAR}(top_builddir)/commitlog; \\
        DATE=\`date +\"%%Y-%%m-%%d\"\`; \\
        echo \"${AX_DOLLAR}${AX_DOLLAR}DATE        $USERNAME       &lt;$USEREMAIL&gt;\" &gt; commitlog.tmp ; \\
        echo \"\" &gt;&gt; commitlog.tmp; \\
        echo \"    * ./configure.ac\" &gt;&gt; commitlog.tmp; \\
        echo \"    Created major branch: ${AX_DOLLAR}${AX_DOLLAR}tag\" &gt;&gt; commitlog.tmp; \\
        echo \"    Use:\" &gt;&gt; commitlog.tmp; \\
        echo \"    \\\\\`cvs -d$ANON_CVSROOT login\\\\\`\" &gt;&gt; commitlog.tmp; \\
        echo \"    \\\\\`cvs -d$ANON_CVSROOT co -r ${AX_DOLLAR}${AX_DOLLAR}tag $PACKAGE\\\\\`\" &gt;&gt; commitlog.tmp; \\
        echo \"    to access the branch\" &gt;&gt; commitlog.tmp; \\
        echo \"\" &gt;&gt; commitlog.tmp; \\
        cat ${AX_DOLLAR}(top_builddir)/commitlog &gt;&gt; commitlog.tmp; \\
        mv commitlog.tmp ${AX_DOLLAR}(top_builddir)/commitlog; \\
        cat ${AX_DOLLAR}(top_builddir)/commitlog \"${AX_DOLLAR}(top_srcdir)/ChangeLog\" &gt; ChangeLog.tmp; \\
        mv ChangeLog.tmp \"${AX_DOLLAR}(top_srcdir)/ChangeLog\"; \\
        mv configure.tmp \"${AX_DOLLAR}(top_srcdir)/configure.ac\"; \\
        CURR=\`(cd \"${AX_DOLLAR}(top_builddir)\"; pwd )\`; \\
        (cd \"${AX_DOLLAR}(top_srcdir)\"; $CVS -z9 commit -F \"${AX_DOLLAR}${AX_DOLLAR}CURR/commitlog\"; ); \\
        rm -f ${AX_DOLLAR}(top_builddir)/commitlog; \\
        $CVS -z9 -d${AX_DOLLAR}(CVSROOT) co -r ${AX_DOLLAR}${AX_DOLLAR}tag -d ${AX_DOLLAR}${AX_DOLLAR}tag $PACKAGE; \\
        echo \"The branch is now available in the ${AX_DOLLAR}${AX_DOLLAR}tag directory\"; \\
        echo \"\"


branch-minor:
        @tag=\"$PACKAGE-${AX_MAJOR_VERSION}_${AX_MINOR_VERSION}\"; \\
        echo \"\"; \\
        echo \"Creating minor brach: ${AX_DOLLAR}${AX_DOLLAR}tag\"; \\
        (cd \"${AX_DOLLAR}(top_srcdir)\"; $CVS tag -b \"${AX_DOLLAR}${AX_DOLLAR}tag\"; ); \\
        $GAWK -f ax_cvs_rel.awk -v change=1 \"${AX_DOLLAR}(top_srcdir)/configure.ac\" &gt; configure.tmp; \\
        touch ${AX_DOLLAR}(top_builddir)/commitlog; \\
        DATE=\`date +\"%%Y-%%m-%%d\"\`; \\
        echo \"${AX_DOLLAR}${AX_DOLLAR}DATE        $USERNAME       &lt;$USEREMAIL&gt;\" &gt; commitlog.tmp ; \\
        echo \"\" &gt;&gt; commitlog.tmp; \\
        echo \"    * ./configure.ac\" &gt;&gt; commitlog.tmp; \\
        echo \"    Created minor branch: ${AX_DOLLAR}${AX_DOLLAR}tag\" &gt;&gt; commitlog.tmp; \\
        echo \"    Use:\" &gt;&gt; commitlog.tmp; \\
        echo \"    \\\\\`cvs -d$ANON_CVSROOT login\\\\\`\" &gt;&gt; commitlog.tmp; \\
        echo \"    \\\\\`cvs -d$ANON_CVSROOT co -r ${AX_DOLLAR}${AX_DOLLAR}tag $PACKAGE\\\\\`\" &gt;&gt; commitlog.tmp; \\
        echo \"    to access the branch\" &gt;&gt; commitlog.tmp; \\
        echo \"\" &gt;&gt; commitlog.tmp; \\
        cat ${AX_DOLLAR}(top_builddir)/commitlog &gt;&gt; commitlog.tmp; \\
        mv commitlog.tmp ${AX_DOLLAR}(top_builddir)/commitlog; \\
        cat ${AX_DOLLAR}(top_builddir)/commitlog \"${AX_DOLLAR}(top_srcdir)/ChangeLog\" &gt; ChangeLog.tmp; \\
        mv ChangeLog.tmp \"${AX_DOLLAR}(top_srcdir)/ChangeLog\"; \\
        mv configure.tmp \"${AX_DOLLAR}(top_srcdir)/configure.ac\"; \\
        CURR=\`(cd \"${AX_DOLLAR}(top_builddir)\"; pwd )\`; \\
        (cd \"${AX_DOLLAR}(top_srcdir)\"; $CVS -z9 commit -F \"${AX_DOLLAR}${AX_DOLLAR}CURR/commitlog\"; ); \\
        rm -f ${AX_DOLLAR}(top_builddir)/commitlog; \\
        $CVS -z9 -d${AX_DOLLAR}(CVSROOT) co -r ${AX_DOLLAR}${AX_DOLLAR}tag -d ${AX_DOLLAR}${AX_DOLLAR}tag $PACKAGE; \\
        echo \"The branch is now available in the ${AX_DOLLAR}${AX_DOLLAR}tag directory\"; \\
        echo \"\"

add_rel:
        @touch \"${AX_DOLLAR}(top_builddir)/commitlog\"
        @DATE=\`date +\"%%Y-%%m-%%d\"\`; \\
        echo \"${AX_DOLLAR}${AX_DOLLAR}DATE        $USERNAME       &lt;$USEREMAIL&gt;\" &gt; commitlog.tmp
        @echo \"\" &gt;&gt; commitlog.tmp
        @echo \"   * ./configure.ac\" &gt;&gt; commitlog.tmp
        @echo \"   Released $PACKAGE-$VERSION\" &gt;&gt; commitlog.tmp
        @echo \"   You can access this release by running:\" &gt;&gt; commitlog.tmp
        @echo \"       \\\\\`cvs -d$ANON_CVSROOT login\\\\\`\" &gt;&gt; commitlog.tmp
        @tag=\"$PACKAGE-${AX_MAJOR_VERSION}_${AX_MINOR_VERSION}_${AX_POINT_VERSION}\"; \\
        echo \"        \\\\\`cvs -d$ANON_CVSROOT co -r ${AX_DOLLAR}${AX_DOLLAR}tag -d $PACKAGE-$VERSION $PACKAGE\\\\\`\" &gt;&gt; commitlog.tmp
        @echo \"   The release will then be available in the $PACKAGE-$VERSION directory\" &gt;&gt; commitlog.tmp
        @echo \"\" &gt;&gt; commitlog.tmp
        @cat \"${AX_DOLLAR}(top_builddir)/commitlog\" &gt;&gt; commitlog.tmp
        @mv commitlog.tmp \"${AX_DOLLAR}(top_builddir)/commitlog\"
        @cat \"${AX_DOLLAR}(top_builddir)/commitlog\" \"\$(top_srcdir)/ChangeLog\" &gt; ChangeLog.tmp
        @mv ChangeLog.tmp \"\$(top_srcdir)/ChangeLog\"
        @CURR=\`(cd \"${AX_DOLLAR}(top_builddir)\"; pwd )\`; \\
        (cd \"\$(top_srcdir)\"; $CVS -z9 commit -F \"${AX_DOLLAR}${AX_DOLLAR}CURR/commitlog\"; )
        @rm -f ${AX_DOLLAR}(top_builddir)/commitlog

do_tag:
        @tag=\"$PACKAGE-${AX_MAJOR_VERSION}_${AX_MINOR_VERSION}_${AX_POINT_VERSION}\"; \\
        echo \"tagging release with ${AX_DOLLAR}${AX_DOLLAR}tag\"; \\
        (cd \"\$(top_srcdir)\"; $CVS tag -b \"${AX_DOLLAR}${AX_DOLLAR}tag\"; ); \\
        $CVS -z9 -d$CVSROOT co -r ${AX_DOLLAR}${AX_DOLLAR}tag -d ${AX_DOLLAR}${AX_DOLLAR}tag $PACKAGE; \\
        echo \"The release is now available in the ${AX_DOLLAR}${AX_DOLLAR}tag directory\"; \\
        echo \"\"

inc_rel:
        @$GAWK -f ax_cvs_rel.awk -v change=3 \"\$(top_srcdir)/configure.ac\" &gt; configure.tmp;
        @mv configure.tmp \"\$(top_srcdir)/configure.ac\"
        @touch \"\$(top_builddir)/commitlog\"
        @DATE=\`date +\"%%Y-%%m-%%d\"\`; \\
        echo \"${AX_DOLLAR}${AX_DOLLAR}DATE        $USERNAME       &lt;$USEREMAIL&gt;\" &gt; commitlog.tmp ; \\
        echo \"\" &gt;&gt; commitlog.tmp; \\
        echo \"    * ./configure.ac\" &gt;&gt; commitlog.tmp; \\
        echo \"    Update version number\" &gt;&gt; commitlog.tmp; \\
        echo \"\" &gt;&gt; commitlog.tmp; \\
        cat ${AX_DOLLAR}(top_builddir)/commitlog &gt;&gt; commitlog.tmp; \\
        mv commitlog.tmp ${AX_DOLLAR}(top_builddir)/commitlog; \\
        cat ${AX_DOLLAR}(top_builddir)/commitlog \"${AX_DOLLAR}(top_srcdir)/ChangeLog\" &gt; ChangeLog.tmp; \\
        mv ChangeLog.tmp \"${AX_DOLLAR}(top_srcdir)/ChangeLog\"; \\
        CURR=\`(cd \"${AX_DOLLAR}(top_builddir)\"; pwd )\`; \\
        (cd \"${AX_DOLLAR}(top_srcdir)\"; $CVS -z9 commit -F \"${AX_DOLLAR}${AX_DOLLAR}CURR/commitlog\"; ); \\
        rm -f ${AX_DOLLAR}(top_builddir)/commitlog;

tag: do_tag inc_rel

# creates a release for the current version, increaments the point
# release number and checkout the release into a new direcory
release: update distcheck add_rel tag

# same as release, but distcheck is not performed before releasing
quick-release:  update add_rel tag

]])

fi

])
</pre>
  </div>
 </body>
</html>