forked from jmscott/blobio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
133 lines (122 loc) · 3.81 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#
# Synopsis:
# Root makefile for blobio clients and servers.
# Depends:
# local.mk, derived from local-<os>.mk.example
# Usage:
# mkdir -p $HOME/dev
# cd $HOME/dev
# svn https://github.com/jmscott/blobio
# cd blobio/trunk
# cp local-<os>.mk.example local.mk
# <edit local.mk>
# make -j 4 clean all distclean install
#
include local.mk
all:
cd biod; $(MAKE) $(MFLAGS) all
cd cli; $(MAKE) $(MFLAGS) all
cd flowd; $(MAKE) $(MFLAGS) all
cd sync; $(MAKE) $(MFLAGS) all
clean:
cd biod; $(MAKE) $(MFLAGS) clean
cd flowd; $(MAKE) $(MFLAGS) clean
cd cli; $(MAKE) $(MFLAGS) clean
#cd www; $(MAKE) $(MFLAGS) clean
distclean:
cd biod; $(MAKE) $(MFLAGS) distclean
ifeq "$(DIST_ROOT)" "/usr"
@echo 'refuse to distclean /usr'
exit 1
endif
ifeq "$(DIST_ROOT)" "/usr/local"
@echo 'refuse to distclean /usr/local'
exit 1
endif
cd flowd; $(MAKE) $(MFLAGS) distclean
#cd www; $(MAKE) $(MFLAGS) distclean
rm -rf $(DIST_ROOT)/bin
rm -rf $(DIST_ROOT)/lib
rm -rf $(DIST_ROOT)/sbin
rm -rf $(DIST_ROOT)/src
install: all
# setup the directories
install -g $(DIST_GROUP) -o $(DIST_USER) \
-d $(DIST_ROOT)
install -g $(DIST_GROUP) -o $(DIST_USER) \
-d $(DIST_ROOT)/bin
install -g $(DIST_GROUP) -o $(DIST_USER) \
-d $(DIST_ROOT)/src
install -g $(DIST_GROUP) -o $(DIST_USER) \
-d $(DIST_ROOT)/src/pgsql
install -g $(DIST_GROUP) -o $(DIST_USER) \
-d $(DIST_ROOT)/src/biod
install -g $(DIST_GROUP) -o $(DIST_USER) \
-d $(DIST_ROOT)/src/blobio
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,go= -d $(DIST_ROOT)/sbin
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,go= -d $(DIST_ROOT)/etc
# need group read for possible other services
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,g=rx,o= -d $(DIST_ROOT)/spool
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,go= -d $(DIST_ROOT)/spool/wrap
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,g=rx,o= -d $(DIST_ROOT)/log
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,go= -d $(DIST_ROOT)/run
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,go= -d $(DIST_ROOT)/tmp
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,g=x,o= -d $(DIST_ROOT)/data
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,g=x,o= -d $(DIST_ROOT)/data/sha_fs
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,go= -d $(DIST_ROOT)/data/sha_fs/tmp
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,g=x,o= -d $(DIST_ROOT)/data/bc160_fs
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,go= -d $(DIST_ROOT)/data/bc160_fs/tmp
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,g=rx,o= -d $(DIST_ROOT)/sync
install -g $(DIST_GROUP) -o $(DIST_USER) \
-m u=rwx,g=rx,o= -d $(DIST_ROOT)/sync/host
install -g $(DIST_GROUP) -o $(DIST_USER) \
-d $(DIST_ROOT)/lib
#install -g $(DIST_GROUP) -o $(DIST_USER) \
#-d $(DIST_ROOT)/www
install -g $(DIST_GROUP) -o $(DIST_USER) -m ugo=rx \
pgsql/bio-merge-service \
$(DIST_ROOT)/bin
install -g $(DIST_GROUP) -o $(DIST_USER) -m u=rx,go= \
cron-reboot \
dev-reboot \
zap-proc \
$(DIST_ROOT)/sbin
install -g $(DIST_GROUP) -o $(DIST_USER) -m ug=r,o= \
bash_login-dev.example \
crontab.example \
hamlet.txt \
profile.example \
psqlrc.example \
$(DIST_ROOT)/lib
install -g $(DIST_GROUP) -o $(DIST_USER) -m ug=r,o= \
README \
$(DIST_ROOT)/lib/README.blobio
cd biod; $(MAKE) $(MFLAGS) install
cd cli; $(MAKE) $(MFLAGS) install
cd pgsql; $(MAKE) $(MFLAGS) install
cd flowd; $(MAKE) $(MFLAGS) install
#cd www; $(MAKE) $(MFLAGS) install
cd sync; $(MAKE) $(MFLAGS) install
dev-links:
test -e log || ln -s . log
test -e htdocs || ln -s . htdocs
test -e cgi-bin || ln -s . cgi-bin
test -e lib || ln -s . lib
world:
$(MAKE) $(MFLAGS) clean
$(MAKE) $(MFLAGS) all
$(MAKE) $(MFLAGS) distclean
$(MAKE) $(MFLAGS) install