Skip to content

Commit

Permalink
Rename tarantool.h -> module.h
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbes committed Nov 13, 2015
1 parent 69faa96 commit 4486148
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -49,7 +49,7 @@ src/box/bootstrap.h
src/lua/*.lua.c
src/box/lua/*.lua.c
src/tarantool
src/trivia/tarantool.h
src/trivia/module.h
tarantool-*.tar.gz
test/lib/
test/unit/*.test
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile.API.in
@@ -1,5 +1,5 @@
@INCLUDE = @PROJECT_SOURCE_DIR@/Doxyfile
INPUT = @PROJECT_BINARY_DIR@/src/trivia/tarantool.h
INPUT = @PROJECT_BINARY_DIR@/src/trivia/module.h
OUTPUT_DIRECTORY = @PROJECT_BINARY_DIR@/doc/api/
ENABLED_SECTIONS = public
DISABLE_INDEX = YES
Expand Down
2 changes: 1 addition & 1 deletion FreeBSD/databases/tarantool/pkg-plist
Expand Up @@ -7,7 +7,7 @@ include/tarantool/lua.hpp
include/tarantool/luaconf.h
include/tarantool/luajit.h
include/tarantool/lualib.h
include/tarantool/tarantool.h
include/tarantool/module.h
man/man1/tarantool.1.gz
man/man1/tarantoolctl.1.gz
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
Expand Down
12 changes: 6 additions & 6 deletions cmake/module.cmake
@@ -1,6 +1,6 @@
# A helper function to extract public API
function(rebuild_module_api)
set (dstfile "${CMAKE_CURRENT_BINARY_DIR}/tarantool.h")
set (dstfile "${CMAKE_CURRENT_BINARY_DIR}/module.h")
set (tmpfile "${dstfile}.new")
set (errcodefile "${CMAKE_CURRENT_BINARY_DIR}/errcode.i")
set (headers)
Expand All @@ -20,23 +20,23 @@ function(rebuild_module_api)
set (cflags ${cflags} ${CMAKE_C_SYSROOT_FLAG} ${CMAKE_OSX_SYSROOT})
endif()
add_custom_command(OUTPUT ${dstfile}
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/tarantool_header.h > ${tmpfile}
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/module_header.h > ${tmpfile}
COMMAND cat ${headers} | ${CMAKE_SOURCE_DIR}/extra/apigen >> ${tmpfile}
COMMAND ${CMAKE_C_COMPILER}
${cflags}
-I ${CMAKE_SOURCE_DIR}/src -I ${CMAKE_BINARY_DIR}/src
-E ${CMAKE_SOURCE_DIR}/src/box/errcode.h > ${errcodefile}
COMMAND
grep "enum box_error_code" ${errcodefile} >> ${tmpfile}
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/tarantool_footer.h >> ${tmpfile}
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/module_footer.h >> ${tmpfile}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${tmpfile} ${dstfile}
COMMAND ${CMAKE_COMMAND} -E remove ${errcodefile} ${tmpfile}
DEPENDS ${srcfiles} ${CMAKE_SOURCE_DIR}/src/box/errcode.h
${CMAKE_CURRENT_SOURCE_DIR}/tarantool_header.h
${CMAKE_CURRENT_SOURCE_DIR}/tarantool_footer.h
${CMAKE_CURRENT_SOURCE_DIR}/module_header.h
${CMAKE_CURRENT_SOURCE_DIR}/module_footer.h
)

add_custom_target(api ALL DEPENDS ${srcfiles} ${dstfile})
install(FILES ${dstfile} DESTINATION ${MODULE_INCLUDEDIR})
endfunction()
set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/tarantool.h" PROPERTIES GENERATED HEADER_FILE_ONLY)
set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/module.h" PROPERTIES GENERATED HEADER_FILE_ONLY)
2 changes: 1 addition & 1 deletion doc/sphinx/reference/capi.rst
Expand Up @@ -2,5 +2,5 @@
Module C API
-------------------------------------------------------------------------------

.. doxygenfile:: tarantool.h
.. doxygenfile:: module.h
:project: api
2 changes: 1 addition & 1 deletion extra/rpm/tarantool.rpm.spec.in
Expand Up @@ -227,7 +227,7 @@ chkconfig --del tarantool
"%{_includedir}/tarantool/lua.hpp"
"%{_includedir}/tarantool/luajit.h"
"%{_includedir}/tarantool/lualib.h"
"%{_includedir}/tarantool/tarantool.h"
"%{_includedir}/tarantool/module.h"

%files common
%defattr(-,root,root,-)
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/app/module_api.c
@@ -1,5 +1,5 @@
#include <stdbool.h>
#include <tarantool.h>
#include <module.h>

#include <small/ibuf.h>

Expand Down
2 changes: 1 addition & 1 deletion test/box/function1.c
@@ -1,5 +1,5 @@
#include <stdbool.h>
#include "tarantool.h"
#include "module.h"

#include <stdio.h>

Expand Down

0 comments on commit 4486148

Please sign in to comment.