Makefile.am 5.04 KB
Newer Older
1
#  Copyright (c) 2002 Novell, Inc. All Rights Reserved.
unknown's avatar
unknown committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15
#
#  This program is free software; you can redistribute it and/or modify 
#  it under the terms of the GNU General Public License as published by 
#  the Free Software Foundation; either version 2 of the License, or 
#  (at your option) any later version. 
#
#  This program is distributed in the hope that it will be useful, 
#  but WITHOUT ANY WARRANTY; without even the implied warranty of 
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
#  GNU General Public License for more details. 
#
#  You should have received a copy of the GNU General Public License 
#  along with this program; if not, write to the Free Software 
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16

17
if HAVE_NETWARE
unknown's avatar
unknown committed
18
INCLUDES =			-I$(top_builddir)/include -I$(top_srcdir)/include -I..
19 20
LDADD =				@CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
				../dbug/libdbug.a ../strings/libmystrings.a
unknown's avatar
unknown committed
21 22 23 24 25
bin_PROGRAMS =			mysqld_safe mysql_install_db mysql_test_run libmysql
mysqld_safe_SOURCES=		mysqld_safe.c my_manage.c
mysql_install_db_SOURCES=	mysql_install_db.c my_manage.c
mysql_test_run_SOURCES=		mysql_test_run.c my_manage.c
libmysql_SOURCES=		libmysqlmain.c
26 27
libmysql_LDADD =		../libmysql/.libs/libmysqlclient.a \
				@openssl_libs@ @yassl_libs@
28 29 30 31 32

netware_build_files =           client/mysql.def client/mysqladmin.def \
                                client/mysqlbinlog.def client/mysqlcheck.def \
                                client/mysqldump.def client/mysqlimport.def \
                                client/mysqlshow.def client/mysqltest.def \
33
                                client/mysqlslap.def client/mysql_upgrade.def \
unknown's avatar
unknown committed
34
                                sql/mysqld.def extra/mysql_waitpid.def \
unknown's avatar
unknown committed
35
				tests/mysql_client_test.def \
36
                                extra/my_print_defaults.def \
37
                                extra/perror.def extra/replace.def \
38
                                extra/resolveip.def extra/comp_err.def \
unknown's avatar
unknown committed
39 40 41 42 43 44
                                extra/resolve_stack_dump.def \
                                libmysqld/libmysqld.def \
                                storage/myisam/myisamchk.def \
                                storage/myisam/myisamlog.def \
                                storage/myisam/myisampack.def \
                                storage/myisam/myisam_ftdump.def
45

46 47 48 49 50
BUILT_SOURCES =                 link_sources init_db.sql test_db.sql
CLEANFILES = 			$(BUILT_SOURCES)

all: $(BUILT_SOURCES)

51 52
link_sources:
	for f in $(netware_build_files); do \
unknown's avatar
unknown committed
53
	  rm -f ../$$f; \
54
	  org=`basename $$f`; \
unknown's avatar
unknown committed
55 56
	  @LN_CP_F@ $(srcdir)/$$org ../$$f; \
	done
57 58
	echo timestamp > link_sources

59
else
unknown's avatar
unknown committed
60

61
BUILT_SOURCES =                 libmysql.imp init_db.sql test_db.sql
62 63
DISTCLEANFILES =                libmysql.imp
CLEANFILES =                    init_db.sql test_db.sql
unknown's avatar
unknown committed
64 65 66

# Create the libmysql.imp from libmysql/libmysql.def
libmysql.imp: $(top_srcdir)/libmysql/libmysql.def
unknown's avatar
unknown committed
67
	$(AWK) 'BEGIN{x=0;} \
unknown's avatar
unknown committed
68 69 70 71 72
             END{printf("\n");} \
             x==1 {printf(" %s",$$1); x++; next} \
             x>1 {printf(",\n %s", $$1); next} \
             /EXPORTS/{x=1}' $(top_srcdir)/libmysql/libmysql.def > libmysql.imp

73
EXTRA_DIST=	$(BUILT_SOURCES) comp_err.def install_test_db.ncf \
unknown's avatar
unknown committed
74
		libmysql.def \
75 76 77
		libmysqlmain.c my_manage.c my_manage.h \
		my_print_defaults.def myisam_ftdump.def myisamchk.def \
		myisamlog.def myisampack.def mysql.def mysql.xdc \
78
		mysql_fix_privilege_tables.pl \
79 80 81 82 83
		mysql_install_db.c mysql_install_db.def \
		mysql_secure_installation.pl mysql_test_run.c \
		mysql_test_run.def mysql_waitpid.def mysqladmin.def \
		mysqlbinlog.def mysqlcheck.def mysqld.def \
		mysqld_safe.c mysqld_safe.def mysqldump.def mysqlimport.def \
84 85
		mysqlshow.def mysqltest.def mysqlslap.def mysql_upgrade.def \
		perror.def \
unknown's avatar
unknown committed
86
		mysql_client_test.def \
87
		replace.def resolve_stack_dump.def resolveip.def \
88
		static_init_db.sql init_db.sql test_db.sql \
89 90 91 92 93 94 95 96 97
		BUILD/apply-patch BUILD/compile-AUTOTOOLS \
		BUILD/compile-linux-tools BUILD/compile-netware-END \
		BUILD/compile-netware-START BUILD/compile-netware-all\
		BUILD/compile-netware-debug BUILD/compile-netware-max \
		BUILD/compile-netware-max-debug BUILD/compile-netware-src \
		BUILD/compile-netware-standard BUILD/create-patch \
		BUILD/cron-build BUILD/crontab BUILD/knetware.imp \
		BUILD/mwasmnlm BUILD/mwccnlm BUILD/mwenv BUILD/mwldnlm \
		BUILD/nwbootstrap BUILD/openssl.imp BUILD/save-patch
98

99 100
endif

101 102 103 104

# 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 \
105
	     $(top_srcdir)/scripts/mysql_system_tables_data.sql
106 107 108 109
	@echo "Building $@";
	@echo "CREATE DATABASE mysql;" > $@;
	@echo "CREATE DATABASE test;" >> $@;
	@echo "use mysql;" >> $@;
110
	@cat $(top_srcdir)/scripts/mysql_system_tables.sql >> $@;
111 112 113 114 115 116

# 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 \
117
	     $(top_srcdir)/scripts/mysql_test_data_timezone.sql  > $@;
118 119 120

# Don't update the files from bitkeeper
%::SCCS/s.%