aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src
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 /lib/diameter/src
parentfba96f493b940f032bc238492a9375ad6397dbe4 (diff)
downloadotp-20c2dcc70525f110c6f71c4b968d7d67682b7c35.tar.gz
otp-20c2dcc70525f110c6f71c4b968d7d67682b7c35.tar.bz2
otp-20c2dcc70525f110c6f71c4b968d7d67682b7c35.zip
Move example code to examples/code
Diffstat (limited to 'lib/diameter/src')
-rw-r--r--lib/diameter/src/Makefile17
-rw-r--r--lib/diameter/src/modules.mk16
2 files changed, 23 insertions, 10 deletions
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