aboutsummaryrefslogtreecommitdiffstats
path: root/lib/megaco/Makefile
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-05-30 18:45:34 +0200
committerLukas Larsson <[email protected]>2012-06-05 10:52:16 +0200
commit5f8867fb985b2b899e2ba8391652c7111f9df9bb (patch)
tree768a901c7372789ac8f39f0d100e4c03c81b4dc8 /lib/megaco/Makefile
parent3e348c69b6921dd0e2c5b699ccd36d46321c953c (diff)
downloadotp-5f8867fb985b2b899e2ba8391652c7111f9df9bb.tar.gz
otp-5f8867fb985b2b899e2ba8391652c7111f9df9bb.tar.bz2
otp-5f8867fb985b2b899e2ba8391652c7111f9df9bb.zip
Update to work with whitespace in exec path
OTP-10106 OTP-10107
Diffstat (limited to 'lib/megaco/Makefile')
-rw-r--r--lib/megaco/Makefile25
1 files changed, 14 insertions, 11 deletions
diff --git a/lib/megaco/Makefile b/lib/megaco/Makefile
index 9dc84c122c..fc8f408b0a 100644
--- a/lib/megaco/Makefile
+++ b/lib/megaco/Makefile
@@ -49,11 +49,14 @@ VSN=$(MEGACO_VSN)
DIR_NAME = megaco_src-$(VSN)$(PRE_VSN)
+nullstring :=
+space := $(nullstring) # a space at the end
+
ifndef APP_RELEASE_DIR
ifndef TESTROOT
APP_RELEASE_DIR = /tmp
else
- APP_RELEASE_DIR = $(TESTROOT)
+ APP_RELEASE_DIR = $(subst $(space),\ ,$(TESTROOT))
endif
endif
@@ -151,7 +154,7 @@ version:
# Application install (of a app built from source) targets
# ----------------------------------------------------
app_install:
- $(MAKE) TESTROOT=$(APP_INSTALL_DIR) release
+ $(MAKE) TESTROOT="$(APP_INSTALL_DIR)" release
# ----------------------------------------------------
@@ -185,20 +188,20 @@ TAR.exclude2: Makefile TAR.exclude
(cd ..; find megaco -name '.cmake.state' >> megaco/TAR.exclude2)
$(APP_DIR): tar_exclude
- mkdir -p $(APP_DIR); \
+ mkdir -p "$(subst $(space),\ ,$@)"; \
(cd ..; tar cfX - megaco/TAR.exclude2 megaco) | \
- (cd $(APP_DIR); tar xf -); \
- mv $(APP_DIR)/megaco/* $(APP_DIR)/; \
- mkdir $(APP_DIR)/autoconf; \
- cp autoconf/config.guess $(APP_DIR)/autoconf/; \
- cp autoconf/config.sub $(APP_DIR)/autoconf/; \
- cp autoconf/install-sh $(APP_DIR)/autoconf/; \
- rmdir $(APP_DIR)/megaco
+ (cd "$(subst $(space),\ ,$@)"; tar xf -); \
+ mv "$(subst $(space),\ ,$@)"/megaco/* "$(subst $(space),\ ,$@)"/; \
+ mkdir $(subst $(space),\ ,$@)/autoconf; \
+ cp autoconf/config.guess "$(subst $(space),\ ,$@)"/autoconf/; \
+ cp autoconf/config.sub "$(subst $(space),\ ,$@)"/autoconf/; \
+ cp autoconf/install-sh "$(subst $(space),\ ,$@)"/autoconf/; \
+ rmdir "$(subst $(space),\ ,$@)"/megaco
tar: $(APP_TAR_FILE)
$(APP_TAR_FILE): $(APP_DIR)
- (cd $(APP_RELEASE_DIR); gtar zcf $(APP_TAR_FILE) $(DIR_NAME))
+ (cd "$(APP_RELEASE_DIR)"; gtar zcf "$(subst $(space),\ ,$@)" $(DIR_NAME))
dialyzer_plt: $(DIA_PLT)