autorevision.cpp expects to find a comment with the (svn-)revision in the first line of autorevision.h, but the lgplv3-comment is placed before it.
In addition, the comment is missing from the header-file generated by autorevision.cpp if the revision has changed (or autorevision believes it has changed).
Here is a patch that fixes both issues:
--- codeblocks-1.0svn.orig/src/include/autorevision.h.in 2008-03-01 09:43:53.000000000 +0100
+++ codeblocks-1.0svn.work/src/include/autorevision.h.in 2008-03-02 00:33:02.000000000 +0100
@@ -1,9 +1,9 @@
+/*@REVISION@*/^M
/*^M
* This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3^M
* http://www.gnu.org/licenses/lgpl-3.0.html^M
*/^M
^M
-/*@REVISION@*/^M
#ifndef AUTOREVISION_H^M
#define AUTOREVISION_H^M
^M
--- codeblocks-1.0svn.orig/src/build_tools/autorevision/autorevision.cpp 2008-03-01 09:18:46.000000000 +0100
+++ codeblocks-1.0svn.work/src/build_tools/autorevision/autorevision.cpp 2008-03-02 00:37:42.000000000 +0100
@@ -163,6 +163,10 @@
}
fprintf(header, "%s\n", comment.c_str());
+ fprintf(header, "/*\n");
+ fprintf(header, " * * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3\n");
+ fprintf(header, " * * http://www.gnu.org/licenses/lgpl-3.0.html\n");
+ fprintf(header, " * */\n");
fprintf(header, "//don't include this header, only configmanager-revision.cpp should do this.\n");
fprintf(header, "#ifndef AUTOREVISION_H\n");
fprintf(header, "#define AUTOREVISION_H\n\n\n");
Please consider when trying to apply the patch that the "^M"'s in the above patch are dos-lineednings as seen by vi.
Those are no issues, no patch needed. Just delete autorevision.h.
I tried this of course, but that does not (and can not) work.
The lgplv3-comment is in autorevision.h.in.
Running ./configure creates autorevision.h and expands @REVISION@ and @DATE@.
At compiletime, after creating the executable auto_revision, it is called from it's Makefile:
all-local: auto_revision
./auto_revision +int +wx +t $(top_srcdir) $(top_srcdir)/src/include/autorevision.h
and looks for the revision number in the command comment in the first line of autorevision.h .
If it's not found there, or less then the revision number gathered from svn-command, it writes a new autorevision.h.
But if it's build from a source-tree without svn-informations (like I do for my nightlies to keep the tar-balls small) "0" is taken for the revision and "unknown date" for the date.
And that is an issue.
I wonder how the GPLv3 comment got into that file in the first place, though. Anyway, just delete that file, and everything will be good.
It's there since svn 4910: http://svn.berlios.de/wsvn/codeblocks/trunk/src/include/autorevision.h.in?op=diff&rev=4910&sc=1 (http://svn.berlios.de/wsvn/codeblocks/trunk/src/include/autorevision.h.in?op=diff&rev=4910&sc=1) .
/*@REVISION@*/ should be in the first line, because the WriteOutput-function in autorevision.cpp looks for the revision in the first line.
The second part of the patch is to ensure that the lgplv3-comment is also in the header if it is auto-generated by WriteOutput, because it belongs in the header oif course.