[go: up one dir, main page]

File: include.mk

package info (click to toggle)
yaws 1.94-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,432 kB
  • sloc: erlang: 31,396; sh: 4,179; ansic: 1,184; makefile: 962; lisp: 79; xml: 12; python: 3; php: 1
file content (53 lines) | stat: -rw-r--r-- 1,057 bytes parent folder | download | duplicates (3)
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
###-*-makefile-*-   ; force emacs to enter makefile-mode


# these the items can be edited

INSTALLPREFIX=/var/yaws

CHATINSTALLDIR=$(INSTALLPREFIX)/chat
EBININSTALLDIR=$(INSTALLPREFIX)/ebin

ERL=$(shell which erl)
ERLC=$(shell which erlc)


## don't edit below here

EMULATOR=beam
ifdef debug
  ERLC_FLAGS+=-Ddebug
endif

ifdef trace
  ERLC_FLAGS=+trace
endif

ifdef export_all
  ERLC_FLAGS+=-Dexport_all
endif


INSTALL=install -c
INSTALL_DATA=${INSTALL} -m 644


# Hmm, don't know if you are supposed to like this better... ;-)
APPSCRIPT = '$$vsn=shift; $$mods=""; while(@ARGV){ $$_=shift; s/^([A-Z].*)$$/\'\''$$1\'\''/; $$mods.=", " if $$mods; $$mods .= $$_; } while(<>) { s/\{vsn, git\}/\{vsn, "$$vsn"\}/; s/\{modules,\[\]\}/\{modules,\[$$mods\]\}/; print; }'

# Targets

../ebin/%.app: %.app.src ../vsn.mk Makefile
	perl -e $(APPSCRIPT) "$(VSN)" $(MODULES) < $< > $@

../ebin/%.appup: %.appup
	cp $< $@

../ebin/%.$(EMULATOR): %.erl
	$(ERLC) -b $(EMULATOR) $(ERLC_FLAGS) -o ../ebin $<

%.$(EMULATOR): %.erl
	$(ERLC) -b $(EMULATOR) $(ERLC_FLAGS) $<