MC_TM_GMTOFF
-AM_CONDITIONAL([RELEASE_BUILD], [test "$PACKAGE_VERSION" != "git"])
-
# Define full_libdir to be the fully expanded (${exec_prefix}, etc.)
# "system" library path.
# We use this to search for other libraries.
unix_utility.o logger.o qtype.o
# what we need
-all: message version_generated.h build
+all: message build
# OS specific instructions
-include sysdeps/$(shell uname).inc
dnslabeltext.cc: dnslabeltext.rl
ragel $< -o $@
-# Version
-build_date := $(shell LC_TIME=C date '+%Y%m%d%H%M%S')
-build_host := $(shell id -u -n)@$(shell hostname -f 2>/dev/null || hostname 2>/dev/null || echo localhost)
-
-.PHONY: version_generated.h
-version_generated.h:
- @echo "$$create_version_generated_h" > $@
-
-define create_version_generated_h
-#ifndef VERSION_GENERATED_H
-#define VERSION_GENERATED_H
-#include "config.h"
-#define PDNS_VERSION VERSION
-#define BUILD_DATE "$(build_date)"
-#define BUILD_HOST "$(build_host)"
-#endif //!VERSION_GENERATED_H
-endef
-
-export create_version_generated_h
-
message:
@echo
@echo PLEASE READ: If you get an error mentioning \#include '<boost/something.hpp>', please read README
-rm -f dep *~ *.gcda *.gcno optional/*.gcda optional/*.gcno
binclean:
- -rm -f *.o pdns_hw pdns_recursor rec_control optional/*.o build-stamp ext/library/*.o ext/yahttp/yahttp/*.o version_generated.h
+ -rm -f *.o pdns_hw pdns_recursor rec_control optional/*.o build-stamp ext/library/*.o ext/yahttp/yahttp/*.o
dep:
$(CXX) $(CXXFLAGS) -MM -MG *.cc *.hh > $@
BUILT_SOURCES = \
bind-dnssec.schema.sqlite3.sql.h \
- version_generated.h \
bindparser.h htmlfiles.h
CLEANFILES = \
- version_generated.h \
*.gcda \
*.gcno \
*.gcov \
.hh.h:
cp $< $@
-build_date := $(shell LC_TIME=C date '+%Y%m%d%H%M%S')
-build_host := $(shell id -u -n)@$(shell hostname -f 2>/dev/null || hostname 2>/dev/null || echo localhost)
-git_version := $(shell git describe --always --dirty=+ 2>/dev/null)
-# Do the test in shell, so we don't confuse automake with ifeq/ifneq.
-pdns_version := $(shell test -z "$(git_version)" && echo UNKNOWN || echo "git-$(git_version)")
-
-version.o: version_generated.h
-
pubsuffix.cc: $(srcdir)/effective_tld_names.dat
./mkpubsuffixcc
-
-.PHONY: version_generated.h
-version_generated.h:
- @echo "$$create_version_generated_h" > $@
-
-if RELEASE_BUILD
-define create_version_generated_h
-#ifndef VERSION_GENERATED_H
-#define VERSION_GENERATED_H
-#define PDNS_VERSION "$(PACKAGE_VERSION)"
-#define DIST_HOST "$(DIST_HOST)"
-#define BUILD_DATE "$(build_date)"
-#define BUILD_HOST "$(build_host)"
-#endif //!VERSION_GENERATED_H
-endef
-
-else
-define create_version_generated_h
-#ifndef VERSION_GENERATED_H
-#define VERSION_GENERATED_H
-#define PDNS_VERSION "$(pdns_version)"
-#define DIST_HOST "$(build_host)"
-#define BUILD_DATE "$(build_date)"
-#define BUILD_HOST "$(build_host)"
-#endif //!VERSION_GENERATED_H
-endef
-endif
-
-export create_version_generated_h
LD_PIE=""
CF_FORTIFY=""
CF_STACK=""
+BUILD_HOST="$(id -u -n)@$(hostname -f 2>/dev/null || hostname 2>/dev/null || echo localhost)"
+
+cat >> config.h << EOF
+#define BUILD_HOST "${BUILD_HOST}"
+EOF
test_flags() {
# test for relocation
#endif
#include "logger.hh"
#include "version.hh"
-#include "version_generated.h"
#include <polarssl/version.h>
static ProductType productType;
string getPDNSVersion()
{
- return PDNS_VERSION;
+ return VERSION;
}
// REST API product type
void showProductVersion()
{
- theL()<<Logger::Warning<<productName()<<" "<< PDNS_VERSION <<" (" DIST_HOST ") "
- "(C) 2001-2015 PowerDNS.COM BV" << endl;
+ theL()<<Logger::Warning<<productName()<<" "<< VERSION << " (C) 2001-2015 "
+ "PowerDNS.COM BV" << endl;
theL()<<Logger::Warning<<"Using "<<(sizeof(unsigned long)*8)<<"-bits mode. "
- "Built on " BUILD_DATE " by " BUILD_HOST ", "<<compilerVersion()<<"."<<endl;
+ "Built using " << compilerVersion() << endl;
theL()<<Logger::Warning<<"PowerDNS comes with ABSOLUTELY NO WARRANTY. "
"This is free software, and you are welcome to redistribute it "
"according to the terms of the GPL version 2." << endl;
string fullVersionString()
{
ostringstream s;
- s<<productName()<<" " PDNS_VERSION " (" DIST_HOST " built " BUILD_DATE " " BUILD_HOST ")";
+ s<<productName()<<" " VERSION;
return s.str();
}