-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
47 lines (35 loc) · 1009 Bytes
/
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
# This is where you want to install the Perl scripts
dest=$(HOME)/scripts/bioscripts
# And this is where the executables live
bin=$(HOME)/bin
# Current directory
src=$(shell pwd)
# Get rid of all built-in SUFFIX rules
.SUFFIXES :
# Delete targets which can't be properly built
# Hmmmm this doesn't actually work cos the target is not placed in the
# current directory
.DELETE_ON_ERROR :
# Continue after all errors
.IGNORE :
# Destination directories
vpath %.src $(dest)
vpath %.pl $(src)
vpath % $(bin)
# Perl
psources := $(wildcard $(src)/*.pl)
pstems := $(notdir $(psources)) # Strip the path
pbases := $(basename $(pstems)) # Strip the extension
pfiles := $(addsuffix .src, $(pbases))
all :
@echo "Nothing to do."
@echo "Use 'make install' to install the files"
install : $(pbases)
(cd ftpmirror; make install)
(cd indexfasta; make install)
%.src : %.pl
mkdir -p $(dest)
(cd $(dest); cp $(src)/$< $@)
% : %.src
mkdir -p $(bin)
(cd $(bin); ln -sf $(dest)/$< $@)