Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 70 lines (59 sloc) 1.952 kb
21abc5b @klacke Initial revision
authored
1 include ../include.mk
2
3
5d32ac8 @klacke debian patch from David Welton applied
authored
4 all debug: ../bin/yaws yaws.conf
ea1789e @klacke ""
authored
5
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
6 ../bin/yaws: yaws.template
7 cat yaws.template | \
8 ./Subst %yawsdir% `pwd`/.. | \
87a5ac5 @klacke *** empty log message ***
authored
9 ./Subst %vardir% $(VARDIR) | \
10 ./Subst %run_erl% "$(ERLBINDIR)/run_erl" | \
11 ./Subst %to_erl% "$(ERLBINDIR)/to_erl" | \
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
12 ./Subst %erl% "$(ERL)" | \
13 ./Subst %werl% "$(WERL)" > ../bin/yaws
14 chmod +x ../bin/yaws
15
5007942 @klacke make local_install target
authored
16
17 local_install: ../bin/yaws
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
18 @install -d $$HOME/yaws_logs
961926f @klacke ""
authored
19 @if [ -f $$HOME/yaws.conf ]; \
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
20 then target=$$HOME/yaws.conf.template; \
961926f @klacke ""
authored
21 else \
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
22 target=$$HOME/yaws.conf; \
23 fi; \
24 echo "--- Installing local config file at $${target} "; \
25 cat yaws.conf.template | \
26 ./Subst %yawsdir% `pwd`/.. | \
27 ./Subst %logdir% $$HOME/yaws_logs | \
28 ./Subst %host% `hostname` | \
29 ./Subst %port% 8000 | \
30 ./Subst %docroot% `pwd`/../www | \
31 ./Subst %certdir% `pwd`/../ssl | \
32 ./Subst %sslport% 4443 > $${target}; \
e441faa @klacke Use
authored
33 $(INSTALL) -d $$HOME/bin; \
34 rm $$HOME/bin/yaws 2> /dev/null; \
35 cp -f ../bin/yaws $$HOME/bin/yaws; \
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
36 echo "--- Installed $$HOME/bin/yaws"
57d2cc4 @klacke ""
authored
37
443b55e @klacke Build and make fixes
authored
38
5d32ac8 @klacke debian patch from David Welton applied
authored
39 yaws.conf:
e63e8b9 @klacke ""
authored
40 @echo PREFIX is $(PREFIX)
41 cat yaws.conf.template | \
42 ./Subst %yawsdir% $(PREFIX)/lib/yaws | \
9624397 @klacke patch from Fredrik Linder to make it easier to integrate yaws into apps...
authored
43 ./Subst %logdir% $(VARDIR)/log/yaws | \
443b55e @klacke Build and make fixes
authored
44 ./Subst %vardir% $(VARDIR) | \
e63e8b9 @klacke ""
authored
45 ./Subst %host% `hostname` | \
46 ./Subst %port% 80 | \
47 ./Subst %docroot% $(VARDIR)/yaws/www | \
48 ./Subst %certdir% $(ETCDIR) | \
49 ./Subst %sslport% 443 > yaws.conf
5d32ac8 @klacke debian patch from David Welton applied
authored
50
21abc5b @klacke Initial revision
authored
51 clean:
52 rm -f ../bin/yaws
53
0e4eef7 @klacke weird make behaviour from macos make
authored
54 install: .install
55
56 .install:
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id suppo...
authored
57 -rm -rf /tmp/yaws 2> /dev/null
c9778e0 @klacke added support for 2 additional configure
authored
58 sh ./Install $(PREFIX) $(DESTDIR) "$(ERL)" \
87a5ac5 @klacke *** empty log message ***
authored
59 "$(WERL)" $(ETCDIR)/ $(VARDIR)/ $(ERLBINDIR)/
c9778e0 @klacke added support for 2 additional configure
authored
60 @cp ../ssl/yaws-cert.pem $(DESTDIR)/$(ETCDIR)
61 @cp ../ssl/yaws-key.pem $(DESTDIR)/$(ETCDIR)
62 @if [ -f $(DESTDIR)/$(ETCDIR)/yaws.conf ]; \
9d7138b @klacke ""
authored
63 then echo "Keeping old config file "; \
c9778e0 @klacke added support for 2 additional configure
authored
64 cp yaws.conf $(DESTDIR)/$(ETCDIR)/yaws.conf.template; \
9d7138b @klacke ""
authored
65 else \
c9778e0 @klacke added support for 2 additional configure
authored
66 echo "Installing $(DESTDIR)/$(ETCDIR)/yaws.conf"; \
9605d55 @klacke Make/build fixes
authored
67 mkdir -p $(DESTDIR)/$(ETCDIR); \
c9778e0 @klacke added support for 2 additional configure
authored
68 cp yaws.conf $(DESTDIR)/$(ETCDIR)/yaws.conf; \
9d7138b @klacke ""
authored
69 fi
Something went wrong with that request. Please try again.