forked from tanlabcode/scATAC-pro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (54 loc) · 1.58 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
## scATAC-pro
## DO NOT EDIT THE REST OF THIS FILE!!
MK_PATH = $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
VNUM = $(shell $(MK_PATH)/scATAC-pro --version | cut -d " " -f 3)
softPATH = $(shell dirname $(shell which scATAC-pro))
INST_SCRIPTS=$(MK_PATH)/scripts
INST_SOURCES=$(INST_SCRIPTS)/src
CONFIGURE_OUT=$(wildcard ./configure_system.txt)
#CONFIG_INSTALL=$(wildcard ./configure_install.txt)
prefix ?= /usr/local/bin
install : config_check cp
######################################
## Config file
##
######################################
config_check:
ifneq ("$(CONFIGURE_OUT)","")
include $(CONFIGURE_OUT)
#include $(CONFIG_INSTALL)
else
$(error configure_system.txt file not found. Please run 'make configure' first)
endif
######################################
## Configure
##
######################################
configure:
ifndef prefix
$(error prefix not defined !)
else
make -f ./scripts/install/Makefile PREFIX=$(realpath $(prefix))
endif
######################################
## Compile
##
######################################
test: config_check
@echo ${PYTHON_PATH}
######################################
## Create installed version
##
######################################
cp:
@echo "Installing ..."
$(eval INSTALL_PATH := $(abspath $(INSTALL_PREFIX))/scATAC-pro_$(VNUM))
@if [ -d $(INSTALL_PATH) ]; then \
rm -rf $(INSTALL_PATH); \
fi
ifneq ($(abspath $(MK_PATH)), $(abspath $(INSTALL_PATH)))
@cp -Ri $(MK_PATH) $(INSTALL_PATH)
endif
@echo export PATH=$(INSTALL_PATH):"$$"PATH >> ~/.bashrc
@echo "scATAC-pro installed in $(abspath $(INSTALL_PATH)) !"
@bash