- Remove the first parameter from updaterevision, since it isn't needed with git.

This commit is contained in:
Randy Heit 2013-06-24 20:58:14 -05:00
parent 1032170ccd
commit a5f5d8adcb
3 changed files with 11 additions and 11 deletions

View file

@ -488,7 +488,7 @@ endif( BACKPATCH )
get_target_property( UPDATEREVISION_EXE updaterevision LOCATION ) get_target_property( UPDATEREVISION_EXE updaterevision LOCATION )
add_custom_target( revision_check ALL add_custom_target( revision_check ALL
COMMAND ${UPDATEREVISION_EXE} . src/gitinfo.h COMMAND ${UPDATEREVISION_EXE} src/gitinfo.h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS updaterevision ) DEPENDS updaterevision )

View file

@ -41,9 +41,9 @@ int main(int argc, char **argv)
vertag[0] = '\0'; vertag[0] = '\0';
lastlog[0] = '\0'; lastlog[0] = '\0';
if (argc != 3) if (argc != 2)
{ {
fprintf(stderr, "Usage: %s <repository directory> <path to gitinfo.h>\n", argv[0]); fprintf(stderr, "Usage: %s <path to gitinfo.h>\n", argv[0]);
return 1; return 1;
} }
@ -85,7 +85,7 @@ int main(int argc, char **argv)
hash = lastlog + 1; hash = lastlog + 1;
} }
stream = fopen (argv[2], "r"); stream = fopen (argv[1], "r");
if (stream != NULL) if (stream != NULL)
{ {
if (!gotrev) if (!gotrev)
@ -109,7 +109,7 @@ int main(int argc, char **argv)
if (needupdate) if (needupdate)
{ {
stream = fopen (argv[2], "w"); stream = fopen (argv[1], "w");
if (stream == NULL) if (stream == NULL)
{ {
return 1; return 1;
@ -125,11 +125,11 @@ int main(int argc, char **argv)
"#define GIT_TIME \"%s\"\n", "#define GIT_TIME \"%s\"\n",
hash, vertag, hash, lastlog); hash, vertag, hash, lastlog);
fclose(stream); fclose(stream);
fprintf(stderr, "%s updated to commit %s.\n", argv[2], vertag); fprintf(stderr, "%s updated to commit %s.\n", argv[1], vertag);
} }
else else
{ {
fprintf (stderr, "%s is up to date at commit %s.\n", argv[2], vertag); fprintf (stderr, "%s is up to date at commit %s.\n", argv[1], vertag);
} }
return 0; return 0;

View file

@ -29,7 +29,7 @@
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
Description="Checking gitinfo.h..." Description="Checking gitinfo.h..."
CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src src/gitinfo.h" CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src/gitinfo.h"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -152,7 +152,7 @@
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
Description="Checking gitinfo.h..." Description="Checking gitinfo.h..."
CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src src/gitinfo.h" CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src/gitinfo.h"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -265,7 +265,7 @@
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
Description="Checking gitinfo.h..." Description="Checking gitinfo.h..."
CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src src/gitinfo.h" CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src/gitinfo.h"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -372,7 +372,7 @@
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
Description="Checking gitinfo.h..." Description="Checking gitinfo.h..."
CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src src/gitinfo.h" CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src/gitinfo.h"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"