diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/diameter/src/app/Makefile | 17 | ||||
-rw-r--r-- | lib/diameter/src/app/diameter.app.src | 2 | ||||
-rw-r--r-- | lib/diameter/src/app/diameter.appup.src | 8 | ||||
-rw-r--r-- | lib/diameter/src/app/diameter_internal.hrl | 2 | ||||
-rw-r--r-- | lib/diameter/src/app/diameter_lib.erl | 12 | ||||
-rw-r--r-- | lib/diameter/src/app/modules.mk | 12 | ||||
-rw-r--r-- | lib/diameter/src/compiler/Makefile | 10 | ||||
-rw-r--r-- | lib/diameter/test/diameter_app_SUITE.erl | 12 |
8 files changed, 45 insertions, 30 deletions
diff --git a/lib/diameter/src/app/Makefile b/lib/diameter/src/app/Makefile index 229466e264..ab5754f74f 100644 --- a/lib/diameter/src/app/Makefile +++ b/lib/diameter/src/app/Makefile @@ -58,12 +58,20 @@ SPEC_ERL_FILES = \ SPEC_HRL_FILES = \ $(SPEC_FILES:%.dia=%.hrl) +MODULES = \ + $(RUNTIME_MODULES) \ + $(HELP_MODULES) + APP_MODULES = \ - $(MODULES) \ + $(RUNTIME_MODULES) \ $(SPEC_FILES:%.dia=%) +TARGET_MODULES = \ + $(APP_MODULES) \ + $(HELP_MODULES) + TARGET_FILES = \ - $(APP_MODULES:%=$(EBIN)/%.$(EMULATOR)) \ + $(TARGET_MODULES:%=$(EBIN)/%.$(EMULATOR)) \ $(APP_TARGET) \ $(APPUP_TARGET) @@ -125,17 +133,15 @@ info: # ---------------------------------------------------- # Generate the app file and then modules into in. This shouldn't know -# about ../{compiler,transport} but good enough for now. +# about ../transport but good enough for now. $(APP_TARGET): $(APP_SRC) \ ../../vsn.mk \ modules.mk \ - ../compiler/modules.mk \ ../transport/modules.mk sed -e 's;%VSN%;$(VSN);' $< > $@ M=`echo $(APP_MODULES) | sed -e 's/^ *//' -e 's/ *$$//' -e 'y/ /,/'`; \ echo "/%APP_MODULES%/s//$$M/;w;q" | tr ';' '\n' \ | ed -s $@ - $(MAKE) -C ../compiler $(APP_TARGET) APP_TARGET=$(APP_TARGET) $(MAKE) -C ../transport $(APP_TARGET) APP_TARGET=$(APP_TARGET) $(APPUP_TARGET): $(APPUP_SRC) ../../vsn.mk @@ -150,7 +156,6 @@ app: $(APP_TARGET) $(APPUP_TARGET) diameter_gen_%.erl diameter_gen_%.hrl: diameter_gen_%.dia ../../bin/diameterc -i $(EBIN) -o $(@D) $< - # ---------------------------------------------------- # Release Target # ---------------------------------------------------- diff --git a/lib/diameter/src/app/diameter.app.src b/lib/diameter/src/app/diameter.app.src index 119997953e..a806b5c78a 100644 --- a/lib/diameter/src/app/diameter.app.src +++ b/lib/diameter/src/app/diameter.app.src @@ -20,7 +20,7 @@ {application, diameter, [{description, "Diameter protocol"}, {vsn, "%VSN%"}, - {modules, [%APP_MODULES%,%COMPILER_MODULES%,%TRANSPORT_MODULES%]}, + {modules, [%APP_MODULES%,%TRANSPORT_MODULES%]}, {registered, []}, {applications, [stdlib, kernel]}, {env, []}, diff --git a/lib/diameter/src/app/diameter.appup.src b/lib/diameter/src/app/diameter.appup.src index 3f77034a12..6d8ceadb92 100644 --- a/lib/diameter/src/app/diameter.appup.src +++ b/lib/diameter/src/app/diameter.appup.src @@ -24,21 +24,21 @@ [ {load_module, diameter, soft_purge, soft_purge, []}, {load_module, diameter_capx, soft_purge, soft_purge, []}, - {load_module, diameter_codec, soft_purge, soft_purge, []}, + {load_module, diameter_codec, soft_purge, soft_purge, [diameter_lib]}, {load_module, diameter_lib, soft_purge, soft_purge, []}, {load_module, diameter_types, soft_purge, soft_purge, []}, {load_module, diameter_gen_base_accounting, soft_purge, soft_purge, []}, {load_module, diameter_gen_base_rfc3588, soft_purge, soft_purge, []}, {load_module, diameter_gen_relay, soft_purge, soft_purge, []}, - {update, diameter_service, soft, soft_purge, soft_purge, []}, + {update, diameter_service, soft, soft_purge, soft_purge, [diameter_lib]}, {update, diameter_config, soft, soft_purge, soft_purge, []}, {update, diameter_peer, soft, soft_purge, soft_purge, []}, - {update, diameter_peer_fsm, soft, soft_purge, soft_purge, []}, + {update, diameter_peer_fsm, soft, soft_purge, soft_purge, [diameter_lib]}, {update, diameter_reg, soft, soft_purge, soft_purge, []}, {update, diameter_sctp, soft, soft_purge, soft_purge, []}, {update, diameter_stats, soft, soft_purge, soft_purge, []}, {update, diameter_sync, soft, soft_purge, soft_purge, []}, - {update, diameter_watchdog, soft, soft_purge, soft_purge, []} + {update, diameter_watchdog, soft, soft_purge, soft_purge, [diameter_lib]} ] } ], diff --git a/lib/diameter/src/app/diameter_internal.hrl b/lib/diameter/src/app/diameter_internal.hrl index 78645b1912..63b35550a8 100644 --- a/lib/diameter/src/app/diameter_internal.hrl +++ b/lib/diameter/src/app/diameter_internal.hrl @@ -44,7 +44,7 @@ %% Something to trace on. -define(LOG(Slogan, Details), - diameter_dbg:log(Slogan, ?MODULE, ?LINE, Details)). + diameter_lib:log(Slogan, ?MODULE, ?LINE, Details)). -define(LOGC(Bool, Slogan, Details), ((Bool) andalso ?LOG(Slogan, Details))). %% Compensate for no builtin ?FUNC for use in log reports. diff --git a/lib/diameter/src/app/diameter_lib.erl b/lib/diameter/src/app/diameter_lib.erl index f65e356444..362d593b24 100644 --- a/lib/diameter/src/app/diameter_lib.erl +++ b/lib/diameter/src/app/diameter_lib.erl @@ -30,7 +30,8 @@ ipaddr/1, spawn_opts/2, wait/1, - fold_tuple/3]). + fold_tuple/3, + log/4]). -include("diameter_internal.hrl"). @@ -260,3 +261,12 @@ ft(undefined, {_, T}) -> T; ft(Value, {Idx, T}) -> setelement(Idx, T, Value). + +%%% ---------------------------------------------------------- +%%% # log(Slogan, Mod, Line, Details) +%%% +%%% Called to have something to trace on for happenings of interest. +%%% ---------------------------------------------------------- + +log(_, _, _, _) -> + ok. diff --git a/lib/diameter/src/app/modules.mk b/lib/diameter/src/app/modules.mk index a7a78b1a9d..c133e6f64e 100644 --- a/lib/diameter/src/app/modules.mk +++ b/lib/diameter/src/app/modules.mk @@ -22,17 +22,13 @@ SPEC_FILES = \ diameter_gen_base_accounting.dia \ diameter_gen_relay.dia -MODULES = \ +RUNTIME_MODULES = \ diameter \ diameter_app \ - diameter_callback \ diameter_capx \ diameter_config \ - diameter_dbg \ diameter_codec \ diameter_dict \ - diameter_exprecs \ - diameter_info \ diameter_lib \ diameter_misc_sup \ diameter_peer \ @@ -49,6 +45,12 @@ MODULES = \ diameter_watchdog \ diameter_watchdog_sup +HELP_MODULES = \ + diameter_callback \ + diameter_exprecs \ + diameter_dbg \ + diameter_info + INTERNAL_HRL_FILES = \ diameter_internal.hrl \ diameter_types.hrl diff --git a/lib/diameter/src/compiler/Makefile b/lib/diameter/src/compiler/Makefile index 3ab76064ac..779013bfbc 100644 --- a/lib/diameter/src/compiler/Makefile +++ b/lib/diameter/src/compiler/Makefile @@ -94,16 +94,6 @@ info: @echo "" # ---------------------------------------------------- -# Special Build Targets -# ---------------------------------------------------- - -# Invoked from ../app to add modules to the app file. -$(APP_TARGET): force - M=`echo $(MODULES) | sed -e 's/^ *//' -e 's/ *$$//' -e 'y/ /,/'`; \ - echo "/%COMPILER_MODULES%/s//$$M/;w;q" | tr ';' '\n' \ - | ed -s $@ - -# ---------------------------------------------------- # Release Target # ---------------------------------------------------- ifneq ($(ERL_TOP),) diff --git a/lib/diameter/test/diameter_app_SUITE.erl b/lib/diameter/test/diameter_app_SUITE.erl index d710fa155d..104785b4e6 100644 --- a/lib/diameter/test/diameter_app_SUITE.erl +++ b/lib/diameter/test/diameter_app_SUITE.erl @@ -86,13 +86,21 @@ vsn(Config) -> %% =========================================================================== %% # modules/1 %% -%% Ensure that the app file module list match the installed beams. +%% Ensure that the app file modules and installed modules differ by +%% compiler/help modules. %% =========================================================================== modules(Config) -> Mods = fetch(modules, fetch(app, Config)), Installed = code_mods(), - {[], []} = {Mods -- Installed, Installed -- Mods}. + Help = [diameter_callback, + diameter_codegen, + diameter_dbg, + diameter_exprecs, + diameter_info, + diameter_spec_scan, + diameter_spec_util], + {[], Help} = {Mods -- Installed, lists:sort(Installed -- Mods)}. code_mods() -> Dir = code:lib_dir(?APP, ebin), |