git-svn: trunk@4071
Török Edvin authored on 2008/08/04 07:11:06... | ... |
@@ -201,17 +201,19 @@ libclamav_la_SOURCES = \ |
201 | 201 |
jsparse/textbuf.h \ |
202 | 202 |
uniq.c \ |
203 | 203 |
uniq.h \ |
204 |
- version.c |
|
204 |
+ version.c\ |
|
205 |
+ version.h |
|
205 | 206 |
|
206 | 207 |
.PHONY: version.h.tmp |
208 |
+version.o: version.h |
|
207 | 209 |
version.h: version.h.tmp |
208 | 210 |
@if ! diff $@ $< >/dev/null 2>/dev/null; then\ |
209 |
- echo 'test';\ |
|
210 | 211 |
cp $< $@;\ |
211 | 212 |
fi |
212 | 213 |
|
213 | 214 |
version.h.tmp: |
214 |
- @rm -f $@;\ |
|
215 |
+ @test -f version.h || touch version.h;\ |
|
216 |
+ rm -f $@;\ |
|
215 | 217 |
REVISION="$$(LANG=C svnversion "$(top_srcdir)" 2>/dev/null || echo exported)";\ |
216 | 218 |
if test $$REVISION = "exported"; then\ |
217 | 219 |
REVISION="$$(LANG=C cd "$(top_srcdir)"; git-svn info configure | awk '/Revision:/ { print $$2 }' || echo exported)";\ |
... | ... |
@@ -443,7 +443,8 @@ libclamav_la_SOURCES = \ |
443 | 443 |
jsparse/textbuf.h \ |
444 | 444 |
uniq.c \ |
445 | 445 |
uniq.h \ |
446 |
- version.c |
|
446 |
+ version.c\ |
|
447 |
+ version.h |
|
447 | 448 |
|
448 | 449 |
libclamav_internal_utils_la_SOURCES = str.c \ |
449 | 450 |
str.h \ |
... | ... |
@@ -1033,14 +1034,15 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES |
1033 | 1033 |
|
1034 | 1034 |
|
1035 | 1035 |
.PHONY: version.h.tmp |
1036 |
+version.o: version.h |
|
1036 | 1037 |
version.h: version.h.tmp |
1037 | 1038 |
@if ! diff $@ $< >/dev/null 2>/dev/null; then\ |
1038 |
- echo 'test';\ |
|
1039 | 1039 |
cp $< $@;\ |
1040 | 1040 |
fi |
1041 | 1041 |
|
1042 | 1042 |
version.h.tmp: |
1043 |
- @rm -f $@;\ |
|
1043 |
+ @test -f version.h || touch version.h;\ |
|
1044 |
+ rm -f $@;\ |
|
1044 | 1045 |
REVISION="$$(LANG=C svnversion "$(top_srcdir)" 2>/dev/null || echo exported)";\ |
1045 | 1046 |
if test $$REVISION = "exported"; then\ |
1046 | 1047 |
REVISION="$$(LANG=C cd "$(top_srcdir)"; git-svn info configure | awk '/Revision:/ { print $$2 }' || echo exported)";\ |
1047 | 1048 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,13 @@ |
0 |
+#ifdef HAVE_CONFIG_H |
|
1 |
+#include "clamav-config.h" |
|
2 |
+#endif |
|
3 |
+#include "version.h" |
|
4 |
+ |
|
5 |
+const char *cl_retver(void) |
|
6 |
+{ |
|
7 |
+ if(!strncmp("devel-",VERSION,6) && strcmp("exported",REPO_VERSION)) { |
|
8 |
+ return REPO_VERSION; |
|
9 |
+ } |
|
10 |
+ /* it is a release, or we have nothing better */ |
|
11 |
+ return VERSION; |
|
12 |
+} |