-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (39 loc) · 1.44 KB
/
Makefile
File metadata and controls
49 lines (39 loc) · 1.44 KB
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
PROJECT_HOME := $$HOME/proj5HT
PROJECT_DEN := $$HOME/proj5HT/den/
NHP_DATA := /allen/programs/celltypes/workgroups/hct/HCT_Ephys_Data/NHP_expts
HUMAN_DATA := /allen/programs/celltypes/workgroups/hct/HCT_Ephys_Data/Human_expts
Seq_DATA := /allen/programs/celltypes/workgroups/rnaseqanalysis/shiny/10x_seq/GreatApes_Macaque_NCBI
sert_repo := /allen/programs/celltypes/workgroups/hct/HCT_Ephys_Data/manuscript_code/serotonin
ROOKERY := /allen/programs/celltypes/workgroups/hct/SawchukS/rookery
SYMLINKS := \
$(PROJECT_HOME):$(ROOKERY) \
$(PROJECT_DEN):$(NHP_DATA) \
$(PROJECT_DEN):$(HUMAN_DATA) \
$(PROJECT_DEN):$(Seq_DATA) \
$(PROJECT_DEN):$(sert_repo)
.PHONY: all symlinks
all: symlinks
symlinks:
@set -e; \
OSNAME=$$(uname 2>/dev/null || echo Windows); \
for pair in $(SYMLINKS); do \
dest=$${pair%%:*}; \
src=$${pair##*:}; \
linkname="$${dest}/$$(basename $$src)"; \
if [ -L "$$linkname" ]; then \
echo "Symlink already exists: $$linkname"; \
elif [ -e "$$linkname" ]; then \
echo "Error: $$linkname exists but is not a symlink"; \
exit 1; \
else \
echo "Creating symlink: $$linkname -> $$src"; \
if [ "$$OSNAME" = "Linux" ] || [ "$$OSNAME" = "Darwin" ]; then \
ln -s "$$src" "$$linkname"; \
elif [ "$$OSNAME" = "Windows" ]; then \
powershell -Command "New-Item -ItemType SymbolicLink -Path '$$linkname' -Target '$$src'" || exit 1; \
else \
echo "Unsupported OS: $$OSNAME"; \
exit 1; \
fi; \
fi; \
done