diff --git a/Makefile b/Makefile index 16db163222672c427f3408ed008fa32611d87109..0901fa48d43408e062c2ece09429a1a4b6fdfc7a 100644 --- a/Makefile +++ b/Makefile @@ -980,7 +980,7 @@ maintainer-clean:: distclean build/misc/root-help.el build-arch-stamp build-indep-stamp \ configure-stamp build-arch-cint-stamp config.status config.log -version: $(CLINGEXE) +version: $(ROOTEXE) @$(MAKEVERSION) staticlib: $(ROOTALIB) diff --git a/build/unix/makeversion.sh b/build/unix/makeversion.sh index a563342f232c1f92a4bc7e562a93d211ef2d1a9d..b53e37b5585974691879f1ed50d0387b0773e0ec 100755 --- a/build/unix/makeversion.sh +++ b/build/unix/makeversion.sh @@ -5,10 +5,10 @@ # # Author: Fons Rademakers, 28/4/2000 -CINT=cint/cint/main/cint_tmp +ROOTEXE=bin/root.exe SCRIPT=build/version.cxx -$CINT $SCRIPT +$ROOTEXE -q -b -l $SCRIPT if test "x`uname | grep -i cygwin`" != "x"; then echo 'Need to run "dos2unix base/inc/RVersion.h"' diff --git a/build/version.cxx b/build/version.cxx index fa73765e3855d5dee0906521acc0752789d6df88..b95c9ddd598049269222aa23cd651447f22ac7c3 100644 --- a/build/version.cxx +++ b/build/version.cxx @@ -1,4 +1,4 @@ -int main(int argc, char *argv[]) +int version() { // Reads from the file build/version_number the new version // number and generates the header base/inc/RVersion.h. @@ -11,8 +11,8 @@ int main(int argc, char *argv[]) FILE *fp = fopen(in, "r"); if (!fp) { - printf("%s: can not open input file %s\n", argv[0], in); - exit(1); + printf("version.cxx: can not open input file %s\n", in); + return 1; } char vers[32]; fgets(vers, sizeof(vers), fp); @@ -21,8 +21,8 @@ int main(int argc, char *argv[]) fp = fopen(inr, "r"); if (!fp) { - printf("%s: can not open input file %s\n", argv[0], in); - exit(1); + printf("version.cxx: can not open input file %s\n", inr); + return 1; } char branch[2048]; fgets(branch, sizeof(branch), fp); @@ -35,8 +35,8 @@ int main(int argc, char *argv[]) const char *out = "core/base/inc/RVersion.h"; fp = fopen(out, "w"); if (!fp) { - printf("%s: can not open output file %s\n", argv[0], out); - exit(1); + printf("version.cxx: can not open output file %s\n", out); + return 1; } fprintf(fp, "#ifndef ROOT_RVersion\n"); @@ -69,5 +69,5 @@ int main(int argc, char *argv[]) fclose(fp); - exit(0); + return 0; }