~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to erts/Makefile.in

  • Committer: Bazaar Package Importer
  • Author(s): Erlang Packagers, Sergei Golovan
  • Date: 2006-12-03 17:07:44 UTC
  • mfrom: (2.1.11 feisty)
  • Revision ID: james.westby@ubuntu.com-20061203170744-rghjwupacqlzs6kv
Tags: 1:11.b.2-4
[ Sergei Golovan ]
Fixed erlang-base and erlang-base-hipe prerm scripts.

Show diffs side-by-side

added added

removed removed

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