From 203d97147623b97a48c0f6456cc1de9d8364db03 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 16 Feb 2015 15:11:02 +0100 Subject: Make nxagent process aware of its current NX'ish version. This feature copies the way how X.Org version string and number are propagated at build time. First use case: if people start nxagent, it reports its version number on stderr. This is about being human-friendly. Second use case: None, so far. But it will now be easy to use the NXAGENT_VERSION_STRING in later feature add-ons. --- Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f0c8a978b..2f8dda83a 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,11 @@ NXLIBDIR ?= $(PREFIX)/lib/nx X2GOLIBDIR ?= $(PREFIX)/lib/x2go CONFIGURE ?= ./configure +NX_VERSION_MAJOR=$(shell ./version.sh 1) +NX_VERSION_MINOR=$(shell ./version.sh 2) +NX_VERSION_MICRO=$(shell ./version.sh 3) +NX_VERSION_PATCH=$(shell ./version.sh 4) + SHELL:=/bin/bash %: @@ -44,7 +49,21 @@ build-full: cd nxcomp && autoconf cd nxcompext && autoconf cd nxcompshad && autoconf + + # prepare nx-X11/config/cf/nxversion.def + sed \ + -e 's/###NX_VERSION_MAJOR###/$(NX_VERSION_MAJOR)/' \ + -e 's/###NX_VERSION_MINOR###/$(NX_VERSION_MINOR)/' \ + -e 's/###NX_VERSION_MICRO###/$(NX_VERSION_MICRO)/' \ + -e 's/###NX_VERSION_PATCH###/$(NX_VERSION_PATCH)/' \ + nx-X11/config/cf/nxversion.def.in \ + > nx-X11/config/cf/nxversion.def + cd nx-X11 && ${MAKE} World + + # clean directly after build + rm -f nx-X11/config/cf/nxversion.def + cd nxproxy && autoconf && (${CONFIGURE}) && ${MAKE} build: -- cgit v1.2.3