[X2Go-Commits] [x2goserver] 02/03: x2goserver/Makefile: export common variables for direct use in shell script sections.
git-admin at x2go.org
git-admin at x2go.org
Mon Jun 24 08:56:53 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goserver.
commit 1bb091ca7bba5ec54053202f12f0ce6e9f61013d
Author: Mihai Moldovan <ionic at ionic.de>
Date: Mon Jun 24 08:50:09 2019 +0200
x2goserver/Makefile: export common variables for direct use in shell script sections.
---
debian/changelog | 2 ++
x2goserver/Makefile | 30 ++++++++++++------------------
2 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 3b30735..4ab2668 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -122,6 +122,8 @@ x2goserver (4.1.0.4-0x2go1.1) UNRELEASED; urgency=medium
Hence, just use the colon pseudo-command.
- x2goserver/Makefile: fix syntax error due to non-duplicated dollar signs
in comment lines.
+ - x2goserver/Makefile: export common variables for direct use in shell
+ script sections.
* debian/control:
+ Build-depend upon lsb-release for distro version detection.
* debian/x2goserver.manpages:
diff --git a/x2goserver/Makefile b/x2goserver/Makefile
index 4f3ad9f..064a7e7 100755
--- a/x2goserver/Makefile
+++ b/x2goserver/Makefile
@@ -20,6 +20,8 @@ NXLIBDIR ?= $(LIBDIR)/../nx
MANDIR ?= $(PREFIX)/share/man
SHAREDIR ?= $(PREFIX)/share/x2go
+export DESTDIR PREFIX ETCDIR BINDIR SBINDIR LIBDIR NXLIBDIR MANDIR SHAREDIR
+
BIN_SCRIPTS=$(shell cd bin && echo *)
SBIN_SCRIPTS=$(shell cd sbin && echo *)
LIB_FILES=$(shell cd lib && echo *)
@@ -47,14 +49,6 @@ build-indep: build_pod2man build_man2html
cp -a "$${gen_file}" "$${file}"; \
\
$$(: "Run actual substitutions."); \
- PREFIX='$(PREFIX)'; \
- ETCDIR='$(ETCDIR)'; \
- BINDIR='$(BINDIR)'; \
- SBINDIR='$(SBINDIR)'; \
- LIBDIR='$(LIBDIR)'; \
- NXLIBDIR='$(NXLIBDIR)'; \
- MANDIR='$(MANDIR)'; \
- SHAREDIR='$(SHAREDIR)'; \
for subst in 'PREFIX' 'ETCDIR' 'BINDIR' 'SBINDIR' 'LIBDIR' 'NXLIBDIR' 'MANDIR' 'SHAREDIR'; do \
sed -e "s#@@$${subst}@@#$${!subst}#g" "$${gen_file}" > "$${file}"; \
done; \
@@ -114,12 +108,12 @@ install: build install_scripts install_config install_man install_version
install_scripts:
for dir in 'bin' 'sbin' 'lib' 'share/x2gofeature.d'; do \
$$(: "Create (and save) destination directory."); \
- dest='$(DESTDIR)'; \
+ dest='$${DESTDIR}'; \
case "$${dir}" in \
- ('bin') dest="$${dest}$(BINDIR)/";; \
- ('sbin') dest="$${dest}$(SBINDIR)/";; \
- ('lib') dest="$${dest}$(LIBDIR)/";; \
- ('share/x2gofeature.d') dest="$${dest}$(SHAREDIR)/x2gofeature.d/";; \
+ ('bin') dest="$${dest}$${BINDIR}/";; \
+ ('sbin') dest="$${dest}$${SBINDIR}/";; \
+ ('lib') dest="$${dest}$${LIBDIR}/";; \
+ ('share/x2gofeature.d') dest="$${dest}$${SHAREDIR}/x2gofeature.d/";; \
(*) printf '%s\n' 'Unknown component in install_scripts scriptlet.' >&2; exit '1';; \
esac; \
$(INSTALL_DIR) "$${dest}"; \
@@ -168,12 +162,12 @@ uninstall: uninstall_scripts uninstall_config uninstall_man uninstall_version
uninstall_scripts:
for dir in 'bin' 'sbin' 'lib' 'share/x2gofeature.d'; do \
$$(: "Create (and save) destination directory."); \
- dest='$(DESTDIR)'; \
+ dest='$${DESTDIR}'; \
case "$${dir}" in \
- ('bin') dest="$${dest}$(BINDIR)/";; \
- ('sbin') dest="$${dest}$(SBINDIR)/";; \
- ('lib') dest="$${dest}$(LIBDIR)/";; \
- ('share/x2gofeature.d') dest="$${dest}$(SHAREDIR)/x2gofeature.d/";; \
+ ('bin') dest="$${dest}$${BINDIR}/";; \
+ ('sbin') dest="$${dest}$${SBINDIR}/";; \
+ ('lib') dest="$${dest}$${LIBDIR}/";; \
+ ('share/x2gofeature.d') dest="$${dest}$${SHAREDIR}/x2gofeature.d/";; \
(*) printf '%s\n' 'Unknown component in uninstall_scripts scriptlet.'; exit '1';; \
esac; \
$(INSTALL_DIR) "$${dest}"; \
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
More information about the x2go-commits
mailing list