forked from erlyaws/yaws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
83 lines (66 loc) · 2.42 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
SUBDIRS = c_src src man www/shoppingcart www/code doc scripts
include ./include.mk
include ./vsn.mk
PKGCONFIG_FILES = yaws.pc
all debug clean:
@set -e ; \
for d in $(SUBDIRS) ; do \
if [ -f $$d/Makefile ]; then ( cd $$d && $(MAKE) $@ ) || exit 1 ; fi ; \
done
rm -rf yaws-${YAWS_VSN}.script yaws-${YAWS_VSN}.boot
rm -rf yaws-${YAWS_VSN}.rel yaws-${YAWS_VSN}.tar.gz
install: all
set -e ; \
for d in $(SUBDIRS) ; do \
if [ -f $$d/Makefile ]; then ( cd $$d && $(MAKE) $@ ) || exit 1 ; fi ; \
done
$(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/pkgconfig
$(INSTALL) -m 644 $(PKGCONFIG_FILES) $(DESTDIR)$(PREFIX)/lib/pkgconfig
@echo "-------------------------------"
@echo
@echo "** etc files went into ${ETCDIR}"
@echo "** executables went into ${prefix}/bin"
@echo "** library files went into ${prefix}/lib/yaws"
@echo "** var files went into ${VARDIR}"
@echo "** default docroot went into ${VARDIR}/yaws/www"
@echo
@echo "--------------------------------"
docs:
( cd doc && $(MAKE) docs )
conf_clean:
-rm include.mk config.cache config.status config.log 2> /dev/null
local_install: all
(cd scripts && $(MAKE) local_install)
# Target for folks that want to build a proper OTP release
# to be used with regular OTP release management.
release: vsn.mk include.mk yaws.rel.src all
sed -e "s/%YAWS_VSN%/${YAWS_VSN}/g" \
-e "s/%ERTS_VSN%/${ERTS_VSN}/" \
-e "s/%KERNEL_VSN%/${KERNEL_VSN}/" \
-e "s/%STDLIB_VSN%/${STDLIB_VSN}/" \
-e "s/%SASL_VSN%/${SASL_VSN}/" \
-e "s/%MNESIA_VSN%/${MNESIA_VSN}/" \
< yaws.rel.src > yaws-${YAWS_VSN}.rel
erlc -pa ./ebin yaws-${YAWS_VSN}.rel
erl -pa ./ebin -noinput -run systools make_tar yaws-${YAWS_VSN} \
-s erlang halt
@echo "-------------------------------"
@echo
@echo "Best to rerun this in an Erlang shell to pick up include directory:"
@echo
@echo "$$ erl -pa ./ebin"
@echo "1> systools:make_tar(\"yaws-${YAWS_VSN}\", [{dirs,[include,examples,src]}])."
@echo
@echo "--------------------------------"
touch:
find . -name '*' -print | xargs touch -m
find . -name '*.erl' -print | xargs touch -m
foo:
@echo "-------------------------------"
@echo
@echo "** etc files will go into ${ETCDIR}"
@echo "** executables will go into ${prefix}/bin"
@echo "** library file will go into ${prefix}/lib/yaws"
@echo "** var files will go into ${VARDIR}"
@echo
@echo "--------------------------------"