Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,50 +0,0 @@
1
-# Kamailio build system
2
-#
3
-# shared functions 
4
-#
5
-#
6
-#
7
-
8
-escape_values=$(subst $$,\$$,$(subst ",\", $(1)))
9
-
10
-# generates echo "$(1)=escape($(1))"
11
-cfg_gen_var=echo "$(1)=$(call escape_values,$($(1)))"
12
-
13
-# similar to cfg_gen_var, but for FOO=1 var=$(FOO)
14
-# it would generate "echo var=$(FOO)" and not "echo var=1"
15
-cfg_gen_var2=echo "$(1)=$(call escape_values,$(value $(1)))"
16
-
17
-# generate a var from itself concatenated with another one
18
-cfg_gen_var3=echo "$(1)=$(call escape_values,$(value $(1))) \$$($(2))"
19
-
20
-# generates echo "$(1)=escape($(1)) >> $(2)"
21
-cfg_save_var=$(call cfg_gen_var,$(1)) >>$(2);
22
-# same as above but uses cfg_gen_var2
23
-cfg_save_var2=$(call cfg_gen_var2,$(1)) >>$(2);
24
-# concatenate another var to first var
25
-cfg_save_var3=$(call cfg_gen_var3,$(1),$(2)) >>$(3);
26
-
27
-# map function $(1) on variable list $($(2)) (the function is used with only
28
-# one arg)
29
-mapf1=$(foreach v,$($(2)),$(call $(1),$v))
30
-# map function $(1) on variable list $($(2)), passing also $(3) as second
31
-# arg
32
-mapf2=$(foreach v,$($(2)),$(call $(1),$v,$(3)))
33
-
34
-
35
-#cfg_fixed_to_file=$(call mapf2,cfg_save_var,saved_fixed_vars,$(1))
36
-#cfg_chg_to_file=$(call mapf2,cfg_save_var2,saved_chg_vars,$(1))
37
-
38
-ifeq (${err_fail},1)
39
-sh_err_fail=set -e;
40
-try_err=$(1) ; if [ $$? != 0 ]; then echo ERROR: $(1) failed ;  exit 1 ; fi
41
-else
42
-sh_err_fail=
43
-try_err=$(1) ; if [ $$? != 0 ]; then echo ERROR: $(1) failed ; fi
44
-endif
45
-
46
-DOCBOOK = $(shell which docbook2x-man 2>/dev/null)
47
-ifeq ($(DOCBOOK),)
48
-	DOCBOOK = $(shell which db2x_docbook2man 2>/dev/null)
49
-endif
50
-
Browse code

build system: Remove SVN ID and history

Olle E. Johansson authored on 10/01/2015 07:57:18
Showing 1 changed files
... ...
@@ -1,12 +1,8 @@
1
-#
2
-# $Id$
1
+# Kamailio build system
3 2
 #
4 3
 # shared functions 
5 4
 #
6 5
 #
7
-# History:
8
-# --------
9
-#  2008-06-27  initial version (andrei)
10 6
 #
11 7
 
12 8
 escape_values=$(subst $$,\$$,$(subst ",\", $(1)))
Browse code

Makefile: updated the groups of modules

- they are kept in Makefile.groups to keep main Makefile cleaner
- most of modules are in lists groupped mostly by dependency
- compilation and packaging groups are build using the lists
- exclude_modules list is automatically built from all modules without
those part of lists with external dependencies

Daniel-Constantin Mierla authored on 04/03/2013 15:09:36
Showing 1 changed files
... ...
@@ -18,10 +18,15 @@ cfg_gen_var=echo "$(1)=$(call escape_values,$($(1)))"
18 18
 # it would generate "echo var=$(FOO)" and not "echo var=1"
19 19
 cfg_gen_var2=echo "$(1)=$(call escape_values,$(value $(1)))"
20 20
 
21
+# generate a var from itself concatenated with another one
22
+cfg_gen_var3=echo "$(1)=$(call escape_values,$(value $(1))) \$$($(2))"
23
+
21 24
 # generates echo "$(1)=escape($(1)) >> $(2)"
22 25
 cfg_save_var=$(call cfg_gen_var,$(1)) >>$(2);
23 26
 # same as above but uses cfg_gen_var2
24 27
 cfg_save_var2=$(call cfg_gen_var2,$(1)) >>$(2);
28
+# concatenate another var to first var
29
+cfg_save_var3=$(call cfg_gen_var3,$(1),$(2)) >>$(3);
25 30
 
26 31
 # map function $(1) on variable list $($(2)) (the function is used with only
27 32
 # one arg)
Browse code

Makefiles: Updated Makefiles to use db2x_docbook2man when docbook2x-man is not installed

- db2x_docbook2man is what Fedora contains

Peter Dunkley authored on 20/10/2012 00:23:51
Showing 1 changed files
... ...
@@ -42,3 +42,8 @@ sh_err_fail=
42 42
 try_err=$(1) ; if [ $$? != 0 ]; then echo ERROR: $(1) failed ; fi
43 43
 endif
44 44
 
45
+DOCBOOK = $(shell which docbook2x-man 2>/dev/null)
46
+ifeq ($(DOCBOOK),)
47
+	DOCBOOK = $(shell which db2x_docbook2man 2>/dev/null)
48
+endif
49
+
Browse code

- added install-modules-man and made make install also imake & install the modules man pages (if present)

- added try_err function to Makefile.shared, for checking and reporting if
a shell command failed (if err_fail is 1 it will also force an error return
from the current makefile subshell)

- install-share, install-utils, install-modules-doc, install-modules-man will
now fail if err_fail=1 (default) and one of the individual file install
fails. Closes SER-389.

Andrei Pelinescu-Onciul authored on 28/06/2008 20:16:36
Showing 1 changed files
... ...
@@ -33,3 +33,12 @@ mapf2=$(foreach v,$($(2)),$(call $(1),$v,$(3)))
33 33
 
34 34
 #cfg_fixed_to_file=$(call mapf2,cfg_save_var,saved_fixed_vars,$(1))
35 35
 #cfg_chg_to_file=$(call mapf2,cfg_save_var2,saved_chg_vars,$(1))
36
+
37
+ifeq (${err_fail},1)
38
+sh_err_fail=set -e;
39
+try_err=$(1) ; if [ $$? != 0 ]; then echo ERROR: $(1) failed ;  exit 1 ; fi
40
+else
41
+sh_err_fail=
42
+try_err=$(1) ; if [ $$? != 0 ]; then echo ERROR: $(1) failed ; fi
43
+endif
44
+
Browse code

- new files needed by the improved build system

Andrei Pelinescu-Onciul authored on 28/06/2008 00:36:56
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,35 @@
1
+#
2
+# $Id$
3
+#
4
+# shared functions 
5
+#
6
+#
7
+# History:
8
+# --------
9
+#  2008-06-27  initial version (andrei)
10
+#
11
+
12
+escape_values=$(subst $$,\$$,$(subst ",\", $(1)))
13
+
14
+# generates echo "$(1)=escape($(1))"
15
+cfg_gen_var=echo "$(1)=$(call escape_values,$($(1)))"
16
+
17
+# similar to cfg_gen_var, but for FOO=1 var=$(FOO)
18
+# it would generate "echo var=$(FOO)" and not "echo var=1"
19
+cfg_gen_var2=echo "$(1)=$(call escape_values,$(value $(1)))"
20
+
21
+# generates echo "$(1)=escape($(1)) >> $(2)"
22
+cfg_save_var=$(call cfg_gen_var,$(1)) >>$(2);
23
+# same as above but uses cfg_gen_var2
24
+cfg_save_var2=$(call cfg_gen_var2,$(1)) >>$(2);
25
+
26
+# map function $(1) on variable list $($(2)) (the function is used with only
27
+# one arg)
28
+mapf1=$(foreach v,$($(2)),$(call $(1),$v))
29
+# map function $(1) on variable list $($(2)), passing also $(3) as second
30
+# arg
31
+mapf2=$(foreach v,$($(2)),$(call $(1),$v,$(3)))
32
+
33
+
34
+#cfg_fixed_to_file=$(call mapf2,cfg_save_var,saved_fixed_vars,$(1))
35
+#cfg_chg_to_file=$(call mapf2,cfg_save_var2,saved_chg_vars,$(1))