Commit 115fec58 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix generation of bison output for out-of-source builds.

Make sure the #line directives contain existing source file  sql_yacc.yy.
Before the patch #line directive would point out to non-existing path in
current build directory.
parent 78084fa7
...@@ -197,6 +197,7 @@ sql/lex_token.h ...@@ -197,6 +197,7 @@ sql/lex_token.h
sql/gen_lex_token sql/gen_lex_token
sql/gen_lex_hash sql/gen_lex_hash
sql/lex_hash.h sql/lex_hash.h
sql/myskel.m4
sql/mysql_tzinfo_to_sql sql/mysql_tzinfo_to_sql
sql/mysqld sql/mysqld
sql/sql_builtin.cc sql/sql_builtin.cc
......
...@@ -356,12 +356,13 @@ IF (NOT BISON_FOUND) ...@@ -356,12 +356,13 @@ IF (NOT BISON_FOUND)
MESSAGE(FATAL_ERROR ${ERRMSG}) MESSAGE(FATAL_ERROR ${ERRMSG})
ENDIF() ENDIF()
ELSE() ELSE()
CONFIGURE_FILE(myskel.m4.in myskel.m4)
BISON_TARGET(gen_mariadb_cc_hh ${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.yy BISON_TARGET(gen_mariadb_cc_hh ${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.yy
${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.cc ${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.cc
COMPILE_FLAGS "-p MYSQL -S ${CMAKE_CURRENT_SOURCE_DIR}/myskel.m4") COMPILE_FLAGS "-p MYSQL -S ${CMAKE_CURRENT_BINARY_DIR}/myskel.m4")
BISON_TARGET(gen_oracle_cc_hh ${CMAKE_CURRENT_BINARY_DIR}/yy_oracle.yy BISON_TARGET(gen_oracle_cc_hh ${CMAKE_CURRENT_BINARY_DIR}/yy_oracle.yy
${CMAKE_CURRENT_BINARY_DIR}/yy_oracle.cc ${CMAKE_CURRENT_BINARY_DIR}/yy_oracle.cc
COMPILE_FLAGS "-p ORA -S ${CMAKE_CURRENT_SOURCE_DIR}/myskel.m4") COMPILE_FLAGS "-p ORA -S ${CMAKE_CURRENT_BINARY_DIR}/myskel.m4")
ENDIF() ENDIF()
IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR) IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# to refer to the original sql_yacc.yy # to refer to the original sql_yacc.yy
# #
m4_define([b4_syncline], m4_define([b4_syncline],
[b4_sync_start([$1], m4_bpatsubst([$2],[yy_[a-z]+\.yy],sql_yacc.yy))[]dnl [b4_sync_start([$1], m4_bpatsubst([$2],[@CMAKE_CURRENT_BINARY_DIR@/yy_[a-z]+\.yy],@CMAKE_CURRENT_SOURCE_DIR@/sql_yacc.yy))[]dnl
]) ])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment