From ca43087812afa2817ddc086591b60d593aacc954 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 21 Nov 2017 13:28:17 +0100 Subject: Drop bin wrappers for nxagent and nxproxy, directly install nxproxy and nxagent to BINDIR. Fixes ArcticaProject/nx-libs#546. --- Makefile | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 27a6f966c..204a7310a 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ SHLIBDIR ?= $(LIBDIR) NXLIBDIR ?= $(SHLIBDIR)/nx USRLIBDIR ?= $(NXLIBDIR)/X11 INCLUDEDIR ?= $(PREFIX)/include -CONFIGURE ?= ./configure --prefix=$(DESTDIR)$(PREFIX) --libexecdir=$(NXLIBDIR)/bin +CONFIGURE ?= ./configure --prefix=$(DESTDIR)$(PREFIX) # use Xfont2 if available in the build env FONT_DEFINES ?= $(shell pkg-config --modversion xfont2 1>/dev/null 2>/dev/null && echo "-DHAS_XFONT2") @@ -75,8 +75,6 @@ NX_XTRANS_HEADERS = \ rm -Rf nx-X11/extras/Mesa/.pc/; \ rm -f nx-X11/config/cf/nxversion.def; \ rm -f nx-X11/config/cf/date.def; \ - rm -f bin/nxagent; \ - rm -f bin/nxproxy; \ ${MAKE} clean-env; \ fi @@ -168,30 +166,24 @@ install-lite: # install nxcomp library $(MAKE) -C nxcomp install - # install nxproxy wrapper script - $(INSTALL_DIR) $(DESTDIR)$(BINDIR) - sed -e 's|@@NXLIBDIR@@|$(NXLIBDIR)|g' bin/nxproxy.in > bin/nxproxy - $(INSTALL_PROGRAM) bin/nxproxy $(DESTDIR)$(BINDIR) - # install the nxproxy executable and its man page $(MAKE) -C nxproxy install install-full: - # install nxagent wrapper script - $(INSTALL_DIR) $(DESTDIR)$(BINDIR) - sed -e 's|@@NXLIBDIR@@|$(NXLIBDIR)|g' bin/nxagent.in > bin/nxagent - $(INSTALL_PROGRAM) bin/nxagent $(DESTDIR)$(BINDIR) - $(MAKE) -C nxcompshad install + $(INSTALL_DIR) $(DESTDIR)$(BINDIR)/bin + $(INSTALL_PROGRAM) nx-X11/programs/Xserver/nxagent $(DESTDIR)$(BINDIR) + $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/pixmaps $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/nxagent.xpm $(DESTDIR)$(PREFIX)/share/pixmaps $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/nx $(INSTALL_FILE) nx-X11/programs/Xserver/Xext/SecurityPolicy $(DESTDIR)$(PREFIX)/share/nx + # FIXME: Drop this symlink for 3.6.0. Requires that third party frameworks like X2Go have become aware of this... $(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/bin - $(INSTALL_PROGRAM) nx-X11/programs/Xserver/nxagent $(DESTDIR)$(NXLIBDIR)/bin + $(INSTALL_SYMLINK) $(BINDIR)/nxagent $(DESTDIR)$(NXLIBDIR)/bin/nxagent $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1/ $(INSTALL_FILE) nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 $(DESTDIR)$(PREFIX)/share/man/man1/ @@ -243,28 +235,19 @@ uninstall: uninstall-lite: if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp $@; fi + if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy $@; fi - # uninstall nproxy wrapper script - $(RM_FILE) $(DESTDIR)$(BINDIR)/nxproxy - # FIXME: don't use uninstall rule in nxproxy/Makefile.in, let's do - # it on our own for now... - $(RM_FILE) $(DESTDIR)$(NXLIBDIR)/bin/nxproxy - $(RM_DIR) $(DESTDIR)$(NXLIBDIR)/bin/ - $(RM_FILE) $(DESTDIR)$(PREFIX)/share/man/man1/*.1 $(RM_FILE) $(DESTDIR)$(PREFIX)/share/nx/VERSION.nxproxy $(RM_DIR) $(DESTDIR)$(PREFIX)/share/nx/ uninstall-full: - for f in nxagent; do \ - $(RM_FILE) $(DESTDIR)$(BINDIR)/$$f; done + if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi + if test -f nx-X11/lib/Makefile; then ${MAKE} -C nx-X11/lib $@; fi + + $(RM_FILE) $(DESTDIR)$(BINDIR)/nxagent $(RM_FILE) $(DESTDIR)$(PREFIX)/share/nx/VERSION.nxagent $(RM_DIR) $(DESTDIR)$(PREFIX)/share/nx/ - if test -d nx-X11; then \ - if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi; \ - if test -f nx-X11/Makefile; then \ - if test -d $(NXLIBDIR); then rm -rf $(NXLIBDIR); fi; \ - if test -d $(INCLUDEDIR)/nx; then rm -rf $(INCLUDEDIR)/nx; fi; \ - fi; \ - fi + if test -d $(DESTDIR)$(NXLIBDIR); then rm -rf $(DESTDIR)$(NXLIBDIR); fi + if test -d $(DESTDIR)$(INCLUDEDIR)/nx; then rm -rf $(DESTDIR)$(INCLUDEDIR)/nx; fi -- cgit v1.2.3 From 1539c20e56696d861126108266a4711942caec31 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 21 Nov 2017 13:45:55 +0100 Subject: Makefile: Don't use DESTDIR in configure. Fixes ArcticaProject/nx-libs#547. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 204a7310a..6e9479284 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ SHLIBDIR ?= $(LIBDIR) NXLIBDIR ?= $(SHLIBDIR)/nx USRLIBDIR ?= $(NXLIBDIR)/X11 INCLUDEDIR ?= $(PREFIX)/include -CONFIGURE ?= ./configure --prefix=$(DESTDIR)$(PREFIX) +CONFIGURE ?= ./configure --prefix=$(PREFIX) # use Xfont2 if available in the build env FONT_DEFINES ?= $(shell pkg-config --modversion xfont2 1>/dev/null 2>/dev/null && echo "-DHAS_XFONT2") -- cgit v1.2.3 From c54558e3cbf796de60e443dd86159468a9a3c99d Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 26 Nov 2017 23:16:59 +0100 Subject: Makefile: Quote '$@' in make calls with double quotes. --- Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6e9479284..cfd0d10b8 100644 --- a/Makefile +++ b/Makefile @@ -61,12 +61,12 @@ NX_XTRANS_HEADERS = \ $(NULL) %: - if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp $@; fi - if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy $@; fi + if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp "$@"; fi + if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy "$@"; fi if test -d nx-X11; then \ - if test -f nx-X11/lib/Makefile; then ${MAKE} -C nx-X11/lib $@; fi; \ - if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi; \ - if test -f nx-X11/Makefile; then ${MAKE} -C nx-X11 $@; fi; \ + if test -f nx-X11/lib/Makefile; then ${MAKE} -C nx-X11/lib "$@"; fi; \ + if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad "$@"; fi; \ + if test -f nx-X11/Makefile; then ${MAKE} -C nx-X11 "$@"; fi; \ fi # clean auto-generated files @@ -234,15 +234,15 @@ uninstall: [ ! -d nx-X11 ] || $(MAKE) uninstall-full uninstall-lite: - if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp $@; fi - if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy $@; fi + if test -f nxcomp/Makefile; then ${MAKE} -C nxcomp "$@"; fi + if test -f nxproxy/Makefile; then ${MAKE} -C nxproxy "$@"; fi $(RM_FILE) $(DESTDIR)$(PREFIX)/share/nx/VERSION.nxproxy $(RM_DIR) $(DESTDIR)$(PREFIX)/share/nx/ uninstall-full: - if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi - if test -f nx-X11/lib/Makefile; then ${MAKE} -C nx-X11/lib $@; fi + if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad "$@"; fi + if test -f nx-X11/lib/Makefile; then ${MAKE} -C nx-X11/lib "$@"; fi $(RM_FILE) $(DESTDIR)$(BINDIR)/nxagent -- cgit v1.2.3