From ec1b3a44c0653e21dd252e1727ed42f86f0bb0ec Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 15 Dec 2017 00:48:35 +0100 Subject: Add support for custom version string Make nxproxy and nxagent print an arbitrary version number by running make NX_VERSION_CUSTOM="myvers". nxagent and nxproxy will then show this in addition to the original version number: NXPROXY - Version myvers (3.5.99.22) NXAGENT - Version myvers (3.5.99.22) Fixes ArcticaProject/nx-libs#606 --- Makefile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 42f9f25b4..1f2cb2f74 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,10 @@ ifneq ($(shell pkg-config --exists fontutil && echo yes), yes) $(warning fontutil devel package missing, using imake default values) endif +ifneq "$(strip $(NX_VERSION_CUSTOM))" "" + CUSTOM_VERSION_DEFINE = NX_VERSION_CUSTOM="$(NX_VERSION_CUSTOM)" +endif + IMAKE_DEFINES ?= SHELL:=/bin/bash @@ -96,6 +100,9 @@ version: -e 's/###NX_VERSION_PATCH###/$(shell ./version.sh 4)/' \ nx-X11/config/cf/nxversion.def.in \ > nx-X11/config/cf/nxversion.def +ifneq "$(strip $(NX_VERSION_CUSTOM))" "" + echo '#define NX_VERSION_CUSTOM $(NX_VERSION_CUSTOM)' >>nx-X11/config/cf/nxversion.def +endif imakeconfig: # auto-config some setting @@ -157,17 +164,17 @@ build-full: build-env # in the full case, we rely on "magic" in the nx-X11 imake-based makefiles... # build nxcomp first - cd nxcomp && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE} + cd nxcomp && autoreconf -vfsi && (${CONFIGURE} $(CUSTOM_VERSION_DEFINE)) && ${MAKE} # build libNX_X11 second - cd nx-X11/lib && autoreconf -vfsi && (${CONFIGURE} --disable-poll) && ${MAKE} + cd nx-X11/lib && autoreconf -vfsi && (${CONFIGURE} $(CUSTOM_VERSION_DEFINE) --disable-poll) && ${MAKE} mkdir -p nx-X11/exports/lib/ $(SYMLINK_FILE) ../../lib/src/.libs/libNX_X11.so nx-X11/exports/lib/libNX_X11.so $(SYMLINK_FILE) ../../lib/src/.libs/libNX_X11.so.6 nx-X11/exports/lib/libNX_X11.so.6 $(SYMLINK_FILE) ../../lib/src/.libs/libNX_X11.so.6.3.0 nx-X11/exports/lib/libNX_X11.so.6.3.0 # build nxcompshad third - cd nxcompshad && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE} + cd nxcompshad && autoreconf -vfsi && (${CONFIGURE} $(CUSTOM_VERSION_DEFINE)) && ${MAKE} # build nxagent fourth ./mesa-quilt push -a @@ -175,7 +182,7 @@ build-full: build-env ${MAKE} -C nx-X11 World USRLIBDIR="$(USRLIBDIR)" SHLIBDIR="$(SHLIBDIR)" IMAKE_DEFINES="$(IMAKE_DEFINES)" # build nxproxy fifth - cd nxproxy && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE} + cd nxproxy && autoreconf -vfsi && (${CONFIGURE} $(CUSTOM_VERSION_DEFINE)) && ${MAKE} # "build" nxdialog last cd nxdialog && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE} -- cgit v1.2.3