-rm -f *.o *.s chronyc chronyd core *~
-rm -rf .deps
-version.h : version.txt
- ./mkversion
-
getdate.c : ;
getdate :
bison -o getdate.c getdate.y
%.s : %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -S $<
-main.o logging.o client.o : version.h
-
# makeinfo v4 required to generate plain text and html
MAKEINFO:=makeinfo
#include "candm.h"
#include "nameserv.h"
#include "md5.h"
-#include "version.h"
#include "getdate.h"
#include "cmdparse.h"
#include "pktlength.h"
"chrony comes with ABSOLUTELY NO WARRANTY. This is free software, and\n"
"you are welcome to redistribute it under certain conditions. See the\n"
"GNU General Public License version 2 for details.\n\n",
- PROGRAM_VERSION_STRING);
+ CHRONY_VERSION);
}
/* ================================================== */
DNS_SetAddressFamily(IPADDR_INET6);
hostname = "::1";
} else if (!strcmp("-v", *argv) || !strcmp("--version",*argv)) {
- printf("chronyc (chrony) version %s\n", PROGRAM_VERSION_STRING);
+ printf("chronyc (chrony) version %s\n", CHRONY_VERSION);
exit(0);
} else if (!strncmp(*argv, "-", 1)) {
fprintf(stderr, "Usage : %s [-h <hostname>] [-p <port-number>] [-n] [-4|-6] [-m] [command]\n", progname);
add_def DEFAULT_CONF_DIR "\"$SYSCONFDIR\""
+if [ -f version.txt ]; then
+ add_def CHRONY_VERSION "\"`cat version.txt`\""
+else
+ add_def CHRONY_VERSION "\"DEVELOPMENT\""
+fi
+
sed -e "s%@EXTRA_OBJECTS@%${EXTRA_OBJECTS}%;\
s%@CC@%${MYCC}%;\
s%@CFLAGS@%${MYCFLAGS}%;\
#include "keys.h"
#include "acquire.h"
#include "manual.h"
-#include "version.h"
#include "rtc.h"
#include "refclock.h"
#include "clientlog.h"
do_init_rtc = 1;
} else if (!strcmp("-v", *argv) || !strcmp("--version",*argv)) {
/* This write to the terminal is OK, it comes before we turn into a daemon */
- printf("chronyd (chrony) version %s\n", PROGRAM_VERSION_STRING);
+ printf("chronyd (chrony) version %s\n", CHRONY_VERSION);
exit(0);
} else if (!strcmp("-n", *argv)) {
nofork = 1;
LOG_OpenSystemLog();
}
- LOG(LOGS_INFO, LOGF_Main, "chronyd version %s starting", PROGRAM_VERSION_STRING);
+ LOG(LOGS_INFO, LOGF_Main, "chronyd version %s starting", CHRONY_VERSION);
/* Check whether another chronyd may already be running. Do this after
* forking, so that message logging goes to the right place (i.e. syslog), in
+++ /dev/null
-#!/bin/sh
-
-rm -f version.h
-echo "#ifndef VERSION_H" > version.h
-echo "#define VERSION_H 1" >> version.h
-
-if [ -f version.txt ]; then
- ver=`cat version.txt`
- echo "#define PROGRAM_VERSION_STRING \"$ver\"" >> version.h
-else
- echo "#define PROGRAM_VERSION_STRING \"DEVELOPMENT\"" >> version.h
-fi
-
-echo "#endif /* VERSION_H */" >> version.h
-
+++ /dev/null
-DEVELOPMENT