[Asterisk-code-review] ARI: Fix missing dependencies. (asterisk[master])

Matt Jordan asteriskteam at digium.com
Wed Apr 29 16:44:09 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: ARI: Fix missing dependencies.
......................................................................


ARI: Fix missing dependencies.

ARI modules that are generated by 'make ari-stubs' are all dependent on
res_ari_model.  Additionally some of the same modules depend on one or more
res_stasis_* modules.

ASTERISK-25027 #close
Reported by: Corey Farrell

Change-Id: I8e07fe7e81fedacb87232f2b6f8b5f47927b4153
---
M Makefile.moddir_rules
M build_tools/get_moduleinfo
M res/ari/ari_model_validators.c
M res/ari/resource_channels.c
M res/ari/resource_device_states.c
M res/ari/resource_mailboxes.c
M res/ari/resource_playbacks.c
M res/ari/resource_recordings.c
M res/res_ari_applications.c
M res/res_ari_asterisk.c
M res/res_ari_bridges.c
M res/res_ari_channels.c
M res/res_ari_device_states.c
M res/res_ari_endpoints.c
M res/res_ari_events.c
M res/res_ari_mailboxes.c
M res/res_ari_playbacks.c
M res/res_ari_recordings.c
M res/res_ari_sounds.c
M rest-api-templates/ari_model_validators.c.mustache
M rest-api-templates/res_ari_resource.c.mustache
21 files changed, 43 insertions(+), 6 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Matt Jordan: Looks good to me, approved; Verified



diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules
index 673580d..3d3e6ad 100644
--- a/Makefile.moddir_rules
+++ b/Makefile.moddir_rules
@@ -66,6 +66,7 @@
 $$(if $$(filter $(1),$$(EMBEDDED_MODS)),modules.link,$(1).so): $$(subst $(3),$(5),$(2))
 $$(subst $(3),$(5),$(2)): _ASTCFLAGS+=$$(call MOD_ASTCFLAGS,$(1))
 .$(1).moduleinfo: MODULEINFO_EXTRA_OUTPUT=" $$(addprefix $$(SUBDIR)/,$$(subst $(3),$(5),$(2)) $$(subst $(3),$(4),$(2)))"
+.$(1).moduleinfo: $(2)
 
 clean:: clean-$(1)$(3)
 
@@ -148,12 +149,12 @@
 
 .%.moduleinfo: %.c
 	@echo "<member name=\"$*\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.o $(SUBDIR)/$*.i $(SUBDIR)/$*.so$(MODULEINFO_EXTRA_OUTPUT)\">" > $@
-	$(AWK) -f $(ASTTOPDIR)/build_tools/get_moduleinfo $< >> $@
+	$(AWK) -f $(ASTTOPDIR)/build_tools/get_moduleinfo $^ >> $@
 	echo "</member>" >> $@
 
 .%.moduleinfo: %.cc
 	@echo "<member name=\"$*\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.oo $(SUBDIR)/$*.ii $(SUBDIR)/$*.so$(MODULEINFO_EXTRA_OUTPUT)\">" > $@
-	$(AWK) -f $(ASTTOPDIR)/build_tools/get_moduleinfo $< >> $@
+	$(AWK) -f $(ASTTOPDIR)/build_tools/get_moduleinfo $^ >> $@
 	echo "</member>" >> $@
 
 .moduleinfo:: $(addsuffix .moduleinfo,$(addprefix .,$(sort $(ALL_C_MODS) $(ALL_CC_MODS))))
diff --git a/build_tools/get_moduleinfo b/build_tools/get_moduleinfo
index 92bc7e9..4dbb294 100644
--- a/build_tools/get_moduleinfo
+++ b/build_tools/get_moduleinfo
@@ -1,3 +1,4 @@
 /\/\*\*\* MODULEINFO/ {printit=1; next}
-/\*\*\*\// {if (printit) exit}
+/<support_level>/ {if (gotsupportlevel) { next }; gotsupportlevel=1}
+/\*\*\*\// {printit=0}
 /.*/ {if (printit) print}
diff --git a/res/ari/ari_model_validators.c b/res/ari/ari_model_validators.c
index db12f00..37d31a1 100644
--- a/res/ari/ari_model_validators.c
+++ b/res/ari/ari_model_validators.c
@@ -24,7 +24,7 @@
  * !!!!!                               DO NOT EDIT                        !!!!!
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  * This file is generated by a mustache template. Please see the original
- * template in rest-api-templates/ari_model_validators.h.mustache
+ * template in rest-api-templates/ari_model_validators.c.mustache
  */
 
 #include "asterisk.h"
diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c
index e35fc8b..2975601 100644
--- a/res/ari/resource_channels.c
+++ b/res/ari/resource_channels.c
@@ -24,7 +24,10 @@
  */
 
 /*** MODULEINFO
-	<depend type="module">res_stasis_app_playback</depend>
+	<depend type="module">res_stasis_answer</depend>
+	<depend type="module">res_stasis_playback</depend>
+	<depend type="module">res_stasis_recording</depend>
+	<depend type="module">res_stasis_snoop</depend>
 	<support_level>core</support_level>
  ***/
 
diff --git a/res/ari/resource_device_states.c b/res/ari/resource_device_states.c
index 53a3683..6f68d52 100644
--- a/res/ari/resource_device_states.c
+++ b/res/ari/resource_device_states.c
@@ -23,6 +23,11 @@
  * \author Kevin Harwell <kharwell at digium.com>
  */
 
+/*** MODULEINFO
+	<depend type="module">res_stasis_device_states</depend>
+	<support_level>core</support_level>
+ ***/
+
 #include "asterisk.h"
 
 ASTERISK_REGISTER_FILE()
diff --git a/res/ari/resource_mailboxes.c b/res/ari/resource_mailboxes.c
index de41338..f899ee4 100644
--- a/res/ari/resource_mailboxes.c
+++ b/res/ari/resource_mailboxes.c
@@ -23,6 +23,11 @@
  * \author Jonathan Rose <jrose at digium.com>
  */
 
+/*** MODULEINFO
+	<depend type="module">res_stasis_mailbox</depend>
+	<support_level>core</support_level>
+ ***/
+
 #include "asterisk.h"
 #include "asterisk/stasis_app_mailbox.h"
 
diff --git a/res/ari/resource_playbacks.c b/res/ari/resource_playbacks.c
index f610c6d..f2751f7 100644
--- a/res/ari/resource_playbacks.c
+++ b/res/ari/resource_playbacks.c
@@ -23,6 +23,11 @@
  * \author David M. Lee, II <dlee at digium.com>
  */
 
+/*** MODULEINFO
+	<depend type="module">res_stasis_playback</depend>
+	<support_level>core</support_level>
+ ***/
+
 #include "asterisk.h"
 
 ASTERISK_REGISTER_FILE()
diff --git a/res/ari/resource_recordings.c b/res/ari/resource_recordings.c
index e7e74ff..a49c3b1 100644
--- a/res/ari/resource_recordings.c
+++ b/res/ari/resource_recordings.c
@@ -23,6 +23,11 @@
  * \author David M. Lee, II <dlee at digium.com>
  */
 
+/*** MODULEINFO
+	<depend type="module">res_stasis_recording</depend>
+	<support_level>core</support_level>
+ ***/
+
 #include "asterisk.h"
 
 ASTERISK_REGISTER_FILE()
diff --git a/res/res_ari_applications.c b/res/res_ari_applications.c
index 04992c1..5d38616 100644
--- a/res/res_ari_applications.c
+++ b/res/res_ari_applications.c
@@ -33,6 +33,7 @@
 
 /*** MODULEINFO
 	<depend type="module">res_ari</depend>
+	<depend type="module">res_ari_model</depend>
 	<depend type="module">res_stasis</depend>
 	<support_level>core</support_level>
  ***/
diff --git a/res/res_ari_asterisk.c b/res/res_ari_asterisk.c
index df4d276..92f0133 100644
--- a/res/res_ari_asterisk.c
+++ b/res/res_ari_asterisk.c
@@ -33,6 +33,7 @@
 
 /*** MODULEINFO
 	<depend type="module">res_ari</depend>
+	<depend type="module">res_ari_model</depend>
 	<depend type="module">res_stasis</depend>
 	<support_level>core</support_level>
  ***/
diff --git a/res/res_ari_bridges.c b/res/res_ari_bridges.c
index 524b03d..72a3464 100644
--- a/res/res_ari_bridges.c
+++ b/res/res_ari_bridges.c
@@ -33,6 +33,7 @@
 
 /*** MODULEINFO
 	<depend type="module">res_ari</depend>
+	<depend type="module">res_ari_model</depend>
 	<depend type="module">res_stasis</depend>
 	<support_level>core</support_level>
  ***/
diff --git a/res/res_ari_channels.c b/res/res_ari_channels.c
index ef92b6b..a2305a5 100644
--- a/res/res_ari_channels.c
+++ b/res/res_ari_channels.c
@@ -33,6 +33,7 @@
 
 /*** MODULEINFO
 	<depend type="module">res_ari</depend>
+	<depend type="module">res_ari_model</depend>
 	<depend type="module">res_stasis</depend>
 	<support_level>core</support_level>
  ***/
