Browse code

core: Makefiles - catch unavailbility of docbook2man tool

- print an info message instead of ending up in execution error of
Makefile rule trying to generate man pages from xml files
- DOCBOOK var renamed to DOCBOOKMAN to be more suggestive for its
purpose
- related to GH #1624

Daniel-Constantin Mierla authored on 31/08/2018 10:43:44
Showing 1 changed files
... ...
@@ -43,8 +43,8 @@ sh_err_fail=
43 43
 try_err=$(1) ; if [ $$? != 0 ]; then echo ERROR: $(1) failed ; fi
44 44
 endif
45 45
 
46
-DOCBOOK = $(shell which docbook2x-man 2>/dev/null)
47
-ifeq ($(DOCBOOK),)
48
-	DOCBOOK = $(shell which db2x_docbook2man 2>/dev/null)
46
+DOCBOOKMAN = $(shell which docbook2x-man 2>/dev/null)
47
+ifeq ($(DOCBOOKMAN),)
48
+	DOCBOOKMAN = $(shell which db2x_docbook2man 2>/dev/null)
49 49
 endif
50 50
 
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
new file mode 100644
... ...
@@ -0,0 +1,50 @@
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
+