forked from cybercom-finland/there
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (28 loc) · 762 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (28 loc) · 762 Bytes
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
libs=src/perllib/.
cli=src/cli/.
target=/usr/local/there
targetlibs=$(target)/perllib
targetcli=$(target)/bin
targetbin=/usr/local/bin
links=there thereto
rsync=rsync -rlt -v -e ssh --omit-dir-times
wrapname=there-wrapper
.dummy:
clean:
rm -f $(cli)/$(wrapname)
test:
prove t/*.t
install: wrapper Makefile .dummy
mkdir -p $(target)
$(rsync) $(libs) $(targetlibs)
$(rsync) $(cli) $(targetcli)
for x in $(links); do ln -fs $(targetcli)/$(wrapname) $(targetbin)/$$x; done
uninstall:
rm -r $(target)
for x in $(links); do rm $(targetbin)/$$x; done
$(cli)/$(wrapname): Makefile
echo "#!/bin/sh" > $@
echo umask 0 >> $@
echo 'exec perl -I$(targetlibs) -wT -Mstrict $(targetcli)/$$(basename $$0) $$@' >> $@
chmod a+x $@
wrapper: $(cli)/$(wrapname)