diff options
author | Mike Buland <mbuland@penny-arcade.com> | 2018-12-10 06:48:56 -0800 |
---|---|---|
committer | Mike Buland <mbuland@penny-arcade.com> | 2018-12-10 06:48:56 -0800 |
commit | c9aefa91df23de57e57818840555171bf4c831a1 (patch) | |
tree | 8cb6d4dbcb82c7f6f31274c205411c3379ffa074 | |
parent | 40e561cc553c808af8c5b5392f1fd74eacdd94b2 (diff) | |
download | libbu++-c9aefa91df23de57e57818840555171bf4c831a1.tar.gz libbu++-c9aefa91df23de57e57818840555171bf4c831a1.tar.bz2 libbu++-c9aefa91df23de57e57818840555171bf4c831a1.tar.xz libbu++-c9aefa91df23de57e57818840555171bf4c831a1.zip |
Updated to use git for versions.
-rw-r--r-- | autoconfig.cpp | 20 | ||||
-rw-r--r-- | default.bld | 4 |
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 | ||
62 | target "src/version.h" | 62 | target "src/version.h" |
63 | { | 63 | { |
64 | input ".svn"; | 64 | input ".git"; |
65 | } | 65 | } |
66 | 66 | ||
67 | target "src/signals.h" | 67 | target "src/signals.h" |
@@ -178,7 +178,7 @@ target "src/extra/myriadfs.o" | |||
178 | 178 | ||
179 | target "myriadfs" | 179 | target "myriadfs" |
180 | { | 180 | { |
181 | LDFLAGS += "-lfuse"; | 181 | LDFLAGS += "-lfuse -lpthread"; |
182 | } | 182 | } |
183 | 183 | ||
184 | target "bin2cpp" | 184 | target "bin2cpp" |