bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] make version.c the ordinary file; create version.h.in


From: Alexey Mahotkin
Subject: [PATCH] make version.c the ordinary file; create version.h.in
Date: Sun, 19 Aug 2001 21:39:31 +0400 (MSD)

It seems to me it would be much better if the file version.c become
plain .c file, with the only line that really needs autogeneration be
moved out to the version.h header.  Below is the patch for that.


Comments: 

        $ cvs rm -f src/version.c.in
        $ cvs add src/version.h.in

after you apply the patch.

--- ccvs/configure.in   Wed Aug 15 01:01:47 2001
+++ ccvs-fixed/configure.in     Fri Aug 17 02:02:09 2001
@@ -401,6 +401,7 @@
          os2/Makefile \
          src/Makefile \
          src/cvsbug \
+         src/version.h \
          tools/Makefile \
          vms/Makefile \
          windows-NT/Makefile \
--- ccvs/src/Makefile.am        Sun Jun  3 12:53:18 2001
+++ ccvs-fixed/src/Makefile.am  Fri Aug 17 01:58:12 2001
@@ -92,13 +92,13 @@
        root.h \
        server.h \
        update.h \
-       watch.h
+       watch.h \
+       version.c
+
 cvs_LDADD = \
        ../diff/libdiff.a \
        ../lib/libcvs.a \
-       ../zlib/libz.a \
-       version.o
-cvs_EXTRA_DIST = version.c
+       ../zlib/libz.a
 
 # extra clean targets
 # wish this could be distclean-hdr-local but it's not part of automake
@@ -106,7 +106,6 @@
 
 # General
 EXTRA_DIST = \
-       $(cvs_EXTRA_DIST) \
        .cvsignore \
        ChangeLog-9194 \
        ChangeLog-9395 \
@@ -114,8 +113,7 @@
        ChangeLog-97 \
        build_src.com \
        sanity.sh \
-       version.c \
-       version.c.in
+       version.h.in
 
 check-local: localcheck remotecheck
 
@@ -128,20 +126,6 @@
        $(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs
 
 ## MAINTAINER Targets
-
-# version.c
-# - build this here so that we can distribute it
-# - version.c needs to be updated only once, since it depends on
-#   configure.in, not on the results of a 'configure' run.
-# - It is guaranteed (with GNU Make) that when the version in configure.in
-#   is changed, acversion.m4 is built only after the new version number is
-#   propagated to the Makefile.  (Libtool uses the same guarantee.)
-# - need the explicit version.o dependency or else make won't match
-#   $(srcdir)/version.c when looking for a dependency for version.c
-version.o: $(srcdir)/version.c
-$(srcdir)/version.c: $(srcdir)/version.c.in $(top_srcdir)/configure.in
-       sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/version.c.in 
>$(srcdir)/version.tc
-       mv $(srcdir)/version.tc $(srcdir)/version.c
 
 # for backwards compatibility with the old makefiles
 .PHONY: realclean
--- ccvs/src/version.c  Sat Apr 28 01:26:50 2001
+++ ccvs-fixed/src/version.c    Fri Aug 17 02:01:18 2001
@@ -11,8 +11,7 @@
  */
 
 #include "cvs.h"
-
-char *version_string = "Concurrent Versions System (CVS) 1.11.1.1";
+#include "version.h"
 
 #ifdef CLIENT_SUPPORT
 #ifdef SERVER_SUPPORT
--- /dev/null   Thu Mar 29 00:47:57 2001
+++ ccvs-fixed/src/version.h.in Fri Aug 17 02:00:29 2001
@@ -0,0 +1,15 @@
+/* -*- c -*-
+ *
+ * Copyright (c) 1992, Brian Berliner and Jeff Polk
+ * Copyright (c) 1989-1992, Brian Berliner
+ *
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS kit.
+ */
+
+#ifndef VERSION_H
+#define VERSION_H 1
+
+#define version_string "Concurrent Versions System (CVS) @VERSION@"
+
+#endif /* VERSION_H */


--alexm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]