-
Notifications
You must be signed in to change notification settings - Fork 53
/
Makefile.in
187 lines (152 loc) · 4.88 KB
/
Makefile.in
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# $Id: Makefile.in 2758 2005-08-24 14:08:29Z ft $
#
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
DESTDIR = @DESTDIR@
SHELL = @SHELL@
confdir = @sysconfdir@
sslcertdir = @sslcertdir@
mnesiadir = @mnesiadir@
beamdir = @libdir@/yxa/ebin
includedir = @libdir@/yxa/include
sbindir = @sbindir@
exec_prefix=${prefix}
builddir = @builddir@
ebin_dir = ./ebin
yxa_include_dir = $(srcdir)/include/
ifndef no_debug
ERLC_FLAGS += +debug_info
endif
ifdef no_warn
ERLC_FLAGS += -W0
endif
ifdef no_unittests
ERLC_FLAGS += -DYXA_NO_UNITTEST
endif
ERLC = @ERLC@
ERL = @ERL@
L_ERLC_FLAGS = $(ERLC_FLAGS) -o $(ebin_dir) -I$(srcdir) -I$(yxa_include_dir)
INSTALL = @INSTALL@
install_DATA = @INSTALL_DATA@
install_PROGRAM = @INSTALL_PROGRAM@
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
create_start_script = \
sed -e "s!@PROGRAMNAME@!$@!" \
-e 's!@CONFIGDIR@!$(confdir)!' \
-e 's!@SSLCERTDIR@!$(sslcertdir)!' \
-e 's!@MNESIADIR@!$(mnesiadir)!' \
-e 's!@erl@!$(ERL)!' \
-e 's!@beamdir@!$(beamdir)!' < $(top_srcdir)/scripts/init.sh.in > [email protected] && \
chmod +x [email protected] && \
mv [email protected] $@
SUBDIRS = \
src \
yaws/src
RECURSIVE_TARGETS = all-recursive install-recursive clean-recursive distclean-recursive doc-recursive packages-recursive
erl_FILES = \
version.erl
beam_FILES = $(addprefix $(ebin_dir)/, $(erl_FILES:.erl=.beam))
start_FILES = \
appserver \
incomingproxy \
outgoingproxy \
pstnproxy \
yxa-bootstrap
all: $(ebin_dir) $(beam_FILES) all-recursive $(start_FILES)
$(RECURSIVE_TARGETS):
@target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) ERLC_FLAGS="$(ERLC_FLAGS)" $$target) || exit 1; \
done
$(ebin_dir):
$(mkinstalldirs) $(ebin_dir)
install: $(beam_FILES) $(start_FILES) install-recursive
$(mkinstalldirs) $(DESTDIR)$(confdir)
$(mkinstalldirs) $(DESTDIR)$(sslcertdir)
$(mkinstalldirs) $(DESTDIR)$(mnesiadir)
$(mkinstalldirs) $(DESTDIR)$(sbindir)
$(mkinstalldirs) $(DESTDIR)$(beamdir)
for p in $(beam_FILES); do \
$(install_DATA) $$p $(DESTDIR)$(beamdir)/$$f ; \
done
for p in $(start_FILES); do \
$(install_PROGRAM) $$p $(DESTDIR)$(sbindir)/$$f ; \
done
packages: all packages-recursive
distclean: clean distclean-recursive
rm -f Makefile
rm -f config.status
rm -f config.log
rm -f version.erl
rm -rf doc/
rm -rf $(ebin_dir)/
clean: clean-recursive
rm -f core *.core *~
rm -f *.beam newversion.erl.new version.erl.in
rm -f *.o ktrace.out erl_crash.dump
rm -f $(beam_FILES)
rm -f $(start_FILES)
sslkey:
@if [ -f $(DESTDIR)$(sslcertdir)/ssl.config ]; then \
echo ""; \
echo "You already have a $(DESTDIR)$(sslcertdir)/ssl.config file - "; \
echo "aborting to not accidentally overwrite existing ssl keys"; \
echo ""; \
false; \
else \
true; \
fi
$(mkinstalldirs) -m 700 $(DESTDIR)$(sslcertdir)
cp $(srcdir)/ssl.config $(DESTDIR)$(sslcertdir)/ssl.config
cd $(DESTDIR)$(sslcertdir) && openssl req -days 2002 -new -text -out cert.req -config ./ssl.config
cd $(DESTDIR)$(sslcertdir) && openssl rsa -in privkey.pem -out cert.pem -passin pass:foobar
cd $(DESTDIR)$(sslcertdir) && openssl req -days 2002 -x509 -in cert.req -text -key cert.pem -out cert.cert
cat $(DESTDIR)$(sslcertdir)/cert.cert $(DESTDIR)$(sslcertdir)/cert.pem > $(DESTDIR)$(sslcertdir)/cert.comb
SUFFIXES = .c .o .hrl .beam .erl .boot .rel .app .app-in
.SUFFIXES:
.SUFFIXES: .c .o .hrl .beam .erl .boot .rel .app .app-in
$(ebin_dir)/%.beam: %.erl
$(ERLC) $(L_ERLC_FLAGS) $<
$(start_FILES): $(top_srcdir)/scripts/init.sh.in $(builddir)/config.status
yxa-bootstrap:
$(create_start_script)
incomingproxy: $(builddir)/src/incomingproxy.boot
$(create_start_script)
pstnproxy: $(builddir)/src/pstnproxy.boot
$(create_start_script)
appserver: $(builddir)/src/appserver.boot
$(create_start_script)
outgoingproxy: $(builddir)/src/outgoingproxy.boot
$(create_start_script)
test: TZ = CET
test:
echo "Making test in src/"; \
(cd src/ && $(MAKE) test TZ=$(TZ)) || exit 1
covertest:
echo "Making covertest in src/"; \
(cd src/ && $(MAKE) covertest) || exit 1
xreftest: $(beam_FILES)
echo "Making xreftest in src/"; \
(cd src/ && $(MAKE) xreftest) || exit 1
doc: $(ebin_dir) doc-recursive
mkdir -p doc/html/src
cp $(srcdir)/doc-src/overview.edoc doc/html/
echo "Making doc in src/"; \
(cd src/ && $(MAKE) doc) || exit 1
echo "Making doc in yaws/src/"; \
(cd yaws/src/ && $(MAKE) doc) || exit 1
# generate edoc overview in top doc/html/ directory
$(ERL) -yxa_edoc_dir doc/html -pa $(ebin_dir) -noshell -run yxa_edoc run "" -run init stop
# for the top level, we clean away everything but the non-frame page
mv doc/html/overview-summary.html doc/html/index.html
rm -f doc/html/stylesheet.css \
doc/html/packages-frame.html \
doc/html/modules-frame.html \
doc/html/edoc-info \
doc/html/overview.edoc
@echo ""
@echo "Documentation generated into doc/html/"
@echo ""