aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2013-09-02 16:11:44 +0200
committerLukas Larsson <[email protected]>2013-09-02 16:11:44 +0200
commit1477aa1a8b78a806ae6b815e16776a64cf6fbc6e (patch)
tree51557c68259af7aa920a3885e84cfea1527dd2f5
parent1a57f9d04b0e846ba6dccdb99643c4f7ab17705f (diff)
parentdbc8066d21384db9829e8b58cd99a4fc223e83ac (diff)
downloadotp-1477aa1a8b78a806ae6b815e16776a64cf6fbc6e.tar.gz
otp-1477aa1a8b78a806ae6b815e16776a64cf6fbc6e.tar.bz2
otp-1477aa1a8b78a806ae6b815e16776a64cf6fbc6e.zip
Merge branch 'lukas/skip-extra-applications/OTP-11288' into maint
* lukas/skip-extra-applications/OTP-11288: Refactor and change EXTRA_APPLICATIONS to use ls Add configure option --without-$app
-rw-r--r--.gitignore1
-rw-r--r--HOWTO/INSTALL.md6
-rw-r--r--configure.in26
-rw-r--r--lib/Makefile44
4 files changed, 58 insertions, 19 deletions
diff --git a/.gitignore b/.gitignore
index 7ccedd3ff3..9cd91245f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -150,6 +150,7 @@ JAVADOC-GENERATED
/erts/epmd/test/Emakefile
/lib/*/SKIP
+/lib/SKIP-APPLICATIONS
/lib/*/doc/html/*.html
/lib/*/doc/html/*.css
diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md
index fa1b9d2e89..5bde47e1f6 100644
--- a/HOWTO/INSTALL.md
+++ b/HOWTO/INSTALL.md
@@ -296,6 +296,12 @@ Some of the available `configure` options are:
you can build using a fallback implementation based on mutexes or spinlocks.
Performance of the SMP runtime system will however suffer immensely without
an implementation for native atomic memory accesses.
+* `--without-$app` - By default all applications in Erlang/OTP will be included
+ in a release. If this is not wanted it is possible to specify that Erlang/OTP
+ should be compiled without that applications, i.e. `--without-wx`. There is
+ no automatic dependency handling inbetween applications. So if you disable
+ an application that another depends on, you also have to disable the
+ dependant application.
If you or your system has special requirements please read the `Makefile` for
additional configuration information.
diff --git a/configure.in b/configure.in
index 4b3884864c..bcb0581e0d 100644
--- a/configure.in
+++ b/configure.in
@@ -390,6 +390,15 @@ if test X${enable_native_libs} = Xyes -a X${enable_hipe} != Xno; then
fi
AC_SUBST(NATIVE_LIBS_ENABLED)
+
+rm -f $ERL_TOP/lib/SKIP-APPLICATIONS
+for app in `cd lib && ls -d *`; do
+ var="with_$app"
+ if test X${!var} == Xno; then
+ echo "$app" >> $ERL_TOP/lib/SKIP-APPLICATIONS
+ fi
+done
+
export ERL_TOP
AC_CONFIG_SUBDIRS(lib erts)
@@ -400,15 +409,22 @@ AC_OUTPUT
pattern="lib/*/SKIP"
files=`echo $pattern`
-if test "$files" != "$pattern"; then
+if test "$files" != "$pattern" || test -f $ERL_TOP/lib/SKIP-APPLICATIONS; then
echo '*********************************************************************'
echo '********************** APPLICATIONS DISABLED **********************'
echo '*********************************************************************'
echo
- for skipfile in $files; do
- app=`dirname $skipfile`; app=`basename $app`
- printf "%-15s: " $app; cat $skipfile
- done
+ if test "$files" != "$pattern"; then
+ for skipfile in $files; do
+ app=`dirname $skipfile`; app=`basename $app`
+ printf "%-15s: " $app; cat $skipfile
+ done
+ fi
+ if test -f $ERL_TOP/lib/SKIP-APPLICATIONS; then
+ for skipapp in `cat $ERL_TOP/lib/SKIP-APPLICATIONS`; do
+ printf "%-15s: User gave --without-%s option\n" $skipapp $skipapp
+ done
+ fi
echo
echo '*********************************************************************'
fi
diff --git a/lib/Makefile b/lib/Makefile
index 9ddf3a0544..47a6d5f9aa 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -19,20 +19,32 @@
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
-ERTS_SUB_DIRECTORIES = stdlib sasl kernel compiler
-OTHER_SUB_DIRECTORIES = tools test_server common_test runtime_tools \
+
+# These have to be built first
+ERTS_APPLICATIONS = stdlib sasl kernel compiler
+
+# Then these have to be build
+ERLANG_APPLICATIONS = tools test_server common_test runtime_tools \
inets xmerl edoc erl_docgen
+
+# These are only build if -a is given to otp_build or make is used directly
+ALL_ERLANG_APPLICATIONS = snmp otp_mibs appmon erl_interface asn1 jinterface \
+ wx debugger reltool gs \
+ ic mnesia crypto orber os_mon parsetools syntax_tools \
+ pman public_key ssl toolbar tv observer odbc diameter \
+ cosTransactions cosEvent cosTime cosNotification \
+ cosProperty cosFileTransfer cosEventDomain et megaco webtool \
+ eunit ssh typer percept eldap dialyzer hipe
+
ifdef BUILD_ALL
- OTHER_SUB_DIRECTORIES += \
- snmp otp_mibs appmon erl_interface asn1 jinterface \
- wx debugger reltool gs \
- ic mnesia crypto orber os_mon parsetools syntax_tools \
- pman public_key ssl toolbar tv observer odbc diameter \
- cosTransactions cosEvent cosTime cosNotification \
- cosProperty cosFileTransfer cosEventDomain et megaco webtool \
- eunit ssh typer percept eldap dialyzer hipe
- EXTRA_FILE := $(wildcard EXTRA-APPLICATIONS)
- EXTRA_APPLICATIONS := $(if $(EXTRA_FILE),$(shell cat $(EXTRA_FILE)))
+ ERLANG_APPLICATIONS += $(ALL_ERLANG_APPLICATIONS)
+
+# We use whildcard */ to figure out if there are any other applications
+# in here.
+ EXPECTED_APPLICATIONS := $(ERTS_APPLICATIONS) $(ERLANG_APPLICATIONS) \
+ autom4te.cache
+ EXTRA_APPLICATIONS += $(filter-out $(EXPECTED_APPLICATIONS),\
+ $(subst /,,$(wildcard */)))
endif
ifdef BOOTSTRAP
@@ -45,13 +57,17 @@ else
ifdef TERTIARY_BOOTSTRAP
SUB_DIRECTORIES = snmp sasl jinterface ic syntax_tools wx
else # Not bootstrap build
- SUB_DIRECTORIES = $(ERTS_SUB_DIRECTORIES) \
- $(OTHER_SUB_DIRECTORIES) \
+ SUB_DIRECTORIES = $(ERTS_APPLICATIONS) \
+ $(ERLANG_APPLICATIONS) \
$(EXTRA_APPLICATIONS)
endif
endif
endif
+# Any applications listed in SKIP-APPLICATIONS should be skipped
+SKIP_FILE := $(wildcard SKIP-APPLICATIONS)
+SKIP_APPLICATIONS := $(if $(SKIP_FILE),$(shell cat $(SKIP_FILE)))
+SUB_DIRECTORIES := $(filter-out $(SKIP_APPLICATIONS),$(SUB_DIRECTORIES))
# ----------------------------------------------------------------------
include $(ERL_TOP)/make/otp_subdir.mk