Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 161 lines (142 sloc) 5.564 kb
84adefa The R13B03 release.
Erlang/OTP authored
1 #
2 # %CopyrightBegin%
3 #
4 # Copyright Ericsson AB 2006-2009. All Rights Reserved.
5 #
6 # The contents of this file are subject to the Erlang Public License,
7 # Version 1.1, (the "License"); you may not use this file except in
8 # compliance with the License. You should have received a copy of the
9 # Erlang Public License along with this software. If not, it can be
10 # retrieved online at http://www.erlang.org/.
11 #
12 # Software distributed under the License is distributed on an "AS IS"
13 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14 # the License for the specific language governing rights and limitations
15 # under the License.
16 #
17 # %CopyrightEnd%
18 #
19 include $(ERL_TOP)/make/target.mk
20 include vsn.mk
21
22 # ----------------------------------------------------------------------
23
24 # Other erts dirs than the emulator dir...
25 ERTSDIRS = doc/src etc epmd lib_src
26 XINSTDIRS = preloaded
27 ifeq ($(NO_START_SCRIPTS),)
28 ERTSDIRS += start_scripts
29 endif
30
31 # Until hybrid is nofrag, don't build it.
32 #BUILD_HYBRID_EMU=@ERTS_BUILD_HYBRID_EMU@
33 BUILD_HYBRID_EMU=no
34
35 EXTRA_FLAVORS=smp
36 ifeq ($(BUILD_HYBRID_EMU),yes)
37 EXTRA_FLAVORS += hybrid
38 endif
39
40 #
41 # Some byggy 'make's get confused when a directory is created and used
42 # for storing files which other files depend on during the same "make
43 # session". As a workaround we do a 'make generate' (which creates
44 # all directories) before doing 'make opt', etc...
45 #
46
47 ifneq ($(BUILD_HYBRID_EMU),yes)
48 all: smp opt
49 else
50 all: hybrid smp opt
51 endif
52
53 debug opt docs clean:
54 @ case $@ in \
55 docs|clean) ;; \
56 *) ( cd emulator && $(MAKE) generate TYPE=$@ FLAVOR=$(FLAVOR)) ;; \
57 esac
58 @ ( cd emulator && $(MAKE) $@ FLAVOR=$(FLAVOR))
59 @for d in $(ERTSDIRS); do \
60 if test -d $$d; then \
61 ( cd $$d && $(MAKE) $@ ) || exit $$? ; \
62 fi ; \
63 done
64
65 # ----------------------------------------------------------------------
66 # These are "convenience targets", provided as shortcuts for developers
67 # - don't use them in scripts or assume they will always stay like this!
68 #
69
70 $(EXTRA_FLAVORS):
71 @ ( cd emulator \
72 && $(MAKE) generate TYPE=opt FLAVOR=$@ \
73 && $(MAKE) opt FLAVOR=$@ )
74
75 ifneq ($(BUILD_HYBRID_EMU),yes)
76 hybrid:
77 @echo '*** Omitted build of hybrid heap emulator'
78 @echo '*** since target is $(TARGET)'
79 endif
80
81 # Make erl script and erlc in $(ERL_TOP)/bin which runs the compiled version
82 # Note that erlc is not a script and requires extra handling on cygwin.
83 # also note that this file is not created by autoconf, that's why @EXEEXT@
84 # is not used.
85
86 # The copying of beam.dll should be removed when the beam dll need no longer be
87 # in the same directory...
88 local_setup:
89 @cd start_scripts && $(MAKE)
90 @rm -f $(ERL_TOP)/bin/erl $(ERL_TOP)/bin/erlc $(ERL_TOP)/bin/cerl \
91 $(ERL_TOP)/bin/erl.exe $(ERL_TOP)/bin/erlc.exe \
92 $(ERL_TOP)/bin/escript $(ERL_TOP)/bin/escript.exe \
93 $(ERL_TOP)/bin/dialyzer $(ERL_TOP)/bin/dialyzer.exe \
94 $(ERL_TOP)/bin/typer $(ERL_TOP)/bin/typer.exe \
5cf552a @pekadan Add run_test program for Common Test
pekadan authored
95 $(ERL_TOP)/bin/run_test $(ERL_TOP)/bin/run_test.exe \
84adefa The R13B03 release.
Erlang/OTP authored
96 $(ERL_TOP)/bin/start*.boot $(ERL_TOP)/bin/start*.script
97 @if [ "X$(TARGET)" = "Xwin32" ]; then \
98 cp $(ERL_TOP)/bin/$(TARGET)/dialyzer.exe $(ERL_TOP)/bin/dialyzer.exe; \
99 cp $(ERL_TOP)/bin/$(TARGET)/typer.exe $(ERL_TOP)/bin/typer.exe; \
5cf552a @pekadan Add run_test program for Common Test
pekadan authored
100 cp $(ERL_TOP)/bin/$(TARGET)/run_test.exe $(ERL_TOP)/bin/run_test.exe; \
84adefa The R13B03 release.
Erlang/OTP authored
101 cp $(ERL_TOP)/bin/$(TARGET)/erlc.exe $(ERL_TOP)/bin/erlc.exe; \
102 cp $(ERL_TOP)/bin/$(TARGET)/erl.exe $(ERL_TOP)/bin/erl.exe; \
103 cp $(ERL_TOP)/bin/$(TARGET)/werl.exe $(ERL_TOP)/bin/werl.exe; \
104 cp $(ERL_TOP)/bin/$(TARGET)/escript.exe $(ERL_TOP)/bin/escript.exe; \
105 chmod 755 $(ERL_TOP)/bin/erl.exe $(ERL_TOP)/bin/erlc.exe \
106 $(ERL_TOP)/bin/werl.exe; \
107 $(ERL_TOP)/erts/etc/win32/cygwin_tools/make_local_ini.sh \
108 $(ERL_TOP); \
109 else \
110 sed -e "s;%FINAL_ROOTDIR%;$(ERL_TOP);" \
111 -e "s;erts-.*/bin;bin/$(TARGET);" \
112 -e "s;EMU=.*;EMU=beam$(TYPEMARKER);" \
113 $(ERL_TOP)/erts/etc/unix/erl.src.src > $(ERL_TOP)/bin/erl; \
114 sed -e "s;%SRC_ROOTDIR%;$(ERL_TOP);" \
115 -e "s;%TARGET%;$(TARGET);" \
116 -e "s;%VSN%;$(VSN);" \
117 $(ERL_TOP)/erts/etc/unix/cerl.src > $(ERL_TOP)/bin/cerl; \
118 cp $(ERL_TOP)/bin/$(TARGET)/dialyzer $(ERL_TOP)/bin/dialyzer; \
119 cp $(ERL_TOP)/bin/$(TARGET)/typer $(ERL_TOP)/bin/typer; \
5cf552a @pekadan Add run_test program for Common Test
pekadan authored
120 cp $(ERL_TOP)/bin/$(TARGET)/run_test $(ERL_TOP)/bin/run_test; \
84adefa The R13B03 release.
Erlang/OTP authored
121 cp $(ERL_TOP)/bin/$(TARGET)/erlc $(ERL_TOP)/bin/erlc; \
122 cp $(ERL_TOP)/bin/$(TARGET)/escript $(ERL_TOP)/bin/escript; \
123 chmod 755 $(ERL_TOP)/bin/erl $(ERL_TOP)/bin/erlc \
124 $(ERL_TOP)/bin/cerl; \
125 fi
126 @cd start_scripts && $(MAKE) $(ERL_TOP)/bin/start.script \
127 $(ERL_TOP)/bin/start_sasl.script \
128 $(ERL_TOP)/bin/start_clean.script
129
130 # Run the configure script
131 configure:
132 @set -e ; cd autoconf && $(MAKE)
133
134 # Remake the makefiles, if you already have configured but you have edited
135 # a "Makefile.in".
136 makefiles:
137 @set -e ; cd autoconf && $(MAKE) $@
138
139 # ----------------------------------------------------------------------
140 # Release targets
141 #
142
143 release release_docs:
144 ifeq ($(BUILD_HYBRID_EMU),yes)
145 @if test $@ = release; then ( cd emulator && $(MAKE) $@ FLAVOR=hybrid) fi
146 else
147 @if test $@ = release; then ( $(MAKE) hybrid ) fi
148 endif
149 @if test $@ = release; then ( cd emulator && $(MAKE) $@ FLAVOR=smp) fi
150 @ (cd emulator && $(MAKE) $@ FLAVOR=plain)
151 @for d in $(ERTSDIRS) $(XINSTDIRS); do \
152 if test -d $$d; then \
153 ( cd $$d && $(MAKE) $@ ) || exit $$? ; \
154 fi ; \
155 done
156
157 # ----------------------------------------------------------------------
158
159 .PHONY: debug opt docs clean local_setup configure release \
160 release_docs run_test_cases hybrid smp
Something went wrong with that request. Please try again.