Module: sip-router
Branch: master
Commit: 4d6f1790baffc161d65dd9bae6709fa45d95e00f
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4d6f1790baffc161d65dd9bae6709fa45d95e00f

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Fri Nov 25 23:48:10 2011 +0100

doc/rpc_list: take the C compile flags from core makefile

---

 doc/rpc_list/Makefile |   83 +++++++++++++++++++++++++++----------------------
 1 files changed, 46 insertions(+), 37 deletions(-)

diff --git a/doc/rpc_list/Makefile b/doc/rpc_list/Makefile
index 1ec6911..762707a 100644
--- a/doc/rpc_list/Makefile
+++ b/doc/rpc_list/Makefile
@@ -17,38 +17,38 @@ docbook_output_dir=docbook
 #   make diff-list   (which obeys grp_exclude and file_exclude)
 # or completely regenerated by replacing files_list with the output of:
 #   make gen-files-list
+#
 files_list= \
-       $(COREPATH)/core_cmd.c:core \
-       $(COREPATH)/modules/cfg_rpc/cfg_rpc.c:cfg_rpc \
-       $(COREPATH)/modules/counters/counters.c:counters \
-       $(COREPATH)/modules/ctl/ctl.c:ctl \
-       $(COREPATH)/modules/db_flatstore/flat_rpc.c:db_flatstore \
-       $(COREPATH)/modules/debugger/debugger_api.c:debugger \
-       $(COREPATH)/modules/dialplan/dialplan.c:dialplan \
-       $(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/prefix_route/pr_rpc.c:prefix_route \
-       $(COREPATH)/modules/ratelimit/ratelimit.c:ratelimit \
-       $(COREPATH)/modules/sl/sl_stats.c:sl \
-       $(COREPATH)/modules/tls/tls_rpc.c:tls \
-       $(COREPATH)/modules/tm/tm.c:tm \
-       $(COREPATH)/modules_k/dialog/dialog.c:dialog \
-       $(COREPATH)/modules_k/dispatcher/dispatcher.c:dispatcher \
-       $(COREPATH)/modules_k/domain/domain_mod.c:domain \
-       $(COREPATH)/modules_k/htable/htable.c:htable \
-       $(COREPATH)/modules_k/kex/pkg_stats.c:kex \
-       $(COREPATH)/modules_k/uac/uac_reg.c:uac \
-       $(COREPATH)/modules_k/usrloc/ul_rpc.c:usrloc \
-       $(COREPATH)/modules_s/cpl-c/cpl_rpc.c:cpl-c \
-       $(COREPATH)/modules_s/dispatcher/ds_rpc.c:dispatcher_s \
-       $(COREPATH)/modules_s/domain/domain_rpc.c:domain_s \
-       $(COREPATH)/modules_s/gflags/gflags.c:gflags \
-       $(COREPATH)/modules_s/pdt/pdt.c:pdt \
-       $(COREPATH)/modules_s/pike/rpc.c:pike \
-       $(COREPATH)/modules_s/presence_b2b/rpc.c:presence_b2b \
-       $(COREPATH)/modules_s/usrloc/ul_rpc.c:usrloc_s
-
+                       $(COREPATH)/core_cmd.c:core \
+                       $(COREPATH)/modules/cfg_rpc/cfg_rpc.c:cfg_rpc \
+                       $(COREPATH)/modules/counters/counters.c:counters \
+                       $(COREPATH)/modules/ctl/ctl.c:ctl \
+                       
$(COREPATH)/modules/db_flatstore/flat_rpc.c:db_flatstore \
+                       $(COREPATH)/modules/debugger/debugger_api.c:debugger \
+                       $(COREPATH)/modules/dialplan/dialplan.c:dialplan \
+                       $(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/prefix_route/pr_rpc.c:prefix_route \
+                       $(COREPATH)/modules/ratelimit/ratelimit.c:ratelimit \
+                       $(COREPATH)/modules/sl/sl_stats.c:sl \
+                       $(COREPATH)/modules/tls/tls_rpc.c:tls \
+                       $(COREPATH)/modules/tm/tm.c:tm \
+                       $(COREPATH)/modules_k/dialog/dialog.c:dialog \
+                       
$(COREPATH)/modules_k/dispatcher/dispatcher.c:dispatcher \
+                       $(COREPATH)/modules_k/domain/domain_mod.c:domain \
+                       $(COREPATH)/modules_k/htable/htable.c:htable \
+                       $(COREPATH)/modules_k/kex/pkg_stats.c:kex \
+                       $(COREPATH)/modules_k/uac/uac_reg.c:uac \
+                       $(COREPATH)/modules_k/usrloc/ul_rpc.c:usrloc \
+                       $(COREPATH)/modules_s/cpl-c/cpl_rpc.c:cpl-c \
+                       $(COREPATH)/modules_s/dispatcher/ds_rpc.c:dispatcher \
+                       $(COREPATH)/modules_s/domain/domain_rpc.c:domain \
+                       $(COREPATH)/modules_s/gflags/gflags.c:gflags \
+                       $(COREPATH)/modules_s/pdt/pdt.c:pdt \
+                       $(COREPATH)/modules_s/pike/rpc.c:pike \
+                       $(COREPATH)/modules_s/presence_b2b/rpc.c:presence_b2b \
+                       $(COREPATH)/modules_s/usrloc/ul_rpc.c:usrloc
 
 # list of excluded groups
 grp_exclude=pa
@@ -79,15 +79,18 @@ gcc=gcc
 #-I$(COREPATH)/lib -I$(COREPATH) -I/usr/include/libxml2
 
 # defines used by gcc
-c_defs=-D__CPU_i386 -D__OS_linux -DSER_VER=2099099 -DPKG_MALLOC -DSHM_MEM  \
+# -D__CPU_i386 -DARCH="i386"
+c_defsX= -D__CPU_x86_64 -D__OS_linux -DSER_VER=3003000 -DPKG_MALLOC -DSHM_MEM  
\
+               -DVERSION='\"3.3.0-dev2\"' -DARCH='\"x86_64\"' -DOS=linux_ 
-DOS_QUOTED='\"linux\"' \
                -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -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='\"ser\"' \
-               -DVERSION='\"2.99.99-pre3\"' -DARCH='\"i386\"' 
-DOS_QUOTED='\"linux\"'
+               -DCFG_DIR='\"/tmp/\"'
 
+c_defs=$(subst ^^,='\",$(subst ",\"',$(subst =",^^,$(shell make -s -C ../.. 
printcdefs))))
 
 # common makefile vars used in defs
 LOCALBASE=/usr/local
