[SCM] The rsync repository. - branch master updated
Rsync CVS commit messages
rsync-cvs at lists.samba.org
Sat Aug 1 07:17:05 UTC 2020
The branch, master has been updated
via d73c26d2 Put git version in a file for between-release versioning.
via e83bbeb6 Don't make .PHONY the first target in a Makefile.
from b6aa9c5c Make configure less annoying
https://git.samba.org/?p=rsync.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit d73c26d2b70ce6430bd8fc5cecdb50489829ef12
Author: Wayne Davison <wayne at opencoder.net>
Date: Sat Aug 1 00:15:06 2020 -0700
Put git version in a file for between-release versioning.
commit e83bbeb6735575e1fd178eeaf620c1ab85bd8f93
Author: Wayne Davison <wayne at opencoder.net>
Date: Thu Jul 30 18:58:34 2020 -0700
Don't make .PHONY the first target in a Makefile.
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 1 +
Makefile.in | 10 ++++++++--
mkgitver | 10 ++++++++++
options.c | 3 ++-
prepare-source.mak | 2 +-
5 files changed, 22 insertions(+), 4 deletions(-)
create mode 100755 mkgitver
Changeset truncated at 500 lines:
diff --git a/.gitignore b/.gitignore
index 6fb512ee..47d75e91 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,6 +32,7 @@ aclocal.m4
/rsync
/stunnel-rsyncd.conf
/shconfig
+/git-version.h
/testdir
/tests-dont-exist
/testtmp
diff --git a/Makefile.in b/Makefile.in
index 1c53af6a..2c30ee5d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -67,8 +67,8 @@ CHECK_OBJS=tls.o testrun.o getgroups.o getfsdev.o t_stub.o t_unsafe.o trimslash.
$(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< @CC_SHOBJ_FLAG@
@OBJ_RESTORE@
-.PHONY: all
all: Makefile rsync$(EXEEXT) stunnel-rsyncd.conf @MAKE_MAN@
+.PHONY: all
.PHONY: install
install: all
@@ -99,7 +99,7 @@ rsync$(EXEEXT): $(OBJS)
$(OBJS): $(HEADERS)
$(CHECK_OBJS): $(HEADERS)
tls.o xattrs.o: lib/sysxattrs.h
-options.o: latest-year.h help-rsync.h help-rsyncd.h
+options.o: latest-year.h help-rsync.h help-rsyncd.h git-version.h
exclude.o: default-cvsignore.h
loadparm.o: default-dont-compress.h daemon-parm.h
@@ -132,6 +132,12 @@ rounding.h: rounding.c rsync.h proto.h
fi
@rm -f rounding.out
+# While $(wildcard ...) is a GNU make idiom, at least other makes should just turn it into an
+# empty string (we need something that will vanish if we're not building a git checkout).
+# If you want an updated git version w/o GNU make, remove git-version.h after a pull.
+git-version.h: mkgitver $(wildcard $(srcdir)/.git/logs/HEAD)
+ $(srcdir)/mkgitver
+
simd-checksum-x86_64.o: simd-checksum-x86_64.cpp
@$(srcdir)/cmdormsg disable-simd $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-checksum-x86_64.cpp
diff --git a/mkgitver b/mkgitver
new file mode 100755
index 00000000..e8461da2
--- /dev/null
+++ b/mkgitver
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+srcdir=`dirname $0`
+
+if test -d "$srcdir/.git"; then
+ gitver=\"`git describe --tags`\" || exit 1
+else
+ gitver=RSYNC_VERSION
+fi
+echo "#define RSYNC_GITVER $gitver" >git-version.h
diff --git a/options.c b/options.c
index 36e88621..0e9f3db6 100644
--- a/options.c
+++ b/options.c
@@ -23,6 +23,7 @@
#include "itypes.h"
#include "ifuncs.h"
#include "latest-year.h"
+#include "git-version.h"
#include <popt.h>
extern int module_id;
@@ -727,7 +728,7 @@ static void print_rsync_version(enum logcode f)
subprotocol = istring(".PR%d", SUBPROTOCOL_VERSION);
#endif
rprintf(f, "%s version %s protocol version %d%s\n",
- RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
+ RSYNC_NAME, RSYNC_GITVER, PROTOCOL_VERSION, subprotocol);
rprintf(f, "Copyright (C) 1996-" LATEST_YEAR " by Andrew Tridgell, Wayne Davison, and others.\n");
rprintf(f, "Web site: https://rsync.samba.org/\n");
diff --git a/prepare-source.mak b/prepare-source.mak
index 08b916de..12027cb1 100644
--- a/prepare-source.mak
+++ b/prepare-source.mak
@@ -1,7 +1,7 @@
SHELL=/bin/sh
-.PHONY: conf
conf: configure.sh config.h.in
+.PHONY: conf
aclocal.m4: m4/*.m4
aclocal -I m4
--
The rsync repository.
More information about the rsync-cvs
mailing list