aboutsummaryrefslogtreecommitdiffstats
path: root/erts/start_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'erts/start_scripts')
-rw-r--r--erts/start_scripts/Makefile179
-rw-r--r--erts/start_scripts/start_all_example.rel.src26
-rw-r--r--erts/start_scripts/start_clean.rel.src21
-rw-r--r--erts/start_scripts/start_sasl.rel.src22
4 files changed, 248 insertions, 0 deletions
diff --git a/erts/start_scripts/Makefile b/erts/start_scripts/Makefile
new file mode 100644
index 0000000000..862f7285bc
--- /dev/null
+++ b/erts/start_scripts/Makefile
@@ -0,0 +1,179 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 1997-2009. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+
+SS_ROOT = $(ERL_TOP)/erts/start_scripts
+SS_TMP = $(SS_ROOT)/tmp
+LIBPATH= $(ERL_TOP)/lib
+SCRIPT_PATH = -I$(LIBPATH)/kernel/ebin -I$(LIBPATH)/stdlib/ebin -I$(LIBPATH)/sasl/ebin
+BOOTSTRAP_LIBPATH=$(BOOTSTRAP_TOP)/lib
+BOOTSTRAP_SCRIPT_PATH = -I$(BOOTSTRAP_LIBPATH)/kernel/ebin -I$(BOOTSTRAP_LIBPATH)/stdlib/ebin
+
+INSTALL_SCRIPTS = \
+ $(SS_ROOT)/start_clean.script \
+ $(SS_ROOT)/start_clean.boot \
+ $(SS_ROOT)/start_sasl.boot \
+ $(SS_ROOT)/start_sasl.script
+
+REL_SCRIPTS = \
+ $(SS_ROOT)/start_clean.rel \
+ $(SS_ROOT)/start_sasl.rel \
+ $(SS_ROOT)/start_all_example.rel
+
+ifneq ($(findstring win32,$(TARGET)),win32)
+RELEASES_SRC = RELEASES.src
+endif
+
+##############################################################################
+# Get version numbers from the VSN files
+
+# VSN & SYSTEM_VSN
+include ../vsn.mk
+include $(LIBPATH)/kernel/vsn.mk
+include $(LIBPATH)/stdlib/vsn.mk
+-include $(LIBPATH)/sasl/vsn.mk
+-include $(LIBPATH)/os_mon/vsn.mk
+-include $(LIBPATH)/mnesia/vsn.mk
+-include $(LIBPATH)/snmp/vsn.mk
+-include $(LIBPATH)/inets/vsn.mk
+
+##############################################################################
+
+debug opt script: rel $(INSTALL_SCRIPTS) $(RELEASES_SRC)
+
+rel: $(REL_SCRIPTS)
+
+RELEASES.src:
+ $(INSTALL_DIR) $(SS_TMP)
+ ( cd $(SS_TMP) && \
+ $(ERL) -noinput +B -eval 'release_handler:create_RELEASES("%ERL_ROOT%", "$(SS_ROOT)", "$(SS_ROOT)/start_sasl.rel", []), halt()')
+ mv RELEASES RELEASES.src
+
+$(SS_ROOT)/start_clean.script \
+$(SS_ROOT)/start_clean.boot: $(SS_ROOT)/start_clean.rel
+ $(INSTALL_DIR) $(SS_TMP)
+ ( cd $(SS_TMP) && \
+ $(ERLC) $(SASL_FLAGS) $(SCRIPT_PATH) -o $@ $< )
+
+$(SS_ROOT)/start_sasl.script \
+$(SS_ROOT)/start_sasl.boot: $(SS_ROOT)/start_sasl.rel
+ $(INSTALL_DIR) $(SS_TMP)
+ ( cd $(SS_TMP) && \
+ $(ERLC) $(SASL_FLAGS) $(SCRIPT_PATH) -o $@ $< )
+
+$(SS_ROOT)/start_clean.rel: $(SS_ROOT)/start_clean.rel.src \
+ ../vsn.mk \
+ $(LIBPATH)/kernel/vsn.mk \
+ $(LIBPATH)/stdlib/vsn.mk
+ sed -e 's;%SYS_VSN%;$(SYSTEM_VSN);' \
+ -e 's;%ERTS_VSN%;$(VSN);' \
+ -e 's;%KERNEL_VSN%;$(KERNEL_VSN);' \
+ -e 's;%STDLIB_VSN%;$(STDLIB_VSN);' \
+ $(SS_ROOT)/start_clean.rel.src > $(SS_ROOT)/start_clean.rel
+
+$(SS_ROOT)/start_sasl.rel: $(SS_ROOT)/start_sasl.rel.src \
+ ../vsn.mk \
+ $(LIBPATH)/kernel/vsn.mk \
+ $(LIBPATH)/stdlib/vsn.mk \
+ $(LIBPATH)/sasl/vsn.mk
+ sed -e 's;%SYS_VSN%;$(SYSTEM_VSN);' \
+ -e 's;%ERTS_VSN%;$(VSN);' \
+ -e 's;%KERNEL_VSN%;$(KERNEL_VSN);' \
+ -e 's;%STDLIB_VSN%;$(STDLIB_VSN);' \
+ -e 's;%SASL_VSN%;$(SASL_VSN);' \
+ $(SS_ROOT)/start_sasl.rel.src > $(SS_ROOT)/start_sasl.rel
+
+$(SS_ROOT)/start_all_example.rel: $(SS_ROOT)/start_all_example.rel.src \
+ ../vsn.mk \
+ $(LIBPATH)/kernel/vsn.mk \
+ $(LIBPATH)/stdlib/vsn.mk \
+ $(LIBPATH)/sasl/vsn.mk \
+ $(LIBPATH)/os_mon/vsn.mk \
+ $(LIBPATH)/mnesia/vsn.mk \
+ $(LIBPATH)/snmp/vsn.mk \
+ $(LIBPATH)/inets/vsn.mk
+ sed -e 's;%SYS_VSN%;$(SYSTEM_VSN);' \
+ -e 's;%ERTS_VSN%;$(VSN);' \
+ -e 's;%KERNEL_VSN%;$(KERNEL_VSN);' \
+ -e 's;%STDLIB_VSN%;$(STDLIB_VSN);' \
+ -e 's;%SASL_VSN%;$(SASL_VSN);' \
+ -e 's;%OS_MON_VSN%;$(OS_MON_VSN);' \
+ -e 's;%MNESIA_VSN%;$(MNESIA_VSN);' \
+ -e 's;%SNMP_VSN%;$(SNMPEA_VSN);' \
+ -e 's;%INETS_VSN%;$(INETS_VSN);' \
+ $(SS_ROOT)/start_all_example.rel.src > $(SS_ROOT)/start_all_example.rel
+
+## Special target used from $(ERL_TOP)/erts/Makefile.
+$(ERL_TOP)/bin/start.script:
+ $(INSTALL_DIR) $(SS_TMP)
+ ( cd $(SS_TMP) && \
+ $(ERLC) $(SCRIPT_PATH) +otp_build -o $@ $(SS_ROOT)/start_clean.rel )
+
+$(ERL_TOP)/bin/start_sasl.script:
+ $(INSTALL_DIR) $(SS_TMP)
+ ( cd $(SS_TMP) && \
+ $(ERLC) $(SCRIPT_PATH) +otp_build -o $@ $(SS_ROOT)/start_sasl.rel )
+
+$(ERL_TOP)/bin/start_clean.script:
+ $(INSTALL_DIR) $(SS_TMP)
+ ( cd $(SS_TMP) && \
+ $(ERLC) $(SCRIPT_PATH) +otp_build -o $@ $(SS_ROOT)/start_clean.rel )
+
+## Special target used from system/build/Makefile for source code release bootstrap.
+bootstrap_scripts: $(SS_ROOT)/start_clean.rel
+ $(INSTALL_DIR) $(TESTROOT)/bin
+ $(INSTALL_DIR) $(SS_TMP)
+ ( cd $(SS_TMP) && \
+ $(ERLC) $(BOOTSTRAP_SCRIPT_PATH) +otp_build +no_module_tests \
+ -o $(TESTROOT)/bin/start.script $(SS_ROOT)/start_clean.rel )
+ ( cd $(SS_TMP) && \
+ $(ERLC) $(BOOTSTRAP_SCRIPT_PATH) +otp_build +no_module_tests \
+ -o $(TESTROOT)/bin/start_clean.script $(SS_ROOT)/start_clean.rel )
+
+clean:
+ $(RM) $(REL_SCRIPTS) $(INSTALL_SCRIPTS)
+
+docs:
+
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: script
+ $(INSTALL_DIR) $(RELEASE_PATH)/releases/$(SYSTEM_VSN)
+ifneq ($(findstring win32,$(TARGET)),win32)
+ $(INSTALL_DATA) RELEASES.src $(RELEASE_PATH)/releases
+endif
+ $(INSTALL_DATA) $(INSTALL_SCRIPTS) $(REL_SCRIPTS) \
+ $(RELEASE_PATH)/releases/$(SYSTEM_VSN)
+ $(INSTALL_DATA) start_clean.script $(RELEASE_PATH)/releases/$(SYSTEM_VSN)/start.script
+ $(INSTALL_DATA) start_clean.boot $(RELEASE_PATH)/releases/$(SYSTEM_VSN)/start.boot
+
+
+release_docs_spec:
+
+TRUE:
+
diff --git a/erts/start_scripts/start_all_example.rel.src b/erts/start_scripts/start_all_example.rel.src
new file mode 100644
index 0000000000..581eb2eb0b
--- /dev/null
+++ b/erts/start_scripts/start_all_example.rel.src
@@ -0,0 +1,26 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+{release, {"OTP APN 181 01","%SYS_VSN%"}, {erts, "%ERTS_VSN%"},
+ [{kernel,"%KERNEL_VSN%"},
+ {stdlib,"%STDLIB_VSN%"},
+ {sasl, "%SASL_VSN%"},
+ {os_mon, "%OS_MON_VSN%"},
+ {inets, "%INETS_VSN%"},
+ {snmp, "%SNMP_VSN%"},
+ {mnesia, "%MNESIA_VSN%"}]}.
diff --git a/erts/start_scripts/start_clean.rel.src b/erts/start_scripts/start_clean.rel.src
new file mode 100644
index 0000000000..d2df422c51
--- /dev/null
+++ b/erts/start_scripts/start_clean.rel.src
@@ -0,0 +1,21 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+{release, {"OTP APN 181 01","%SYS_VSN%"}, {erts, "%ERTS_VSN%"},
+ [{kernel,"%KERNEL_VSN%"},
+ {stdlib,"%STDLIB_VSN%"}]}.
diff --git a/erts/start_scripts/start_sasl.rel.src b/erts/start_scripts/start_sasl.rel.src
new file mode 100644
index 0000000000..e521e8df91
--- /dev/null
+++ b/erts/start_scripts/start_sasl.rel.src
@@ -0,0 +1,22 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+{release, {"OTP APN 181 01","%SYS_VSN%"}, {erts, "%ERTS_VSN%"},
+ [{kernel,"%KERNEL_VSN%"},
+ {stdlib,"%STDLIB_VSN%"},
+ {sasl, "%SASL_VSN%"}]}.