@@ -101,7 +104,7 @@ flist=$(call filter_files,$(files_list))
 
 # throws an error if input is not in the format filename:grp
 check_fname_grp=$(if $(filter-out 2,$(words $(subst :, ,$(1)))),\
-                                       $(error bad format "$(1)", it should be 
filename:grp))
+       $(error bad format "$(1)", it should be filename:grp))
 
 # get prereq from file:grp (get_prereq(file:grp) => file)
 get_prereq=$(firstword $(subst :, ,$(1)))
@@ -110,7 +113,9 @@ get_prereq=$(firstword $(subst :, ,$(1)))
 get_listed_grp=$(word 2, $(subst :, ,$(1)))
 
 # get module interface define
-get_modiface=$(shell make -C $(shell dirname $(1)) printmiface)
+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) 
 # => basename(file) without extension (e.g. get_bname(foo/bar.c:x) => bar)
@@ -194,14 +199,14 @@ $(txt_output_dir)/$$(call get_target,$(1)).txt: \
                                                                $$(call 
get_prereq,$(1)) Makefile $(CFG2TXT)
        $(CFG2TXT) --file $$< --$(force_grp)grp=$$(call get_grp,$(1)) \
                --gcc="$(gcc)" --txt \
-               --defs="$(c_defs) $$(e_idefs_$$(call get_grp,$(1)))" \
+               --defs="$(c_defs) $$(call get_modiface,$(1)) $$(e_idefs_$$(call 
get_grp,$(1)))" \
                > "$$@" || (rm -f "$$@"; exit 1)
 
 $(docbook_output_dir)/$$(call get_target,$(1)).xml: \
                                                                $$(call 
get_prereq,$(1)) Makefile $(CFG2TXT)
        $(CFG2DOCBOOK) --file $$< --$(force_grp)grp=$$(call get_grp,$(1)) \
                --gcc="$(gcc)" --docbook \
-               --defs="$(c_defs) $$(call get_modiface,$(1)) $$(e_idefs_$$(call 
get_grp,$(1)))" \
+               --defs="$(c_defs) $$(e_idefs_$$(call get_grp,$(1)))" \
                > "$$@" || (rm -f "$$@"; exit 1)
 
 
@@ -339,6 +344,10 @@ gen-file-list gen-files-list gen_files_list:
        @$(foreach f,$(call subst_corepath,$(call sort_files,$(f_found_lst))),\
                echo "$f \\";)
 
+print-modifaces:
+       @$(foreach f,$(call sort_files,$(f_found_lst)),\
+               echo "$(call subst_corepath,$(f)):$(call find_modiface, $(f)) 
\\";)
+
 .PHONY: check-list
 .PHONY: update-list
 .PHONY: diff-list


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to