aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2011-12-16 16:51:19 +0100
committerAnders Svensson <[email protected]>2011-12-16 18:27:20 +0100
commit20c2dcc70525f110c6f71c4b968d7d67682b7c35 (patch)
tree056e705098c3b4dd852055e38a3c480f512c320e
parentfba96f493b940f032bc238492a9375ad6397dbe4 (diff)
downloadotp-20c2dcc70525f110c6f71c4b968d7d67682b7c35.tar.gz
otp-20c2dcc70525f110c6f71c4b968d7d67682b7c35.tar.bz2
otp-20c2dcc70525f110c6f71c4b968d7d67682b7c35.zip
Move example code to examples/code
-rw-r--r--lib/diameter/examples/code/GNUmakefile (renamed from lib/diameter/examples/GNUmakefile)10
-rw-r--r--lib/diameter/examples/code/client.erl (renamed from lib/diameter/examples/client.erl)2
-rw-r--r--lib/diameter/examples/code/client_cb.erl (renamed from lib/diameter/examples/client_cb.erl)0
-rw-r--r--lib/diameter/examples/code/peer.erl (renamed from lib/diameter/examples/peer.erl)0
-rw-r--r--lib/diameter/examples/code/redirect.erl (renamed from lib/diameter/examples/redirect.erl)0
-rw-r--r--lib/diameter/examples/code/redirect_cb.erl (renamed from lib/diameter/examples/redirect_cb.erl)0
-rw-r--r--lib/diameter/examples/code/relay.erl (renamed from lib/diameter/examples/relay.erl)0
-rw-r--r--lib/diameter/examples/code/relay_cb.erl (renamed from lib/diameter/examples/relay_cb.erl)0
-rw-r--r--lib/diameter/examples/code/sctp.erl (renamed from lib/diameter/examples/sctp.erl)18
-rw-r--r--lib/diameter/examples/code/server.erl (renamed from lib/diameter/examples/server.erl)0
-rw-r--r--lib/diameter/examples/code/server_cb.erl (renamed from lib/diameter/examples/server_cb.erl)0
-rw-r--r--lib/diameter/src/Makefile17
-rw-r--r--lib/diameter/src/modules.mk16
13 files changed, 47 insertions, 16 deletions
diff --git a/lib/diameter/examples/GNUmakefile b/lib/diameter/examples/code/GNUmakefile
index 4c3f87939b..a0669119d2 100644
--- a/lib/diameter/examples/GNUmakefile
+++ b/lib/diameter/examples/code/GNUmakefile
@@ -1,19 +1,19 @@
-#
+#
# %CopyrightBegin%
-#
+#
# Copyright Ericsson AB 2010-2011. 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%
#
diff --git a/lib/diameter/examples/client.erl b/lib/diameter/examples/code/client.erl
index 36a77dd524..9e65f98de0 100644
--- a/lib/diameter/examples/client.erl
+++ b/lib/diameter/examples/code/client.erl
@@ -112,7 +112,7 @@ cast(Name) ->
{'Auth-Application-Id', 0},
{'Re-Auth-Request-Type', 1}],
diameter:call(Name, ?APP_ALIAS, RAR, [detach]).
-
+
cast() ->
cast(?SVC_NAME).
diff --git a/lib/diameter/examples/client_cb.erl b/lib/diameter/examples/code/client_cb.erl
index 524a8f94a1..524a8f94a1 100644
--- a/lib/diameter/examples/client_cb.erl
+++ b/lib/diameter/examples/code/client_cb.erl
diff --git a/lib/diameter/examples/peer.erl b/lib/diameter/examples/code/peer.erl
index 89203e15c3..89203e15c3 100644
--- a/lib/diameter/examples/peer.erl
+++ b/lib/diameter/examples/code/peer.erl
diff --git a/lib/diameter/examples/redirect.erl b/lib/diameter/examples/code/redirect.erl
index b54701243f..b54701243f 100644
--- a/lib/diameter/examples/redirect.erl
+++ b/lib/diameter/examples/code/redirect.erl
diff --git a/lib/diameter/examples/redirect_cb.erl b/lib/diameter/examples/code/redirect_cb.erl
index ea7ad38749..ea7ad38749 100644
--- a/lib/diameter/examples/redirect_cb.erl
+++ b/lib/diameter/examples/code/redirect_cb.erl
diff --git a/lib/diameter/examples/relay.erl b/lib/diameter/examples/code/relay.erl
index deecb1cfc0..deecb1cfc0 100644
--- a/lib/diameter/examples/relay.erl
+++ b/lib/diameter/examples/code/relay.erl
diff --git a/lib/diameter/examples/relay_cb.erl b/lib/diameter/examples/code/relay_cb.erl
index 9ed6517d5c..9ed6517d5c 100644
--- a/lib/diameter/examples/relay_cb.erl
+++ b/lib/diameter/examples/code/relay_cb.erl
diff --git a/lib/diameter/examples/sctp.erl b/lib/diameter/examples/code/sctp.erl
index 2e0e9d8b0b..08de023571 100644
--- a/lib/diameter/examples/sctp.erl
+++ b/lib/diameter/examples/code/sctp.erl
@@ -1,3 +1,21 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2010-2011. 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%
+%%
-module(sctp).
diff --git a/lib/diameter/examples/server.erl b/lib/diameter/examples/code/server.erl
index ebb408e501..ebb408e501 100644
--- a/lib/diameter/examples/server.erl
+++ b/lib/diameter/examples/code/server.erl
diff --git a/lib/diameter/examples/server_cb.erl b/lib/diameter/examples/code/server_cb.erl
index 43b8e24b5c..43b8e24b5c 100644
--- a/lib/diameter/examples/server_cb.erl
+++ b/lib/diameter/examples/code/server_cb.erl
diff --git a/lib/diameter/src/Makefile b/lib/diameter/src/Makefile
index 2ec016ecbc..8b763e73ec 100644
--- a/lib/diameter/src/Makefile
+++ b/lib/diameter/src/Makefile
@@ -88,6 +88,9 @@ TARGET_FILES = \
# Subdirectories of src to release modules into.
TARGET_DIRS = $(sort $(dir $(TARGET_MODULES)))
+# Ditto for examples.
+EXAMPLE_DIRS = $(sort $(dir $(EXAMPLES)))
+
APP_FILE = diameter.app
APP_SRC = $(APP_FILE).src
APP_TARGET = $(EBIN)/$(APP_FILE)
@@ -169,6 +172,8 @@ info:
@echo
@$(call list,EXAMPLES)
@echo
+ @$(call list,EXAMPLE_DIRS)
+ @echo
@$(call list,BINS)
@echo ========================================
@@ -189,23 +194,31 @@ endif
# Can't $(INSTALL_DIR) more than one directory at a time on Solaris.
release_spec: opt
- for d in bin ebin examples include src/dict $(TARGET_DIRS:%/=src/%); do \
+ for d in bin ebin include src/dict; do \
$(INSTALL_DIR) $(RELSYSDIR)/$$d; \
done
$(INSTALL_SCRIPT) $(BINS:%=../bin/%) $(RELSYSDIR)/bin
$(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin
- $(INSTALL_DATA) $(EXAMPLES:%=../examples/%) $(RELSYSDIR)/examples
$(INSTALL_DATA) $(EXTERNAL_HRLS:%=../include/%) $(DICT_HRLS) \
$(RELSYSDIR)/include
$(INSTALL_DATA) $(DICTS:%=dict/%.dia) $(RELSYSDIR)/src/dict
$(MAKE) $(TARGET_DIRS:%/=release_src_%)
+ $(MAKE) $(EXAMPLE_DIRS:%/=release_examples_%)
$(TARGET_DIRS:%/=release_src_%): release_src_%:
+ $(INSTALL_DIR) $(RELSYSDIR)/src/$*
$(INSTALL_DATA) $(filter $*/%, $(TARGET_MODULES:%=%.erl) \
$(INTERNAL_HRLS)) \
$(filter $*/%, compiler/$(DICT_YRL).yrl) \
$(RELSYSDIR)/src/$*
+$(EXAMPLE_DIRS:%/=release_examples_%): release_examples_%:
+ $(INSTALL_DIR) $(RELSYSDIR)/examples/$*
+ $(INSTALL_DATA) $(patsubst, %, \
+ ../examples/%, \
+ $(filter $*/%, $(EXAMPLES))) \
+ $(RELSYSDIR)/examples/$*
+
release_docs_spec:
# ----------------------------------------------------
diff --git a/lib/diameter/src/modules.mk b/lib/diameter/src/modules.mk
index 11d354e57e..0b591e7c1e 100644
--- a/lib/diameter/src/modules.mk
+++ b/lib/diameter/src/modules.mk
@@ -88,11 +88,11 @@ BINS = \
# Released files relative to ../examples.
EXAMPLES = \
- GNUmakefile \
- peer.erl \
- client.erl \
- client_cb.erl \
- server.erl \
- server_cb.erl \
- relay.erl \
- relay_cb.erl
+ code/GNUmakefile \
+ code/peer.erl \
+ code/client.erl \
+ code/client_cb.erl \
+ code/server.erl \
+ code/server_cb.erl \
+ code/relay.erl \
+ code/relay_cb.erl