doc/rpc_list: updated makefile with list of files exporting rpc commands
authorDaniel-Constantin Mierla <miconda@gmail.com>
Sat, 3 Jun 2017 11:45:35 +0000 (13:45 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Sat, 3 Jun 2017 11:45:35 +0000 (13:45 +0200)
doc/tutorials/rpc_list/Makefile

index 712a9c3..c9ff690 100644 (file)
@@ -1,10 +1,10 @@
 
-COREPATH=../..
+COREPATH=../../../src
 
 #include $(COREPATH)/Makefile.defs
 
-CFG2TXT=../scripts/cdefs2doc/dump_rpcs.pl
-CFG2DOCBOOK=../scripts/cdefs2doc/dump_rpcs.pl
+CFG2TXT=../../scripts/cdefs2doc/dump_rpcs.pl
+CFG2DOCBOOK=../../scripts/cdefs2doc/dump_rpcs.pl
 
 # output directory for generated txt files
 txt_output_dir=.
@@ -12,7 +12,7 @@ txt_output_dir=.
 docbook_output_dir=docbook
 
 # list of files containing rpc defs in the following format:
-# <filename>:<cfg_grp_name> 
+# <filename>:<cfg_grp_name>
 # can be easily updated by adding the output of:
 #   make diff-list   (which obeys grp_exclude and file_exclude)
 # or completely regenerated by replacing files_list with the output of:
@@ -21,73 +21,93 @@ docbook_output_dir=docbook
 # avoid file naming conflicts
 #
 files_list= \
-                       $(COREPATH)/core_cmd.c:core \
-                       $(COREPATH)/modules/app_lua/app_lua_mod.c:app_lua \
-                       $(COREPATH)/modules/app_perl/app_perl_mod.c:app_perl \
-                       $(COREPATH)/modules/auth_xkeys/auth_xkeys.c:auth_xkeys \
-                       $(COREPATH)/modules/carrierroute/carrierroute.c:carrierroute \
-                       $(COREPATH)/modules/cdp/cdp_rpc.c:cdp \
-                       $(COREPATH)/modules/cfg_rpc/cfg_rpc.c:cfg_rpc \
-                       $(COREPATH)/modules/cfgt/cfgt_int.c:cfgt \
-                       $(COREPATH)/modules/cfgutils/cfgutils.c:cfgutils \
-                       $(COREPATH)/modules/cnxcc/cnxcc_mod.c:cnxcc \
-                       $(COREPATH)/modules/corex/corex_rpc.c:corex \
-                       $(COREPATH)/modules/counters/counters.c:counters \
-                       $(COREPATH)/modules/ctl/ctl.c:ctl \
-                       $(COREPATH)/modules/db_flatstore/flat_rpc.c:db_flatstore \
-                       $(COREPATH)/modules/db_flatstore/km_flatstore_mod.c:db_flatstore \
-                       $(COREPATH)/modules/db_text/db_text.c:db_text \
-                       $(COREPATH)/modules/debugger/debugger_api.c:debugger \
-                       $(COREPATH)/modules/dialog/dialog.c:dialog \
-                       $(COREPATH)/modules/dialplan/dialplan.c:dialplan \
-                       $(COREPATH)/modules/dispatcher/dispatcher.c:dispatcher \
-                       $(COREPATH)/modules/dmq/dmq.c:dmq \
-                       $(COREPATH)/modules/domain/domain_mod.c:domain \
-                       $(COREPATH)/modules/drouting/drouting.c:drouting \
-                       $(COREPATH)/modules/htable/htable.c:htable \
-                       $(COREPATH)/modules/http_client/curlrpc.c:http_client \
-                       $(COREPATH)/modules/ims_dialog/ims_dialog.c:ims_dialog \
-                       $(COREPATH)/modules/ims_registrar_scscf/reg_rpc.c:ims_registrar_scscf \
-                       $(COREPATH)/modules/ims_usrloc_pcscf/ul_rpc.c:ims_usrloc_pcscf \
-                       $(COREPATH)/modules/ims_usrloc_scscf/ul_rpc.c:ims_usrloc_scscf \
-                       $(COREPATH)/modules/jsonrpc-s/jsonrpc-s_mod.c:jsonrpc-s \
-                       $(COREPATH)/modules/kex/core_stats.c:kex \
-                       $(COREPATH)/modules/kex/mod_stats.c:kex \
-                       $(COREPATH)/modules/kex/pkg_stats.c:kex \
-                       $(COREPATH)/modules/lcr/lcr_rpc.c:lcr \
-                       $(COREPATH)/modules/malloc_test/malloc_test.c:malloc_test \
-                       $(COREPATH)/modules/mi_rpc/mi_rpc_mod.c:mi_rpc \
-                       $(COREPATH)/modules/msrp/msrp_cmap.c:msrp \
-                       $(COREPATH)/modules/mtree/mtree_mod.c:mtree \
-                       $(COREPATH)/modules/pdt/pdt.c:pdt \
-                       $(COREPATH)/modules/permissions/permissions.c:permissions \
-                       $(COREPATH)/modules/pike/pike_rpc.c:pike \
-                       $(COREPATH)/modules/pipelimit/pipelimit.c:pipelimit \
-                       $(COREPATH)/modules/prefix_route/pr_rpc.c:prefix_route \
-                       $(COREPATH)/modules/presence/presence.c:presence \
-                       $(COREPATH)/modules/pv/pv.c:pv \
-                       $(COREPATH)/modules/ratelimit/ratelimit.c:ratelimit \
-                       $(COREPATH)/modules/sca/sca.c:sca \
-                       $(COREPATH)/modules/sctp/sctp_rpc.c:sctp \
-                       $(COREPATH)/modules/sipcapture/sipcapture.c:sipcapture \
-                       $(COREPATH)/modules/siptrace/siptrace.c:siptrace \
-                       $(COREPATH)/modules/sl/sl_stats.c:sl \
-                       $(COREPATH)/modules/statsc/statsc_mod.c:statsc \
-                       $(COREPATH)/modules/tls/tls_rpc.c:tls \
-                       $(COREPATH)/modules/tm/tm.c:tm \
-                       $(COREPATH)/modules/tsilo/ts_rpc.c:tsilo \
-                       $(COREPATH)/modules/uac/uac_reg.c:uac \
-                       $(COREPATH)/modules/uid_domain/domain_rpc.c:uid_domain \
-                       $(COREPATH)/modules/uid_gflags/uid_gflags.c:uid_gflags \
-                       $(COREPATH)/modules/usrloc/ul_rpc.c:usrloc \
-                       $(COREPATH)/modules/xhttp_pi/xhttp_pi.c:xhttp_pi
+               $(COREPATH)/core/core_cmd.c:core \
+               $(COREPATH)/modules/app_jsdt/app_jsdt_api.c:app_jsdt \
+               $(COREPATH)/modules/app_lua/app_lua_mod.c:app_lua \
+               $(COREPATH)/modules/app_perl/app_perl_mod.c:app_perl \
+               $(COREPATH)/modules/app_sqlang/app_sqlang_api.c:app_sqlang \
+               $(COREPATH)/modules/auth_ephemeral/auth_ephemeral_mod.c:auth_ephemeral \
+               $(COREPATH)/modules/auth_xkeys/auth_xkeys.c:auth_xkeys \
+               $(COREPATH)/modules/benchmark/benchmark.c:benchmark \
+               $(COREPATH)/modules/call_obj/call_obj_mod.c:call_obj \
+               $(COREPATH)/modules/carrierroute/carrierroute.c:carrierroute \
+               $(COREPATH)/modules/cdp/cdp_rpc.c:cdp \
+               $(COREPATH)/modules/cfg_rpc/cfg_rpc.c:cfg_rpc \
+               $(COREPATH)/modules/cfgt/cfgt_int.c:cfgt \
+               $(COREPATH)/modules/cfgutils/cfgutils.c:cfgutils \
+               $(COREPATH)/modules/cnxcc/cnxcc_mod.c:cnxcc \
+               $(COREPATH)/modules/corex/corex_rpc.c:corex \
+               $(COREPATH)/modules/counters/counters.c:counters \
+               $(COREPATH)/modules/cplc/cpl_loader.c:cplc \
+               $(COREPATH)/modules/ctl/ctl.c:ctl \
+               $(COREPATH)/modules/db_berkeley/db_berkeley.c:db_berkeley \
+               $(COREPATH)/modules/db_flatstore/flat_rpc.c:db_flatstore \
+               $(COREPATH)/modules/db_flatstore/km_flatstore_mod.c:db_flatstore \
+               $(COREPATH)/modules/db_text/db_text.c:db_text \
+               $(COREPATH)/modules/debugger/debugger_api.c:debugger \
+               $(COREPATH)/modules/dialog/dialog.c:dialog \
+               $(COREPATH)/modules/dialplan/dialplan.c:dialplan \
+               $(COREPATH)/modules/dispatcher/dispatcher.c:dispatcher \
+               $(COREPATH)/modules/dmq/dmq.c:dmq \
+               $(COREPATH)/modules/domain/domain_mod.c:domain \
+               $(COREPATH)/modules/drouting/drouting.c:drouting \
+               $(COREPATH)/modules/htable/htable.c:htable \
+               $(COREPATH)/modules/http_client/curlrpc.c:http_client \
+               $(COREPATH)/modules/imc/imc.c:imc \
+               $(COREPATH)/modules/ims_dialog/ims_dialog.c:ims_dialog \
+               $(COREPATH)/modules/ims_registrar_scscf/reg_rpc.c:ims_registrar_scscf \
+               $(COREPATH)/modules/ims_usrloc_pcscf/ul_rpc.c:ims_usrloc_pcscf \
+               $(COREPATH)/modules/ims_usrloc_scscf/ul_rpc.c:ims_usrloc_scscf \
+               $(COREPATH)/modules/jsonrpcs/jsonrpcs_mod.c:jsonrpcs \
+               $(COREPATH)/modules/keepalive/keepalive_rpc.c:keepalive \
+               $(COREPATH)/modules/kex/core_stats.c:kex \
+               $(COREPATH)/modules/kex/mod_stats.c:kex \
+               $(COREPATH)/modules/kex/pkg_stats.c:kex \
+               $(COREPATH)/modules/lcr/lcr_rpc.c:lcr \
+               $(COREPATH)/modules/malloc_test/malloc_test.c:malloc_test \
+               $(COREPATH)/modules/matrix/matrix.c:matrix \
+               $(COREPATH)/modules/mqueue/mqueue_mod.c:mqueue \
+               $(COREPATH)/modules/msrp/msrp_cmap.c:msrp \
+               $(COREPATH)/modules/mtree/mtree_mod.c:mtree \
+               $(COREPATH)/modules/nathelper/nathelper.c:nathelper \
+               $(COREPATH)/modules/pdb/pdb.c:pdb \
+               $(COREPATH)/modules/pdt/pdt.c:pdt \
+               $(COREPATH)/modules/permissions/permissions.c:permissions \
+               $(COREPATH)/modules/pike/pike_rpc.c:pike \
+               $(COREPATH)/modules/pipelimit/pipelimit.c:pipelimit \
+               $(COREPATH)/modules/prefix_route/pr_rpc.c:prefix_route \
+               $(COREPATH)/modules/presence/presence.c:presence \
+               $(COREPATH)/modules/pua/pua.c:pua \
+               $(COREPATH)/modules/pua_rpc/pua_rpc.c:pua_rpc \
+               $(COREPATH)/modules/pv/pv.c:pv \
+               $(COREPATH)/modules/ratelimit/ratelimit.c:ratelimit \
+               $(COREPATH)/modules/regex/regex_mod.c:regex \
+               $(COREPATH)/modules/rls/rls.c:rls \
+               $(COREPATH)/modules/rtpengine/rtpengine.c:rtpengine \
+               $(COREPATH)/modules/rtpproxy/rtpproxy.c:rtpproxy \
+               $(COREPATH)/modules/sca/sca.c:sca \
+               $(COREPATH)/modules/sctp/sctp_rpc.c:sctp \
+               $(COREPATH)/modules/sipcapture/sipcapture.c:sipcapture \
+               $(COREPATH)/modules/siptrace/siptrace.c:siptrace \
+               $(COREPATH)/modules/sl/sl_stats.c:sl \
+               $(COREPATH)/modules/statsc/statsc_mod.c:statsc \
+               $(COREPATH)/modules/tls/tls_rpc.c:tls \
+               $(COREPATH)/modules/tm/tm.c:tm \
+               $(COREPATH)/modules/tsilo/ts_rpc.c:tsilo \
+               $(COREPATH)/modules/uac/uac_reg.c:uac \
+               $(COREPATH)/modules/uid_domain/domain_rpc.c:uid_domain \
+               $(COREPATH)/modules/uid_gflags/uid_gflags.c:uid_gflags \
+               $(COREPATH)/modules/userblacklist/userblacklist.c:userblacklist \
+               $(COREPATH)/modules/usrloc/ul_rpc.c:usrloc \
+               $(COREPATH)/modules/websocket/websocket.c:websocket \
+               $(COREPATH)/modules/xcap_client/xcap_client.c:xcap_client \
+               $(COREPATH)/modules/xhttp_pi/xhttp_pi.c:xhttp_pi
 
 
 # list of excluded groups
 grp_exclude=pa
 # list of file prefixes to exclude (full path needed)
-file_exclude=$(COREPATH)/modules_s/tls/ \
-                               $(COREPATH)/obsolete
+file_exclude=$(COREPATH)/obsolete
 
 # special per file group overrides
 # format= grp_filename=... ,where filename does not contain the extension
@@ -112,20 +132,26 @@ gcc=gcc
 #-I$(COREPATH)/lib -I$(COREPATH) -I/usr/include/libxml2
 
 # defines used by gcc
-# -D__CPU_i386 -DARCH="i386"
-c_defsX= -D__CPU_x86_64 -D__OS_linux -DSER_VER=3003000 -DPKG_MALLOC -DSHM_MEM  \
-               -DVERSION='\"5.0.0\"' -DARCH='\"x86_64\"' -DOS=linux_ -DOS_QUOTED='\"linux\"' \
-               -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP \
-               -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR \
-               -DUSE_TLS -DTLS_HOOKS -DFAST_LOCK   -DCC_GCC_LIKE_ASM \
-               -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD \
-               -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H \
-               -DHAVE_SCHED_SETSCHEDULER -DHAVE_EPOLL -DUSE_SCTP -DNAME='\"kamailio\"' \
-               -DMOD_NAME='\"rpcmod\"' -DCFG_DIR='\"/tmp/\"'
-
-c_defs=$(subst ^^,='\",$(subst ",\"',$(subst =",^^,$(shell make -s -C ../.. printcdefs))))
+c_defsX=-DNAME='\"kamailio\"' -DVERSION='\"5.1.0-dev3\"' -DARCH='\"x86_64\"' \
+          -DOS='linux_' -DOS_QUOTED='\"linux\"' -DCOMPILER='\"gcc 4.9.2\"' \
+          -D__CPU_x86_64 -D__OS_linux -DSER_VER=5001000 \
+          -DCFG_DIR='\"/usr/local/etc/kamailio/\"' \
+          -DRUN_DIR='\"/var/run/kamailio/\"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP \
+          -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES \
+          -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR \
+          -DWITH_XAVP -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC \
+          -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS \
+          -DMALLOC_STATS -DWITH_AS_SUPPORT -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT \
+          -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 \
+          -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL \
+          -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM \
+          -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DHAVE_EPOLL -DHAVE_SIGIO_RT \
+          -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT
+
+c_defs=$(subst ^^,='\",$(subst ",\"',$(subst =",^^,$(shell make -s -C ../../../src printcdefs))))
 
 c_defs+= -DMOD_NAME='\"rpcgen\"'
+c_defs+= -I$(COREPATH)/modules/app_sqlang/squirrel/include
 
 # common makefile vars used in defs
 LOCALBASE=/usr/local
@@ -152,9 +178,9 @@ get_modiface=$(word 3, $(subst :, ,$(1)))
 
 find_modiface=$(if $(findstring modules,$(1)),$(shell make -s -C $(dir $(1)) printmiface),-DNONE)
 
-# get base file name from file:grp: get_bname(file:grp) 
+# get base file name from file:grp: get_bname(file:grp)
 # => basename(file) without extension (e.g. get_bname(foo/bar.c:x) => bar)
-# 
+#
 get_bname=$(basename $(notdir $(call get_prereq,$(1))))
 
 #get grp from file:grp, using the overrides
@@ -222,7 +248,7 @@ INCLUDES:=
 # evaluate them
 $$(eval $$(call get_make_vars,$$(dir $$(call get_prereq,$(1)))))
 # override COREPATH (we know better)
-COREPATH=../..
+COREPATH=../../../src
 # save the result in a per group e_idefs_<grp_name> var
 $$(eval e_idefs_$$(call get_grp,$(1)):=$$(DEFS) $$(INCLUDES))
 
@@ -346,15 +372,22 @@ $(docbook_output_dir)/rpc_list.xml: Makefile \
        @echo '>' >>$@
        @echo '<book id="rpc_list"'\
                'xmlns:xi="http://www.w3.org/2001/XInclude">' >>$@
-       @echo ' <title>RPC Exports List</title>' >>$@
-       @echo ' <bookinfo><revhistory><revision>' >>$@
-       @echo '         <revnumber>'$(repo_ver)'</revnumber>' >>$@
-       @echo '         <date>'`date -R`'</date>' >>$@
-       @echo '         <revremark>' >>$@
-       @echo "                 Automatically generated by:">>$@
-       @echo "                 $(MAKE) -C doc/rpc_list $(MAKECMDGOALS)" >>$@
-       @echo '         </revremark>' >>$@
-       @echo ' </revision></revhistory></bookinfo>' >>$@
+       @echo ' <title>RPC Commands List</title>' >>$@
+       @echo ' <bookinfo>' >>$@
+       @echo '   <productname class="trade">kamailio.org</productname>' >>$@
+       @echo '   <authorgroup>' >>$@
+       @echo '    <author>' >>$@
+       @echo '      <firstname>Kamailio</firstname>' >>$@
+       @echo '      <surname>Development Team</surname>' >>$@
+       @echo '      <affiliation><orgname>https://www.kamailio.org</orgname></affiliation>' >>$@
+       @echo '      <address>sr-dev@lists.kamailio.org</address>' >>$@
+       @echo '    </author>' >>$@
+       @echo '   </authorgroup>' >>$@
+       @echo '   <copyright>' >>$@
+       @echo '    <year>2008-2017</year>' >>$@
+       @echo '    <holder>Kamailio Project</holder>' >>$@
+       @echo '   </copyright>' >>$@
+       @echo ' </bookinfo>' >>$@
        @$(foreach f,$(flist),\
                echo '          <xi:include'\
                        'href="'$(call get_target,$f).xml'"/>' \