[fedfs-utils] [fedfs-utils PATCH v2] Remove use of __DATE__ and __TIME__ when building.
NeilBrown
neilb at suse.de
Wed Feb 26 19:54:31 PST 2014
Use of __DATE__ and __TIME__ makes it impossible to recompile after
possibly changing context, and see the context made any real change in
the resulting build.
The Open Build Service can do this (to optimise rebuilds) and so
discourages the use of __DATE__ and __TIME__
This patch removes the __DATE__ and __TIME__ leaving just the VERSION.
Signed-off-by: NeilBrown <neilb at suse.de>
--
p.s. I'm not subscribed so didn't get your reply ... but I
checked the archive just in case and found it there.
For some of my projects I include e.g.
VERSION = $(shell [ -d .git ] && git describe HEAD | sed 's/mdadm-//')
CFLAGS += $(if $(VERSION),-DVERSION=\"$(VERSION)\",)
in the Makefile which makes the version message slightly more useful.
I don't know how to integrate that with autoconf.
Thanks,
NeilBrown
diff --git a/src/fedfsd/main.c b/src/fedfsd/main.c
index f6ca61f7d6e8..4980dc3b09e1 100644
--- a/src/fedfsd/main.c
+++ b/src/fedfsd/main.c
@@ -164,9 +164,7 @@ int main(int argc, char **argv)
gid = grp->gr_gid;
break;
case '?':
- fprintf(stderr, "Version " VERSION
- ", built on %s at %s\n\n",
- __DATE__, __TIME__);
+ fprintf(stderr, "Version " VERSION "\n\n");
fedfsd_usage(progname);
break;
case 'o':
@@ -230,8 +228,7 @@ int main(int argc, char **argv)
}
}
- xlog(L_NOTICE, "Version " VERSION " (built %s at %s) starting",
- __DATE__, __TIME__);
+ xlog(L_NOTICE, "Version " VERSION " starting");
if (!fedfsd_set_up_authenticators())
exit(EXIT_FAILURE);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/fedfs-utils-devel/attachments/20140227/44e7f2cc/attachment.bin
More information about the fedfs-utils-devel
mailing list