~sergei.glushchenko/percona-xtrabackup/2.0-BT39727-xb-bug1284778

« back to all changes in this revision

Viewing changes to src/Makefile

  • Committer: Laurynas Biveinis
  • Date: 2013-03-08 04:37:16 UTC
  • mto: This revision was merged to the branch mainline in revision 517.
  • Revision ID: laurynas.biveinis@percona.com-20130308043716-uwznyhrzyok7ex61
Add MySQL 5.6 support.
https://blueprints.launchpad.net/percona-xtrabackup/+spec/build-against-mysql-56

- Add new flavor option innodb56 to utils/build.sh and
  test/bootstrap.sh.  Add its synonym 5.6 to utils/build.sh only.
  Build for 5.6 using the embedded server(libmysqld) instead of
  cherry-picking several subdirectories.

- Add new target 5.6 to src/Makefile.  Link xbstream with a C++
  compiler.

- Add patches/innodb56.patch, based on innodb55.patch, developed on
  MySQL 5.6.10.

- src/xtrabackup.cc: account for MySQL 5.6 InnoDB internal API
  changes.  Replace LSN64 and some of ib_uint64_t types with
  5.6-introduced lsn_t.  Use 5.6-introduced LSN_PF and IB_UINT64
  macros for lsn_t and ib_uint64_t printf format specifiers.  Rename
  local variables that are conflicting with libmysqld symbols.
  Provide implementation of open_or_create_log_file() that was removed
  in MySQL 5.6.  Fixup format specifiers in xtrabackup_stats_level().

- Support additional mysqld flags in test/inc/common.sh at bootstrap
  time, set through MYSQLD_EXTRA_ARGS.

- Adjust test/t/bug1062684.sh and test/t/bug891496.sh to work with
  adjusted default new tablespace size in MySQL 5.6.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Makefile to build XtraBackup for Percona Server and different versions of MySQL
2
2
#
3
3
# Syntax:
4
 
# make [5.1|5.5|plugin|xtradb|xtradb55]
 
4
# make [5.1|5.5|5.6|plugin|xtradb|xtradb55]
5
5
#
6
6
# Default is xtradb - to build XtraBackup for Percona Server 5.1
7
7
# xtradb55 - Xtrabackup for Percona Server 5.5
8
8
# 5.1 - XtraBackup for MySQL versions 5.1.* with builtin InnoDB
9
9
# plugin - XtraBackup for MySQL versions 5.1.* with InnoDB plugin
10
10
# 5.5 - XtraBackup for MySQL versions 5.5.*     
 
11
# 5.6 - XtraBackup for MySQL version 5.6
11
12
 
12
13
LIBS += -lpthread
13
14
DEFS = -DUNIV_LINUX -DMYSQL_SERVER
109
110
        sed -e 's/C_DEFINES = //')
110
111
5.5: $(TARGET) xbstream
111
112
 
 
113
# XtraBackup for MySQL 5.6
 
114
5.6: INC = $(COMMON_INC) $(addprefix -isystem$(MYSQL_ROOT_DIR)/, \
 
115
        include sql storage/innobase/include sql)
 
116
5.6: INNODBOBJS =
 
117
 
 
118
ifeq "$(wildcard $(MYSQL_ROOT_DIR)/zlib/.libs/libzlt.a)" ""
 
119
5.6: LIBZ= -lz
 
120
else
 
121
5.6: LIBZ= $(MYSQL_ROOT_DIR)/zlib/.libs/libzlt.a
 
122
endif
 
123
 
 
124
5.6: MYSQLOBJS = $(MYSQL_ROOT_DIR)/libmysqld/libmysqld.a
 
125
ifeq ($(shell uname -s),Linux)
 
126
5.6: LIBS += -laio -ldl -lcrypt
 
127
endif
 
128
5.6: TARGET := xtrabackup_innodb56
 
129
# In CMake server builds it is important to build with exactly the same preprocessor flags
 
130
# as were used to build InnoDB
 
131
5.6: DEFS = $(shell grep CXX_DEFINES \
 
132
        $(MYSQL_ROOT_DIR)/storage/innobase/CMakeFiles/innobase.dir/flags.make | \
 
133
        sed -e 's/CXX_DEFINES = //')
 
134
5.6: $(TARGET) xbstream
 
135
 
112
136
# XtraBackup for XtraDB 
113
137
xtradb: INC = $(COMMON_INC) $(addprefix -isystem$(MYSQL_ROOT_DIR)/, \
114
138
        include storage/innodb_plugin/include)
185
209
        $(CC) $(CFLAGS) $(INC) $(DEFS) -c $< -o $@
186
210
 
187
211
xbstream: $(XBSTREAMOBJS) $(MYSQLOBJS) local.o
188
 
        $(CC) $(CFLAGS) $^ $(INC) $(MYSQLOBJS) $(LIBS) -o $@
 
212
        $(CXX) $(CXXFLAGS) $^ $(INC) $(MYSQLOBJS) $(LIBS) -o $@
189
213
 
190
214
xtrabackup.o: xtrabackup.cc xb_regex.h
191
215