aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/lazy_configure.mk81
-rwxr-xr-xmake/make_emakefile66
-rw-r--r--make/otp.mk.in267
-rw-r--r--make/otp_ded.mk.in22
-rw-r--r--make/otp_release_targets.mk78
-rw-r--r--make/otp_subdir.mk53
-rw-r--r--make/run_make.mk42
-rwxr-xr-xmake/save_args71
-rw-r--r--make/target.mk33
9 files changed, 713 insertions, 0 deletions
diff --git a/make/lazy_configure.mk b/make/lazy_configure.mk
new file mode 100644
index 0000000000..320f485d90
--- /dev/null
+++ b/make/lazy_configure.mk
@@ -0,0 +1,81 @@
+# ``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 via the world wide web 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.
+#
+# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+# AB. All Rights Reserved.''
+#
+# $Id$
+#
+
+ifndef EXPECTED_AUTOCONF_VERSION
+EXPECTED_AUTOCONF_VERSION=2.59
+endif
+SAVE_ARGS=$(ERL_TOP)/make/save_args
+CONFIG_STATUS=$(CONFIGURE_DIR)/$(TARGET)/config.status
+SAVED_CONFIG_FLAGS_FILE=$(CONFIGURE_DIR)/$(TARGET)/lazy.config.flags
+SAVED_CONFIG_LOG=$(CONFIGURE_DIR)/$(TARGET)/config.log
+CONFIG_CACHE_FILE=$(CONFIGURE_DIR)/$(TARGET)/lazy.config.cache
+ALL_CONFIG_FLAGS=$(CONFIGURE_FLAGS) --no-create --no-recursion --cache-file=$(CONFIG_CACHE_FILE)
+
+lazy_configure: save_config_flags $(CONFIG_STATUS)
+ rm -f $(CONFIGURE_DIR)/config.log
+ cd $(CONFIGURE_DIR) && $(CONFIG_STATUS)
+ cat $(CONFIGURE_DIR)/config.log >> $(SAVED_CONFIG_LOG)
+ rm -f $(CONFIGURE_DIR)/config.log
+
+save_config_flags:
+ $(SAVE_ARGS) $(SAVED_CONFIG_FLAGS_FILE) --- $(ALL_CONFIG_FLAGS)
+
+$(SAVED_CONFIG_FLAGS_FILE): save_config_flags
+
+$(CONFIGURE_DIR)/configure: $(CONFIGURE_DIR)/configure.in $(EXTRA_CONFIGURE_DEPENDENCIES)
+ rm -f $(CONFIG_CACHE_FILE)
+ @ exp_ac_vsn=$(EXPECTED_AUTOCONF_VERSION) ; \
+ ac_vsn_blob=`autoconf --version` ; \
+ ac_vsn=`echo x$$ac_vsn_blob | sed "s|[^0-9]*\([0-9][^ \t\n]*\).*|\1|"` ; \
+ case "$$ac_vsn" in \
+ $$exp_ac_vsn) \
+ ;; \
+ *) \
+ echo "***************************************************" 1>&2 ; \
+ echo "***************************************************" 1>&2 ; \
+ echo "*** WARNING: System might fail to configure or" 1>&2 ; \
+ echo "*** might be erroneously configured" 1>&2 ; \
+ echo "*** since autoconf version $$ac_vsn is used" 1>&2 ; \
+ echo "*** instead of version $$exp_ac_vsn!" 1>&2 ; \
+ echo "***************************************************" 1>&2 ; \
+ echo "***************************************************" 1>&2 ; \
+ ;; \
+ esac
+ cd $(CONFIGURE_DIR) && autoconf -f
+
+$(CONFIGURE_DIR)/config.h.in: $(CONFIGURE_DIR)/configure.in $(CONFIGURE_DIR)/aclocal.m4
+ cd $(CONFIGURE_DIR) && autoheader ./configure.in > ./config.h.in
+
+$(CONFIG_STATUS): $(SAVED_CONFIG_FLAGS_FILE) $(CONFIGURE_DIR)/configure $(EXTRA_CONFIG_STATUS_DEPENDENCIES)
+ rm -f $(CONFIGURE_DIR)/config.log
+ cd $(CONFIGURE_DIR) && CONFIG_STATUS=$(CONFIG_STATUS) ./configure $(ALL_CONFIG_FLAGS)
+ rm -f $(SAVED_CONFIG_LOG)
+ mv $(CONFIGURE_DIR)/config.log $(SAVED_CONFIG_LOG)
+
+lazy_configure_target_clean:
+ rm -f $(CONFIG_STATUS)
+ rm -f $(CONFIG_CACHE_FILE)
+ rm -f $(SAVED_CONFIG_FLAGS_FILE)
+ rm -f $(SAVED_CONFIG_LOG)
+
+lazy_configure_clean: lazy_configure_target_clean
+ rm -f $(CONFIGURE_DIR)/configure
+ test ! -f $(CONFIGURE_DIR)/acconfig.h || rm -f $(CONFIGURE_DIR)/config.h.in
+
+.PHONY: lazy_configure save_config_flags lazy_configure_clean
+
diff --git a/make/make_emakefile b/make/make_emakefile
new file mode 100755
index 0000000000..80c4acae94
--- /dev/null
+++ b/make/make_emakefile
@@ -0,0 +1,66 @@
+#!/usr/bin/perl
+# -*- cperl -*-
+
+use strict;
+
+my $key;
+my @opts;
+my @modules;
+my $m;
+my $o;
+
+foreach (@ARGV) {
+ if (/^\-I(.+)/) {
+ push(@opts,"{i,\"$1\"}");
+ $key=0;
+ }
+ elsif (/^\-o(.+)/) {
+ push(@opts,"{outdir,\"$1\"}");
+ $key=0;
+ }
+ elsif (/^\-D(.+)=(.+)/) {
+ push(@opts,"{d,\'$1\',$2}");
+ $key=0;
+ }
+ elsif (/^\-D(.+)/) {
+ push(@opts,"{d,\'$1\'}");
+ $key=0;
+ }
+ elsif (/^\+(.+)/) {
+ push(@opts,$1),
+ $key=0;
+ }
+ elsif (/^(\-(.+))$/) {
+ $key = $1;
+ }
+ elsif ($key eq "\-I") {
+ push(@opts,"{i,\"$_\"}");
+ $key=0;
+ }
+ elsif ($key eq "\-o") {
+ push(@opts,"{outdir,\"$_\"}");
+ $key=0;
+ }
+ elsif ($key) {
+ print "Warning: Ignoring invalid option \"$key $_\"\n";
+ $key=0;
+ }
+ else {
+ push(@modules,"\'$_\'"),
+ $key=0;
+ }
+};
+
+$m = pop(@modules);
+print "{[$m";
+foreach (@modules) {
+ print ",$_";
+};
+
+$o = pop(@opts);
+print "],[$o";
+foreach (@opts) {
+ print ",$_";
+};
+
+print "]}.\n";
diff --git a/make/otp.mk.in b/make/otp.mk.in
new file mode 100644
index 0000000000..bcf9bd85a4
--- /dev/null
+++ b/make/otp.mk.in
@@ -0,0 +1,267 @@
+#-*-makefile-*- ; force emacs to enter makefile-mode
+# ----------------------------------------------------
+# Make include file for otp
+#
+# %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%
+#
+# Author: Lars Thorsen
+# ----------------------------------------------------
+.SUFFIXES: .erl .beam .yrl .xrl .bin .mib .hrl .sgml .xml .xmlsrc .html .ps \
+ .3 .1 .fig .dvi .tex .class .java .pdf .fo .psframe .pscrop .el .elc
+
+# ----------------------------------------------------
+# Common macros
+# ----------------------------------------------------
+DEFAULT_TARGETS = opt debug release release_docs clean docs
+
+# Slash separated list of return values from $(origin VAR)
+# that are untrusted - set default in this file instead.
+# The list is not space separated since some return values
+# contain space, and we want to use $(findstring ...) to
+# search the list.
+DUBIOUS_ORIGINS = /undefined/environment/
+
+# ----------------------------------------------------
+# HiPE
+# ----------------------------------------------------
+
+HIPE_ENABLED=@HIPE_ENABLED@
+NATIVE_LIBS_ENABLED=@NATIVE_LIBS_ENABLED@
+
+# ----------------------------------------------------
+# Command macros
+# ----------------------------------------------------
+INSTALL = @INSTALL@
+INSTALL_DIR = @INSTALL_DIR@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_DATA = @INSTALL_DATA@
+
+CC = @CC@
+HCC = @HCC@
+CC32 = @CC32@
+CFLAGS32 = @CFLAGS32@
+BASIC_CFLAGS = @CFLAGS@
+DEBUG_FLAGS = @DEBUG_FLAGS@
+LD = @LD@
+RANLIB = @RANLIB@
+AR = @AR@
+PERL = @PERL@
+
+BITS64 = @BITS64@
+
+OTP_RELEASE = @OTP_RELEASE@
+
+# ----------------------------------------------------
+# Erlang language section
+# ----------------------------------------------------
+EMULATOR = beam
+ifeq ($(findstring vxworks,$(TARGET)),vxworks)
+# VxWorks object files should be compressed.
+# Other object files should have debug_info.
+ ERL_COMPILE_FLAGS += +compressed
+else
+ ifeq ($(findstring ose_ppc750,$(TARGET)),ose_ppc750)
+ ERL_COMPILE_FLAGS += +compressed
+ else
+ ifdef BOOTSTRAP
+ ERL_COMPILE_FLAGS += +slim
+ else
+ ERL_COMPILE_FLAGS += +debug_info
+ endif
+ endif
+endif
+ERLC_WFLAGS = -W
+ERLC = erlc $(ERLC_WFLAGS) $(ERLC_FLAGS)
+ERL = erl -boot start_clean
+
+ifneq (,$(findstring $(origin EBIN),$(DUBIOUS_ORIGINS)))
+EBIN = ../ebin
+endif
+
+# Generated (non ebin) files...
+ifneq (,$(findstring $(origin EGEN),$(DUBIOUS_ORIGINS)))
+EGEN = .
+endif
+
+ifneq (,$(findstring $(origin ESRC),$(DUBIOUS_ORIGINS)))
+ESRC = .
+endif
+
+$(EBIN)/%.beam: $(EGEN)/%.erl
+ $(ERLC) $(ERL_COMPILE_FLAGS) -o$(EBIN) $<
+
+$(EBIN)/%.beam: $(ESRC)/%.erl
+ $(ERLC) $(ERL_COMPILE_FLAGS) -o$(EBIN) $<
+
+.erl.beam:
+ $(ERLC) $(ERL_COMPILE_FLAGS) -o$(dir $@) $<
+
+#
+# When .erl files are automatically created GNU make removes them if
+# they were the result of a chain of implicit rules. To prevent this
+# we say that all .erl files are "precious".
+#
+.PRECIOUS: %.erl %.fo
+
+## Uncomment these lines and add .idl to suffixes above to have erlc
+## eat IDL files
+##$(EGEN)/%.erl: $(ESRC)/%.idl
+## $(ERLC) $(IDL_FLAGS) $<
+
+$(EGEN)/%.erl: $(ESRC)/%.yrl
+ $(ERLC) $(YRL_FLAGS) -o$(EGEN) $<
+
+$(EGEN)/%.erl: $(ESRC)/%.xrl
+ $(ERLC) $(XRL_FLAGS) -o$(EGEN) $<
+
+# ----------------------------------------------------
+# SNMP language section
+# ----------------------------------------------------
+SNMP_TOOLKIT = $(ERL_TOP)/lib/snmp
+ifeq ($(SNMP_BIN_TARGET_DIR),)
+ SNMP_BIN_TARGET_DIR = ../priv/mibs
+endif
+ifeq ($(SNMP_HRL_TARGET_DIR),)
+ SNMP_HRL_TARGET_DIR = ../include
+endif
+
+
+$(SNMP_BIN_TARGET_DIR)/%.bin: %.mib
+ $(ERLC) -pa $(SNMP_TOOLKIT)/ebin -I $(SNMP_TOOLKIT)/priv/mibs $(SNMP_FLAGS) -o $(SNMP_BIN_TARGET_DIR) $<
+
+$(SNMP_HRL_TARGET_DIR)/%.hrl: $(SNMP_BIN_TARGET_DIR)/%.bin
+ $(ERLC) -pa $(SNMP_TOOLKIT)/ebin -o $(SNMP_HRL_TARGET_DIR) $<
+
+.mib.bin:
+ $(ERLC) -pa $(SNMP_TOOLKIT)/ebin -I $(SNMP_TOOLKIT)/priv/mibs $(SNMP_FLAGS) $<
+
+.bin.hrl:
+ $(ERLC) -pa $(SNMP_TOOLKIT)/ebin $<
+
+# ----------------------------------------------------
+# Java language section
+# ----------------------------------------------------
+JAVA= @JAVAC@
+
+ifneq (,$(findstring $(origin JAVA_DEST_ROOT),$(DUBIOUS_ORIGINS)))
+JAVA_DEST_ROOT = ../priv/
+endif
+
+.java.class:
+ CLASSPATH=$(CLASSPATH) $(JAVA) $(JAVA_OPTIONS) $<
+
+
+$(JAVA_DEST_ROOT)$(JAVA_CLASS_SUBDIR)%.class: %.java
+ CLASSPATH=$(CLASSPATH) $(JAVA) $(JAVA_OPTIONS) -d $(JAVA_DEST_ROOT) $<
+
+# ----------------------------------------------------
+# Emacs byte code compiling
+# ----------------------------------------------------
+EMACS_COMPILER=emacs-20
+EMACS_COMPILE_OPTIONS=-q --no-site-file -batch -f batch-byte-compile
+
+.el.elc:
+ $(EMACS_COMPILER) $(EMACS_COMPILE_OPTIONS) $<
+
+# ----------------------------------------------------
+# Documentation section
+# ----------------------------------------------------
+export VSN
+
+DOCSUPPORT = 1
+
+TOPDOCDIR=../../../../doc
+
+DOCDIR = ..
+
+PDFDIR=$(DOCDIR)/pdf
+
+HTMLDIR = $(DOCDIR)/html
+
+MAN1DIR = $(DOCDIR)/man1
+MAN2DIR = $(DOCDIR)/man2
+MAN3DIR = $(DOCDIR)/man3
+MAN4DIR = $(DOCDIR)/man4
+MAN6DIR = $(DOCDIR)/man6
+MAN9DIR = $(DOCDIR)/man9
+
+TEXDIR = .
+
+# HTML & GIF files that always are generated and must be delivered
+SGML_COLL_FILES = $(SGML_APPLICATION_FILES) $(SGML_PART_FILES)
+XML_COLL_FILES = $(XML_APPLICATION_FILES) $(XML_PART_FILES)
+DEFAULT_HTML_FILES = \
+ $(SGML_COLL_FILES:%.sgml=$(HTMLDIR)/%_frame.html) \
+ $(SGML_COLL_FILES:%.sgml=$(HTMLDIR)/%_first.html) \
+ $(SGML_COLL_FILES:%.sgml=$(HTMLDIR)/%_term.html) \
+ $(SGML_COLL_FILES:%.sgml=$(HTMLDIR)/%_cite.html) \
+ $(SGML_APPLICATION_FILES:%.sgml=$(HTMLDIR)/%_index.html) \
+ $(SGML_APPLICATION_FILES:%.sgml=$(HTMLDIR)/%.kwc) \
+ $(XML_COLL_FILES:%.xml=$(HTMLDIR)/%_frame.html) \
+ $(XML_COLL_FILES:%.xml=$(HTMLDIR)/%_first.html) \
+ $(XML_COLL_FILES:%.xml=$(HTMLDIR)/%_term.html) \
+ $(XML_COLL_FILES:%.xml=$(HTMLDIR)/%_cite.html) \
+ $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%_index.html) \
+ $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.kwc) \
+ $(HTMLDIR)/index.html
+
+DEFAULT_GIF_FILES = $(HTMLDIR)/min_head.gif
+
+#
+# Flags & Commands
+#
+XSLTPROC = @XSLTPROC@
+FOP = @FOP@
+
+DOCGEN=$(ERL_TOP)/lib/erl_docgen
+
+
+
+$(MAN1DIR)/%.1:: %.xml
+ date=`date +"%B %e %Y"`; \
+ xsltproc --output "$@" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $<
+
+
+$(MAN2DIR)/%.2:: %.xml
+ date=`date +"%B %e %Y"`; \
+ xsltproc --output "$@" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $<
+
+
+$(MAN3DIR)/%.3:: %.xml
+ date=`date +"%B %e %Y"`; \
+ xsltproc --output "$@" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $<
+
+$(MAN4DIR)/%.4:: %.xml
+ date=`date +"%B %e %Y"`; \
+ xsltproc --output "$@" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $<
+
+$(MAN6DIR)/%.6:: %_app.xml
+ date=`date +"%B %e %Y"`; \
+ xsltproc --output "$@" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $<
+
+$(MAN9DIR)/%.9:: %.xml
+ date=`date +"%B %e %Y"`; \
+ xsltproc --output "$@" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $<
+
+
+.xmlsrc.xml:
+ $(DOCGEN)/priv/bin/codeline_preprocessing.escript $< $@
+
+.fo.pdf:
+ $(FOP) -fo $< -pdf $@
diff --git a/make/otp_ded.mk.in b/make/otp_ded.mk.in
new file mode 100644
index 0000000000..0a91a42df5
--- /dev/null
+++ b/make/otp_ded.mk.in
@@ -0,0 +1,22 @@
+#-*-makefile-*- ; force emacs to enter makefile-mode
+# ----------------------------------------------------
+# Make include file for otp
+#
+# Copyright (C) 1996, Ericsson Telecommunications
+# Author: Lars Thorsen
+# ----------------------------------------------------
+DED_CC = @CC@
+DED_LD = @DED_LD@
+DED_LDFLAGS = @DED_LDFLAGS@
+DED__NOWARN_CFLAGS = @DED_CFLAGS@
+DED_CFLAGS = @WFLAGS@ @DED_CFLAGS@
+DED_LIBS = @LIBS@
+ERLANG_OSTYPE = @ERLANG_OSTYPE@
+TARGET = @host@
+PRIVDIR = ../priv
+OBJDIR = $(PRIVDIR)/obj/$(TARGET)
+LIBDIR = $(PRIVDIR)/lib/$(TARGET)
+DED_SYS_INCLUDE = -I$(ERL_TOP)/erts/emulator/beam \
+ -I$(ERL_TOP)/erts/emulator/sys/$(ERLANG_OSTYPE)
+
+DED_INCLUDES = $(DED_SYS_INCLUDE)
diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk
new file mode 100644
index 0000000000..b6e1f4195e
--- /dev/null
+++ b/make/otp_release_targets.mk
@@ -0,0 +1,78 @@
+# ``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 via the world wide web 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.
+#
+# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+# AB. All Rights Reserved.''
+#
+# $Id$
+
+# ----------------------------------------------------
+# Target for building only the files needed by the Book generation
+# ----------------------------------------------------
+#texmake: $(TEX_FILES) $(PSFIG_FILES)
+
+# ----------------------------------------------------
+# Targets for the new documentation support
+# ----------------------------------------------------
+
+ifeq ($(TOPDOC),)
+$(HTMLDIR)/index.html: $(XML_FILES)
+ date=`date +"%B %e %Y"`; \
+ $(XSLTPROC) --noout --stringparam outdir $(HTMLDIR) --stringparam docgen "$(DOCGEN)" --stringparam topdocdir "$(TOPDOCDIR)" \
+ --stringparam pdfdir "$(PDFDIR)" \
+ --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude \
+ -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_html_entities $(DOCGEN)/priv/xsl/db_html.xsl book.xml
+endif
+
+$(HTMLDIR)/users_guide.html: $(XML_FILES)
+ date=`date +"%B %e %Y"`; \
+ $(XSLTPROC) --noout --stringparam outdir $(HTMLDIR) --stringparam docgen "$(DOCGEN)" --stringparam topdocdir "$(TOPDOCDIR)" \
+ --stringparam pdfdir "$(PDFDIR)" \
+ --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude \
+ -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_html_entities $(DOCGEN)/priv/xsl/db_html.xsl book.xml
+
+
+%.fo: $(XML_FILES)
+ date=`date +"%B %e %Y"`; \
+ $(XSLTPROC) --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" \
+ --stringparam appver "$(VSN)" --xinclude \
+ -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_html_entities $(DOCGEN)/priv/xsl/db_pdf.xsl book.xml > $@
+
+
+local_docs: TOPDOCDIR=.
+local_docs: docs
+ $(INSTALL) $(DOCGEN)/priv/css/otp_doc.css $(HTMLDIR)
+ $(INSTALL) $(DOCGEN)/priv/images/erlang-logo.png $(HTMLDIR)
+ $(INSTALL) $(DOCGEN)/priv/images/erlang-logo.gif $(HTMLDIR)
+ $(INSTALL_DIR) $(HTMLDIR)/js/flipmenu
+ $(INSTALL) $(DOCGEN)/priv/js/flipmenu/flip_closed.gif \
+ $(DOCGEN)/priv/js/flipmenu/flip_open.gif \
+ $(DOCGEN)/priv/js/flipmenu/flip_static.gif \
+ $(DOCGEN)/priv/js/flipmenu/flipmenu.js $(HTMLDIR)/js/flipmenu
+
+
+# ----------------------------------------------------
+# Standard release target
+# ----------------------------------------------------
+
+ifeq ($(TESTROOT),)
+
+release release_docs release_tests release_html:
+ $(MAKE) $(MFLAGS) RELEASE_PATH=$(ERL_TOP)/release/$(TARGET) \
+ $(TARGET_MAKEFILE) $@_spec
+
+else
+
+release release_docs release_tests release_html:
+ $(MAKE) $(MFLAGS) RELEASE_PATH=$(TESTROOT) $(TARGET_MAKEFILE) $@_spec
+
+endif
diff --git a/make/otp_subdir.mk b/make/otp_subdir.mk
new file mode 100644
index 0000000000..46c61c9e54
--- /dev/null
+++ b/make/otp_subdir.mk
@@ -0,0 +1,53 @@
+# ``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 via the world wide web 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.
+#
+# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+# AB. All Rights Reserved.''
+#
+# $Id$
+#
+#
+# Make include file for otp
+
+.PHONY: debug opt release local_docs docs release_docs tests release_tests \
+ clean depend valgrind
+
+#
+# Targets that don't affect documentation directories
+#
+debug opt release local_docs docs release_docs tests release_tests clean depend valgrind:
+ @set -e ; \
+ app_pwd=`pwd` ; \
+ if test -f vsn.mk; then \
+ echo "=== Entering application" `basename $$app_pwd` ; \
+ fi ; \
+ case "$(MAKE)" in *clearmake*) tflag="-T";; *) tflag="";; esac; \
+ for d in $(SUB_DIRECTORIES); do \
+ if test -f $$d/SKIP ; then \
+ echo "=== Skipping subdir $$d, reason:" ; \
+ cat $$d/SKIP ; \
+ echo "===" ; \
+ else \
+ if test ! -d $$d ; then \
+ echo "=== Skipping subdir $$d, it is missing" ; \
+ else \
+ xflag="" ; \
+ if test -f $$d/ignore_config_record.inf; then \
+ xflag=$$tflag ; \
+ fi ; \
+ (cd $$d && $(MAKE) $$xflag $@) || exit $$? ; \
+ fi ; \
+ fi ; \
+ done ; \
+ if test -f vsn.mk; then \
+ echo "=== Leaving application" `basename $$app_pwd` ; \
+ fi
diff --git a/make/run_make.mk b/make/run_make.mk
new file mode 100644
index 0000000000..b2be384aa3
--- /dev/null
+++ b/make/run_make.mk
@@ -0,0 +1,42 @@
+# ``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 via the world wide web 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.
+#
+# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+# AB. All Rights Reserved.''
+#
+# $Id$
+#
+# ----------------------------------------------------
+# This make include file runs make recursively on the Makefile
+# in the architecture dependent subdirectory.
+#
+# Typical use from Makefile:
+#
+# include $(ERL_TOP)/make/run_make.mk
+#
+# ----------------------------------------------------
+
+include $(ERL_TOP)/make/target.mk
+
+opt debug purify quantify purecov valgrind gcov gprof lcnt:
+ $(MAKE) -f $(TARGET)/Makefile TYPE=$@
+
+plain smp hybrid frag smp_frag:
+ $(MAKE) -f $(TARGET)/Makefile FLAVOR=$@
+
+clean generate depend docs release release_spec release_docs release_docs_spec \
+ tests release_tests release_tests_spec:
+ $(MAKE) -f $(TARGET)/Makefile $@
+
+
+
+
diff --git a/make/save_args b/make/save_args
new file mode 100755
index 0000000000..331cde99e1
--- /dev/null
+++ b/make/save_args
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# ``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 via the world wide web 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.
+#
+# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+# AB. All Rights Reserved.''
+#
+# $Id$
+#
+
+#
+# Usage: save_args <argument storage filename> --- [arguments to save ...]
+#
+
+arg_file=
+begin_marker=false
+
+for arg
+do
+ if test "x$arg" = "x---"; then
+ shift
+ begin_marker=true
+ break
+ elif test "x$arg_file" = "x"; then
+ arg_file=$arg
+ shift
+ else
+ echo "save_args: Unknown argument: $arg" 1>&2
+ exit 1
+ fi
+done
+
+if test "x$arg_file" = "x"; then
+ echo "save_args: Missing argument storage filename" 1>&2
+ exit 1
+fi
+
+if test $begin_marker != true; then
+ echo "save_args: No begin marker found" 1>&2
+ exit 1
+fi
+
+new_args="$@"
+
+if test ! -f $arg_file; then
+ echo "$new_args" > $arg_file
+ echo "save_args: No previusly saved arguments; created $arg_file"
+else
+ old_args=`cat $arg_file`
+ case "$old_args" in
+ "$new_args")
+ echo "save_args: Same arguments as saved; no need to update $arg_file";;
+ *)
+ echo "$new_args" > $arg_file
+ echo "save_args: Not same arguments as saved; updated $arg_file";;
+ esac
+fi
+
+
+
+ \ No newline at end of file
diff --git a/make/target.mk b/make/target.mk
new file mode 100644
index 0000000000..06e895df90
--- /dev/null
+++ b/make/target.mk
@@ -0,0 +1,33 @@
+ifeq ($(OVERRIDE_TARGET),)
+
+ifeq ($(TARGET),)
+
+TARGET := $(shell $(ERL_TOP)/erts/autoconf/config.guess)
+
+else
+
+endif
+
+else
+
+ifneq ($(TARGET),)
+
+ifneq ($(TARGET), $(OVERRIDE_TARGET))
+$(warning overriding $$(TARGET) = \
+ "$(TARGET)" \
+ with \
+ $$(OVERRIDE_TARGET) = \
+ "$(OVERRIDE_TARGET)")
+else
+endif
+
+override TARGET := $(OVERRIDE_TARGET)
+
+else
+
+TARGET := $(OVERRIDE_TARGET)
+
+endif
+
+endif
+