summaryrefslogtreecommitdiff
path: root/netware/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'netware/Makefile.am')
-rw-r--r--netware/Makefile.am29
1 files changed, 25 insertions, 4 deletions
diff --git a/netware/Makefile.am b/netware/Makefile.am
index 714a92195a0..b5de58060f6 100644
--- a/netware/Makefile.am
+++ b/netware/Makefile.am
@@ -52,8 +52,9 @@ link_sources:
done
else
-BUILT_SOURCES = libmysql.imp
-DISTCLEANFILES = $(BUILT_SOURCES)
+BUILT_SOURCES = libmysql.imp init_db.sql test_db.sql
+DISTCLEANFILES = libmysql.imp
+CLEANFILES = init_db.sql test_db.sql
# Create the libmysql.imp from libmysql/libmysql.def
libmysql.imp: $(top_srcdir)/libmysql/libmysql.def
@@ -63,7 +64,7 @@ libmysql.imp: $(top_srcdir)/libmysql/libmysql.def
x>1 {printf(",\n %s", $$1); next} \
/EXPORTS/{x=1}' $(top_srcdir)/libmysql/libmysql.def > libmysql.imp
-EXTRA_DIST= $(BUILT_SOURCES) comp_err.def init_db.sql install_test_db.ncf \
+EXTRA_DIST= $(BUILT_SOURCES) comp_err.def install_test_db.ncf \
libmysql.def \
libmysqlmain.c my_manage.c my_manage.h \
my_print_defaults.def myisam_ftdump.def myisamchk.def \
@@ -77,7 +78,7 @@ EXTRA_DIST= $(BUILT_SOURCES) comp_err.def init_db.sql install_test_db.ncf \
mysqlshow.def mysqltest.def mysqlslap.def mysql_upgrade.def \
perror.def \
mysql_client_test.def \
- replace.def resolve_stack_dump.def resolveip.def test_db.sql \
+ replace.def resolve_stack_dump.def resolveip.def \
static_init_db.sql \
BUILD/apply-patch BUILD/compile-AUTOTOOLS \
BUILD/compile-linux-tools BUILD/compile-netware-END \
@@ -88,6 +89,26 @@ EXTRA_DIST= $(BUILT_SOURCES) comp_err.def init_db.sql install_test_db.ncf \
BUILD/cron-build BUILD/crontab BUILD/knetware.imp \
BUILD/mwasmnlm BUILD/mwccnlm BUILD/mwenv BUILD/mwldnlm \
BUILD/nwbootstrap BUILD/openssl.imp BUILD/save-patch
+
+
+# Build init_db.sql from the files that contain
+# the system tables for this version of MySQL plus any commands
+init_db.sql: $(top_srcdir)/scripts/mysql_system_tables.sql \
+ $(top_srcdir)/scripts/mysql_system_tables_data.sql
+ @echo "Building $@";
+ @echo "CREATE DATABASE mysql;" > $@;
+ @echo "CREATE DATABASE test;" >> $@;
+ @echo "use mysql;" >> $@;
+ @cat $(top_srcdir)/scripts/mysql_system_tables.sql \
+ $(top_srcdir)/scripts/mysql_system_tables_fix.sql >> $@;
+
+# Build test_db.sql from init_db.sql plus
+# some test data
+test_db.sql: init_db.sql $(top_srcdir)/scripts/mysql_test_data_timezone.sql
+ @echo "Building $@";
+ @cat init_db.sql \
+ $(top_srcdir)/scripts/mysql_test_data_timezone.sql >> $@;
+
endif
# Don't update the files from bitkeeper