blob: 2a36c65884ebc2e6a54c456c35605091cd3b3b45 [file] [log] [blame]
Gavin McDonald0b75e1a2010-10-28 02:12:01 +00001# Comment by tfee 2004-07-01
2# ==========================
3# This file is a mod of the stock OTP one.
4# The change allows make to stop when a compile error occurs.
5# This file needs to go into two places:
6# /usr/local/include/erlang
7# /opt/OTP_SRC/make
8#
9# where OTP_SRC is a symbolic link to a peer directory containing
10# the otp source, e.g. otp_src_R9C-2.
11#
12# After installing OTP, running sudo make install in otp/build
13# will push this file out to the two places listed above.
14#
15# The mod involves setting the shell variable $short_circuit, which we
16# introduce - ie it is not in the stock file. This variable is tested
17# to affect execution flow and is also returned to affect the flow in
18# the calling script (this one). The latter step is necessary because
19# of the recursion involved.
20# =====================================================================
21
22
23# ``The contents of this file are subject to the Erlang Public License,
24# Version 1.1, (the "License"); you may not use this file except in
25# compliance with the License. You should have received a copy of the
26# Erlang Public License along with this software. If not, it can be
27# retrieved via the world wide web at http://www.erlang.org/.
28#
29# Software distributed under the License is distributed on an "AS IS"
30# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
31# the License for the specific language governing rights and limitations
32# under the License.
33#
34# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
35# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
36# AB. All Rights Reserved.''
37#
38# $Id: otp_subdir.mk,v 1.5 2004/07/12 15:12:23 jeinhorn Exp $
39#
40#
41# Make include file for otp
42
43.PHONY: debug opt release docs release_docs tests release_tests \
44 clean depend
45
46#
47# Targets that don't affect documentation directories
48#
49debug opt release docs release_docs tests release_tests clean depend: prepare
50 @set -e ; \
51 app_pwd=`pwd` ; \
52 if test -f vsn.mk; then \
53 echo "=== Entering application" `basename $$app_pwd` ; \
54 fi ; \
55 case "$(MAKE)" in *clearmake*) tflag="-T";; *) tflag="";; esac; \
56 short_circuit=0 ; \
57 for d in $(SUB_DIRECTORIES); do \
58 if [[ $$short_circuit = 0 ]]; then \
59 if test -f $$d/SKIP ; then \
60 echo "=== Skipping subdir $$d, reason:" ; \
61 cat $$d/SKIP ; \
62 echo "===" ; \
63 else \
64 if test ! -d $$d ; then \
65 echo "=== Skipping subdir $$d, it is missing" ; \
66 else \
67 xflag="" ; \
68 if test -f $$d/ignore_config_record.inf; then \
69 xflag=$$tflag ; \
70 fi ; \
71 (cd $$d && $(MAKE) $$xflag $@) ; \
72 if [[ $$? != 0 ]]; then \
73 short_circuit=1 ; \
74 fi ; \
75 fi ; \
76 fi ; \
77 fi ; \
78 done ; \
79 if test -f vsn.mk; then \
80 echo "=== Leaving application" `basename $$app_pwd` ; \
81 fi ; \
82 exit $$short_circuit
83
84prepare:
85 echo