[asterisk-commits] dlee: branch dlee/stasis-http r382408 - in /team/dlee/stasis-http: build_tool...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 4 17:06:57 CST 2013
Author: dlee
Date: Mon Mar 4 17:06:54 2013
New Revision: 382408
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382408
Log:
Trying to clean up directory structure
Modified:
team/dlee/stasis-http/build_tools/make_stasis_http_stubs
team/dlee/stasis-http/cog/stasis_cog.py
Modified: team/dlee/stasis-http/build_tools/make_stasis_http_stubs
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/build_tools/make_stasis_http_stubs?view=diff&rev=382408&r1=382407&r2=382408
==============================================================================
--- team/dlee/stasis-http/build_tools/make_stasis_http_stubs (original)
+++ team/dlee/stasis-http/build_tools/make_stasis_http_stubs Mon Mar 4 17:06:54 2013
@@ -25,15 +25,15 @@
for json in rest-api/*.json; do
echo "Cogging ${json}"
name=$(basename ${json} .json)
- sources="${sources} stasis_http_${name}.o"
+ sources="${sources} stasis_http/resource_${name}.o"
if test ${name} = resources; then
- ${COG} -I cog/ -D RESOURCES=${json} -d -o res/stasis_http_resources.c cog/stasis_http_resources.c.cog
+ ${COG} -I cog/ -D RESOURCES=${json} -d -o res/stasis_http/resources.c cog/stasis_http_resources.c.cog
else
- ${COG} -I cog/ -D RESOURCE=${json} -d -o include/asterisk/stasis_http_${name}.h cog/stasis_http_resource.h.cog
- if ! test -e res/stasis_http_${name}.c; then
+ ${COG} -I cog/ -D RESOURCE=${json} -d -o res/stasis_http/resource_${name}.h cog/stasis_http_resource.h.cog
+ if ! test -e res/stasis_http/${name}.c; then
# Only write the file if it doesn't exist; otherwise you'll overwrite someone's hard work.
echo " Generating source stubs"
- ${COG} -I cog/ -D RESOURCE=${json} -d -o res/stasis_http_${name}.c cog/stasis_http_resource.c.cog
+ ${COG} -I cog/ -D RESOURCE=${json} -d -o res/stasis_http/resource_${name}.c cog/stasis_http_resource.c.cog
fi
fi
done
Modified: team/dlee/stasis-http/cog/stasis_cog.py
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/cog/stasis_cog.py?view=diff&rev=382408&r1=382407&r2=382408
==============================================================================
--- team/dlee/stasis-http/cog/stasis_cog.py (original)
+++ team/dlee/stasis-http/cog/stasis_cog.py Mon Mar 4 17:06:54 2013
@@ -22,6 +22,13 @@
implemenation stubs for the Asterisk HTTP server. Using swagger-codegen
was a bit too heavyweight, and adding Java as a dependency for developers
would engender much unnecessary hate.
+
+The code generation takes a basic philosophy:
+ * Each API declaration file corresponds to a pair of res/stasis_http/*.{c,h}
+ files.
+ *
+
+
"""
import cog
@@ -306,7 +313,7 @@
os.path.join(resource_listing_dir, path)).format(format='json')
(basename, ext) = os.path.splitext(
os.path.basename(api_declaration_file))
- self.includes.append('asterisk/stasis_http_%s.h' % basename)
+ self.includes.append('stasis_http/resource_%s.h' % basename)
self.load_api_declaration(api_declaration_file)
def load_api_declaration(self, api_declaration_file):
More information about the asterisk-commits
mailing list