From 9e4713dc0a3385b798168a3d2d46fefe5b051846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Fri, 30 May 2014 22:47:38 +0200 Subject: [PATCH] simplify startup scripts and configurable install directory --- Makefile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 005fafe7ec..461f968fbf 100644 --- a/Makefile +++ b/Makefile @@ -49,8 +49,10 @@ datarootdir ?= $(prefix)/share datadir ?= $(datarootdir) bindir ?= $(prefix)/bin libdir ?= $(prefix)/lib +gameinstalldir ?= $(libdir)/openra + BIN_INSTALL_DIR = $(DESTDIR)$(bindir) -DATA_INSTALL_DIR = $(DESTDIR)$(libdir)/openra +DATA_INSTALL_DIR = $(DESTDIR)$(gameinstalldir) # install tools RM = rm @@ -354,20 +356,14 @@ install-desktop: install-startup-scripts: @echo "#!/bin/sh" > openra - @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra - @echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra - @echo 'EXECDIR="$${ROOTDIR}'"$(libdir)"'"' >> openra - @echo 'cd "$${EXECDIR}/openra"' >> openra + @echo 'cd "$(gameinstalldir)"' >> openra @echo 'exec mono OpenRA.Game.exe "$$@"' >> openra @$(INSTALL_DIR) "$(BIN_INSTALL_DIR)" @$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)" @-$(RM) openra @echo "#!/bin/sh" > openra-editor - @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra-editor - @echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra-editor - @echo 'EXECDIR="$${ROOTDIR}'"$(libdir)"'"' >> openra-editor - @echo 'cd "$${EXECDIR}/openra"' >> openra-editor + @echo 'cd "$(gameinstalldir)"' >> openra-editor @echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor @$(INSTALL_DIR) "$(BIN_INSTALL_DIR)" @$(INSTALL_PROGRAM) -m +rx openra-editor "$(BIN_INSTALL_DIR)"