summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTitanSnow <[email protected]>2017-05-25 07:58:21 +0800
committerTitanSnow <[email protected]>2017-05-25 07:58:21 +0800
commit4fafe79dd79efe67c3ed92362152a8aa883788c7 (patch)
treecef02aba7740b9a1dab6e0a39a54ed6f6c180acd
parent7ee82c2b09ee0af9289c2aad852707bd7d2e637b (diff)
use link on supported os in installation
-rw-r--r--makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/makefile b/makefile
index 723fe67f7..312decc7c 100644
--- a/makefile
+++ b/makefile
@@ -61,9 +61,13 @@ install:
@# install the xmake directory
@cp -r xmake/* $(xmake_dir_install)
@# make the xmake loader
+ifeq (,$(filter $(PLAT),linux macosx))
@echo '#!/bin/bash' > $(xmake_loader)
@echo 'export XMAKE_PROGRAM_DIR=$(xmake_dir_install)' >> $(xmake_loader)
@echo '$(xmake_core_install) $(verbose) "$$@"' >> $(xmake_loader)
+else
+ @ln -s '$(xmake_core_install)' '$(xmake_loader)'
+endif
@# install the xmake loader
@if [ ! -d $(prefix)/bin ]; then mkdir -p $(prefix)/bin; fi
@mv $(xmake_loader) $(xmake_loader_install)