diff --git a/res/res_ari_device_states.c b/res/res_ari_device_states.c
index 6d18b34..c4eff8c 100644
--- a/res/res_ari_device_states.c
+++ b/res/res_ari_device_states.c
@@ -33,6 +33,7 @@
 
 /*** MODULEINFO
 	<depend type="module">res_ari</depend>
+	<depend type="module">res_ari_model</depend>
 	<depend type="module">res_stasis</depend>
 	<support_level>core</support_level>
  ***/
diff --git a/res/res_ari_endpoints.c b/res/res_ari_endpoints.c
index e6c9d29..c23fbc6 100644
--- a/res/res_ari_endpoints.c
+++ b/res/res_ari_endpoints.c
@@ -33,6 +33,7 @@
 
 /*** MODULEINFO
 	<depend type="module">res_ari</depend>
+	<depend type="module">res_ari_model</depend>
 	<depend type="module">res_stasis</depend>
 	<support_level>core</support_level>
  ***/
diff --git a/res/res_ari_events.c b/res/res_ari_events.c
index 2c9c1d9..aea318d 100644
--- a/res/res_ari_events.c
+++ b/res/res_ari_events.c
@@ -33,6 +33,7 @@
 
 /*** MODULEINFO
 	<depend type="module">res_ari</depend>
+	<depend type="module">res_ari_model</depend>
 	<depend type="module">res_stasis</depend>
 	<support_level>core</support_level>
  ***/
diff --git a/res/res_ari_mailboxes.c b/res/res_ari_mailboxes.c
index 5eabbd2..0fe83c2 100644
--- a/res/res_ari_mailboxes.c
+++ b/res/res_ari_mailboxes.c
@@ -33,6 +33,7 @@
 
 /*** MODULEINFO
 	<depend type="module">res_ari</depend>
+	<depend type="module">res_ari_model</depend>
 	<depend type="module">res_stasis</depend>
 	<support_level>core</support_level>
  ***/
diff --git a/res/res_ari_playbacks.c b/res/res_ari_playbacks.c
index 8128bb9..a0fc29a 100644
--- a/res/res_ari_playbacks.c
+++ b/res/res_ari_playbacks.c
@@ -33,6 +33,7 @@
 
 /*** MODULEINFO
 	<depend type="module">res_ari</depend>
+	<depend type="module">res_ari_model</depend>
 	<depend type="module">res_stasis</depend>
 	<support_level>core</support_level>
  ***/
diff --git a/res/res_ari_recordings.c b/res/res_ari_recordings.c
index edc614f..61d23aa 100644
--- a/res/res_ari_recordings.c
+++ b/res/res_ari_recordings.c
@@ -33,6 +33,7 @@
 
 /*** MODULEINFO
 	<depend type="module">res_ari</depend>
+	<depend type="module">res_ari_model</depend>
 	<depend type="module">res_stasis</depend>
 	<support_level>core</support_level>
  ***/
diff --git a/res/res_ari_sounds.c b/res/res_ari_sounds.c
index 7c3528e..ea7f60a 100644
--- a/res/res_ari_sounds.c
+++ b/res/res_ari_sounds.c
@@ -33,6 +33,7 @@
 
 /*** MODULEINFO
 	<depend type="module">res_ari</depend>
+	<depend type="module">res_ari_model</depend>
 	<depend type="module">res_stasis</depend>
 	<support_level>core</support_level>
  ***/
diff --git a/rest-api-templates/ari_model_validators.c.mustache b/rest-api-templates/ari_model_validators.c.mustache
index 9d31671..be20515 100644
--- a/rest-api-templates/ari_model_validators.c.mustache
+++ b/rest-api-templates/ari_model_validators.c.mustache
@@ -22,7 +22,7 @@
  /*
 {{> do-not-edit}}
  * This file is generated by a mustache template. Please see the original
- * template in rest-api-templates/ari_model_validators.h.mustache
+ * template in rest-api-templates/ari_model_validators.c.mustache
  */
 
 #include "asterisk.h"
diff --git a/rest-api-templates/res_ari_resource.c.mustache b/rest-api-templates/res_ari_resource.c.mustache
index 896ee0d..4cc9e0d 100644
--- a/rest-api-templates/res_ari_resource.c.mustache
+++ b/rest-api-templates/res_ari_resource.c.mustache
@@ -38,6 +38,7 @@
 
 /*** MODULEINFO
 	<depend type="module">res_ari</depend>
+	<depend type="module">res_ari_model</depend>
 	<depend type="module">res_stasis</depend>
 	<support_level>core</support_level>
  ***/

-- 
To view, visit https://gerrit.asterisk.org/276
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e07fe7e81fedacb87232f2b6f8b5f47927b4153
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-code-review mailing list