Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndzs Auders <andzs.auders@zabbix.com>2017-11-15 11:46:36 +0300
committerAndzs Auders <andzs.auders@zabbix.com>2017-11-15 11:46:36 +0300
commit250017fabd9a8bdd1bdfb57b1eaddcceab634dc9 (patch)
tree39f9ccd45d75649d382d93b29425107a9a7f2fe2 /Makefile.am
parent4e0ac607c028fade06f3eaa59a4b17bd3203290b (diff)
parentbc2dc66a93c61ddda9bedd3b3e2e0b200e3b5c20 (diff)
.......... [ZBXNEXT-4139] updated latest from /trunk; no conflicts
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am50
1 files changed, 38 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index f707b1f6862..aba614b7331 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,30 +34,38 @@ dist-hook:
rm -f $(top_distdir)/sass/*.html
rm -rf $(top_distdir)/sass/img_source
+if DBSCHEMA
dbschema_ibm_db2:
- create/bin/gen_data.pl ibm_db2 > database/ibm_db2/data.sql
- create/bin/gen_schema.pl ibm_db2 > database/ibm_db2/schema.sql
+ cd database/ibm_db2 && \
+ $(MAKE) $(AM_MAKEFLAGS) data.sql && \
+ $(MAKE) $(AM_MAKEFLAGS) schema.sql
dbschema_mysql:
- create/bin/gen_data.pl mysql > database/mysql/data.sql
- create/bin/gen_schema.pl mysql > database/mysql/schema.sql
+ cd database/mysql && \
+ $(MAKE) $(AM_MAKEFLAGS) data.sql && \
+ $(MAKE) $(AM_MAKEFLAGS) schema.sql
dbschema_oracle:
- create/bin/gen_data.pl oracle > database/oracle/data.sql
- create/bin/gen_schema.pl oracle > database/oracle/schema.sql
+ cd database/oracle && \
+ $(MAKE) $(AM_MAKEFLAGS) data.sql && \
+ $(MAKE) $(AM_MAKEFLAGS) schema.sql
dbschema_postgresql:
- create/bin/gen_data.pl postgresql > database/postgresql/data.sql
- create/bin/gen_schema.pl postgresql > database/postgresql/schema.sql
+ cd database/postgresql && \
+ $(MAKE) $(AM_MAKEFLAGS) data.sql && \
+ $(MAKE) $(AM_MAKEFLAGS) schema.sql
dbschema_sqlite3:
- create/bin/gen_data.pl sqlite3 > database/sqlite3/data.sql
- create/bin/gen_schema.pl sqlite3 > database/sqlite3/schema.sql
+ cd database/sqlite3 && \
+ $(MAKE) $(AM_MAKEFLAGS) data.sql && \
+ $(MAKE) $(AM_MAKEFLAGS) schema.sql
dbschema_c:
- create/bin/gen_schema.pl c > src/libs/zbxdbhigh/dbschema.c
+ cd src/libs/zbxdbhigh && \
+ $(MAKE) $(AM_MAKEFLAGS) dbschema.c
dbschema: dbschema_ibm_db2 dbschema_mysql dbschema_oracle dbschema_postgresql dbschema_sqlite3 dbschema_c
+endif
gettext:
frontends/php/locale/make_mo.sh
@@ -97,4 +105,22 @@ TESTDIR = src
test:
cd $(TESTDIR) && $(MAKE) $(AM_MAKEFLAGS) test
-.PHONY: test
+## cmocka test support
+if ZBXCMOCKA
+WRAP_DB_FUNCS = \
+ -Wl,--wrap=zbx_db_vselect \
+ -Wl,--wrap=zbx_db_fetch \
+ -Wl,--wrap=__zbx_DBexecute \
+ -Wl,--wrap=DBbegin \
+ -Wl,--wrap=DBcommit \
+ -Wl,--wrap=DBexecute_multiple_query \
+ -Wl,--wrap=DBfree_result
+
+tests:
+ $(MAKE) $(AM_MAKEFLAGS) && \
+ cd tests && \
+ $(MAKE) $(AM_MAKEFLAGS) LDFLAGS="$(LDFLAGS) $(WRAP_DB_FUNCS)" LIBS="$(LIBS) -lcmocka" && \
+ ./tests_run.pl
+endif
+
+.PHONY: test tests