aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <mbuland@penny-arcade.com>2018-12-10 06:48:56 -0800
committerMike Buland <mbuland@penny-arcade.com>2018-12-10 06:48:56 -0800
commitc9aefa91df23de57e57818840555171bf4c831a1 (patch)
tree8cb6d4dbcb82c7f6f31274c205411c3379ffa074
parent40e561cc553c808af8c5b5392f1fd74eacdd94b2 (diff)
downloadlibbu++-c9aefa91df23de57e57818840555171bf4c831a1.tar.gz
libbu++-c9aefa91df23de57e57818840555171bf4c831a1.tar.bz2
libbu++-c9aefa91df23de57e57818840555171bf4c831a1.tar.xz
libbu++-c9aefa91df23de57e57818840555171bf4c831a1.zip
Updated to use git for versions.
-rw-r--r--autoconfig.cpp20
-rw-r--r--default.bld4
2 files changed, 15 insertions, 9 deletions
diff --git a/autoconfig.cpp b/autoconfig.cpp
index 0df3dbd..244fedf 100644
--- a/autoconfig.cpp
+++ b/autoconfig.cpp
@@ -130,15 +130,21 @@ int main( int argc, char *argv[] )
130 fprintf( fOut, 130 fprintf( fOut,
131 "#ifndef BU_VERSION_H\n" 131 "#ifndef BU_VERSION_H\n"
132 "#define BU_VERSION_H\n\n" 132 "#define BU_VERSION_H\n\n"
133 "#define LIBBU_VERSION 0\n" 133 "#define LIBBU_VERSION 0\n"
134 "#define LIBBU_REVISION 1\n" 134 "#define LIBBU_REVISION 1\n"
135 "#define LIBBU_VERSION_STR \"%s\"\n" 135 "#define LIBBU_VERSION_STR \"%s\"\n"
136 "#define LIBBU_API 0\n" 136 "#define LIBBU_API 0\n"
137 "#define LIBBU_VC_ID \"", 137 "#define LIBBU_VC_ID \"",
138 buf 138 buf
139 ); 139 );
140 FILE *psub = popen("svnversion -n", "r"); 140
141 fwrite( buf, fread( buf, 1, 1024, psub ), 1, fOut ); 141 char buf2[1024];
142 FILE *psub = popen("git describe --always", "r");
143 buf2[fread( buf2, 1, 1024, psub )] = '\0';
144 for( int j = 0; buf2[j]; j++ )
145 if( buf2[j] == '\n' )
146 buf2[j] = '\0';
147 fwrite( buf2, strlen(buf2), 1, fOut );
142 pclose( psub ); 148 pclose( psub );
143 fprintf( fOut, "\"\n\n#endif\n"); 149 fprintf( fOut, "\"\n\n#endif\n");
144 } 150 }
diff --git a/default.bld b/default.bld
index c471744..68bd049 100644
--- a/default.bld
+++ b/default.bld
@@ -61,7 +61,7 @@ target ["src/autoconfig.h", "src/version.h"]
61 61
62target "src/version.h" 62target "src/version.h"
63{ 63{
64 input ".svn"; 64 input ".git";
65} 65}
66 66
67target "src/signals.h" 67target "src/signals.h"
@@ -178,7 +178,7 @@ target "src/extra/myriadfs.o"
178 178
179target "myriadfs" 179target "myriadfs"
180{ 180{
181 LDFLAGS += "-lfuse"; 181 LDFLAGS += "-lfuse -lpthread";
182} 182}
183 183
184target "bin2cpp" 184target "bin2cpp"