You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by rl...@apache.org on 2018/02/15 11:17:16 UTC
svn commit: r1824295 [1/3] - in /xerces/c/trunk: ./ cmake/ doc/
doc/style/dtd/ src/ src/xercesc/util/ tools/
Author: rleigh
Date: Thu Feb 15 11:17:15 2018
New Revision: 1824295
URL: http://svn.apache.org/viewvc?rev=1824295&view=rev
Log:
Automatically generate versioned documentation and headers
Added:
xerces/c/trunk/doc/Doxyfile.in
xerces/c/trunk/doc/Makefile.am
xerces/c/trunk/doc/style/dtd/entities.ent.in
xerces/c/trunk/src/xercesc/util/Xerces_version_config.hpp.cmake.in
xerces/c/trunk/src/xercesc/util/Xerces_version_config.hpp.in
Removed:
xerces/c/trunk/doc/Doxyfile
xerces/c/trunk/doc/style/dtd/entities.ent
xerces/c/trunk/tools/createdocs.bat
xerces/c/trunk/tools/createdocs.sh
Modified:
xerces/c/trunk/CMakeLists.txt
xerces/c/trunk/Makefile.am
xerces/c/trunk/cmake/XercesDLL.cmake
xerces/c/trunk/configure.ac
xerces/c/trunk/doc/CMakeLists.txt
xerces/c/trunk/doc/source-repository.xml
xerces/c/trunk/src/CMakeLists.txt
xerces/c/trunk/src/Makefile.am
xerces/c/trunk/src/xercesc/util/XercesVersion.hpp
xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.in
xerces/c/trunk/xerces-c.spec
Modified: xerces/c/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/xerces/c/trunk/CMakeLists.txt?rev=1824295&r1=1824294&r2=1824295&view=diff
==============================================================================
--- xerces/c/trunk/CMakeLists.txt (original)
+++ xerces/c/trunk/CMakeLists.txt Thu Feb 15 11:17:15 2018
@@ -50,6 +50,12 @@ foreach(line IN LISTS configure)
string(REGEX REPLACE "^AC_INIT\\(\\[xerces-c\\],\\[(.*)\\]\\)" "\\1" xerces_c_version "${line}")
break()
endforeach()
+file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/configure.ac" configure
+ REGEX "^INTERFACE_VERSION=.*")
+foreach(line IN LISTS configure)
+ string(REGEX REPLACE "^INTERFACE_VERSION=(.*)" "\\1" xerces_c_interface_version "${line}")
+ break()
+endforeach()
message(STATUS "Configuring Apache Xerces-C++ version ${xerces_c_version}")
@@ -68,8 +74,18 @@ set(PACKAGE_STRING "${PACKAGE_NAME} ${PA
set(PACKAGE_BUGREPORT "c-dev@xerces.apache.org")
set(PACKAGE_URL "https://xerces.apache.org/xerces-c/")
+set(VERSION "${PROJECT_VERSION}")
+set(XERCES_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
+set(XERCES_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
+set(XERCES_VERSION_REVISION "${PROJECT_VERSION_PATCH}")
+string(REPLACE "." ";" interface_version_parts "${xerces_c_interface_version}")
+list(GET interface_version_parts 0 INTERFACE_VERSION_MAJOR)
+list(GET interface_version_parts 1 INTERFACE_VERSION_MINOR)
+
+set(INTERFACE_VERSION_D "${INTERFACE_VERSION_MAJOR}.${INTERFACE_VERSION_MINOR}")
+set(INTERFACE_VERSION_U "${INTERFACE_VERSION_MAJOR}_${INTERFACE_VERSION_MINOR}")
+
set(EXTRA_DIST
- version.incl
xerces-c.spec
xerces-c.pc.in
CREDITS
@@ -125,6 +141,14 @@ configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/src/xercesc/util/Xerces_autoconf_config.hpp
@ONLY)
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/xercesc/util/Xerces_version_config.hpp.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/src/xercesc/util/Xerces_version_config.hpp
+ @ONLY)
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/doc/style/dtd/entities.ent.in
+ ${CMAKE_CURRENT_BINARY_DIR}/doc/style/dtd/entities.ent
+ @ONLY)
# Generate pkg-config file
set(pkgconfig-dir "${CMAKE_INSTALL_LIBDIR}/pkgconfig" CACHE STRING "pkg-config installation directory (default ${CMAKE_INSTALL_LIBDIR}/pkgconfig)")
@@ -152,20 +176,18 @@ message(STATUS "")
message(STATUS "Xerces-C++ configuration summary")
message(STATUS "--------------------------------")
message(STATUS "")
-message(STATUS " Version: ${xerces-c_VERSION}")
-message(STATUS " Library version: ${LIB_VER}")
-message(STATUS " Library interface version D: ${LIB_INTERFACE_VER_D}")
-message(STATUS " Library interface version U: ${LIB_INTERFACE_VER_U}")
+message(STATUS " Version: ${xerces-c_VERSION}")
+message(STATUS " Library interface version: ${xerces_c_interface_version}")
message(STATUS "")
-message(STATUS " Installation directory: ${prefix}")
-message(STATUS " C compiler: ${CMAKE_C_COMPILER}")
-message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}")
+message(STATUS " Installation directory: ${prefix}")
+message(STATUS " C compiler: ${CMAKE_C_COMPILER}")
+message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}")
message(STATUS "")
-message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
-message(STATUS " Path delimiters: \"${path_delims}\"")
-message(STATUS " File Manager: ${filemgr}")
-message(STATUS " Mutex Manager: ${mutexmgr}")
-message(STATUS " Transcoder: ${transcoder}")
-message(STATUS " NetAccessor: ${netaccessor}")
-message(STATUS " Message Loader: ${msgloader}")
-message(STATUS " XMLCh type: ${xmlch_type}")
+message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
+message(STATUS " Path delimiters: \"${path_delims}\"")
+message(STATUS " File Manager: ${filemgr}")
+message(STATUS " Mutex Manager: ${mutexmgr}")
+message(STATUS " Transcoder: ${transcoder}")
+message(STATUS " NetAccessor: ${netaccessor}")
+message(STATUS " Message Loader: ${msgloader}")
+message(STATUS " XMLCh type: ${xmlch_type}")
Modified: xerces/c/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/xerces/c/trunk/Makefile.am?rev=1824295&r1=1824294&r2=1824295&view=diff
==============================================================================
--- xerces/c/trunk/Makefile.am (original)
+++ xerces/c/trunk/Makefile.am Thu Feb 15 11:17:15 2018
@@ -1,7 +1,6 @@
-SUBDIRS = src tests samples
+SUBDIRS = doc src tests samples
-EXTRA_DIST = version.incl \
- CMakeLists.txt \
+EXTRA_DIST = CMakeLists.txt \
cmake \
config.h.cmake.in \
xerces-c.spec \
@@ -13,7 +12,6 @@ EXTRA_DIST = version.incl \
NOTICE \
README \
config/pretty-make \
- doc \
reconf \
scripts/createBindingsFormatFromHPP.pl \
scripts/makeStringDefinition.pl \
Modified: xerces/c/trunk/cmake/XercesDLL.cmake
URL: http://svn.apache.org/viewvc/xerces/c/trunk/cmake/XercesDLL.cmake?rev=1824295&r1=1824294&r2=1824295&view=diff
==============================================================================
--- xerces/c/trunk/cmake/XercesDLL.cmake (original)
+++ xerces/c/trunk/cmake/XercesDLL.cmake Thu Feb 15 11:17:15 2018
@@ -43,21 +43,3 @@ else()
set(XERCES_DLL_EXPORT 1)
endif()
endif()
-
-# Versioning information
-
-file(STRINGS "${PROJECT_SOURCE_DIR}/version.incl" icu_verinfo
- REGEX "^[^#].*=.*")
-
-foreach(item IN LISTS icu_verinfo)
- string(REGEX REPLACE "^([^=]+)=(.*)"
- "\\1" lib_key "${item}")
- string(REGEX REPLACE "^([^=]+)=(.*)"
- "\\2" lib_value "${item}")
- set(LIB_${lib_key} "${lib_value}")
-endforeach()
-
-string(REGEX REPLACE "^([0-9]+)_.*"
- "\\1"
- LIB_INTERFACE_VER_U_MAJOR
- "${LIB_INTERFACE_VER_U}")
Modified: xerces/c/trunk/configure.ac
URL: http://svn.apache.org/viewvc/xerces/c/trunk/configure.ac?rev=1824295&r1=1824294&r2=1824295&view=diff
==============================================================================
--- xerces/c/trunk/configure.ac (original)
+++ xerces/c/trunk/configure.ac Thu Feb 15 11:17:15 2018
@@ -25,15 +25,43 @@
AC_PREREQ(2.60)
AC_INIT([xerces-c],[3.2.1])
+INTERFACE_VERSION=3.2
+
+XERCES_VERSION_MAJOR=$(echo $PACKAGE_VERSION | cut -d. -f1)
+XERCES_VERSION_MINOR=$(echo $PACKAGE_VERSION | cut -d. -f2)
+XERCES_VERSION_REVISION=$(echo $PACKAGE_VERSION | cut -d. -f3)
+
+INTERFACE_VERSION_MAJOR=$(echo $INTERFACE_VERSION | cut -d. -f1)
+INTERFACE_VERSION_MINOR=$(echo $INTERFACE_VERSION | cut -d. -f2)
+
+INTERFACE_VERSION_D="${INTERFACE_VERSION_MAJOR}.${INTERFACE_VERSION_MINOR}"
+INTERFACE_VERSION_U="${INTERFACE_VERSION_MAJOR}_${INTERFACE_VERSION_MINOR}"
+
+AC_SUBST([XERCES_VERSION_MAJOR])
+AC_SUBST([XERCES_VERSION_MINOR])
+AC_SUBST([XERCES_VERSION_REVISION])
+AC_SUBST([INTERFACE_VERSION_MAJOR])
+AC_SUBST([INTERFACE_VERSION_MINOR])
+AC_SUBST([INTERFACE_VERSION_D])
+AC_SUBST([INTERFACE_VERSION_U])
+
+AC_DEFINE_UNQUOTED([XERCES_VERSION_MAJOR], $XERCES_VERSION_MAJOR, [Definition of Xerces major version])
+AC_DEFINE_UNQUOTED([XERCES_VERSION_MINOR], $XERCES_VERSION_MINOR, [Definition of Xerces minor version])
+AC_DEFINE_UNQUOTED([XERCES_VERSION_REVISION], $XERCES_VERSION_REVISION, [Definition of Xerces patch version])
+
AC_CONFIG_SRCDIR([src/Makefile.am])
AC_CONFIG_LIBOBJ_DIR([src])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h src/xercesc/util/Xerces_autoconf_config.hpp])
-AC_CONFIG_FILES([Makefile \
- src/Makefile \
- tests/Makefile \
- samples/Makefile \
+AC_CONFIG_HEADER([src/xercesc/util/Xerces_version_config.hpp])
+AC_CONFIG_FILES([Makefile
+ doc/Makefile
+ doc/Doxyfile
+ doc/style/dtd/entities.ent
+ src/Makefile
+ tests/Makefile
+ samples/Makefile
xerces-c.pc
scripts/run-test])
Modified: xerces/c/trunk/doc/CMakeLists.txt
URL: http://svn.apache.org/viewvc/xerces/c/trunk/doc/CMakeLists.txt?rev=1824295&r1=1824294&r2=1824295&view=diff
==============================================================================
--- xerces/c/trunk/doc/CMakeLists.txt (original)
+++ xerces/c/trunk/doc/CMakeLists.txt Thu Feb 15 11:17:15 2018
@@ -17,10 +17,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Install docs
+# Install docs. Install from source tree if pre-generated, then the
+# build tree if generated during the build.
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/html"
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
COMPONENT "development")
+install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html"
+ DESTINATION "${CMAKE_INSTALL_DOCDIR}"
+ COMPONENT "development")
# Add createdocs target (if Java is available, plus the needed jars)
find_package(Java COMPONENTS Runtime)
@@ -34,14 +39,20 @@ if(Java_FOUND
set(cpsep ";")
endif()
set(classpath "${PROJECT_SOURCE_DIR}/tools/jars/stylebook-1.0-b2.jar${cpsep}${PROJECT_SOURCE_DIR}/tools/jars/xalan.jar${cpsep}${PROJECT_SOURCE_DIR}/tools/jars/xerces.jar")
+ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc/style/dtd}")
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/style/dtd/entities.ent.in
+ ${CMAKE_CURRENT_BINARY_DIR}/style/dtd/entities.ent @ONLY)
add_custom_target(createdocs
+ COMMAND "${CMAKE_COMMAND}" -E copy_directory
+ ${CMAKE_CURRENT_SOURCE_DIR}/style
+ ${CMAKE_CURRENT_BINARY_DIR}/style
COMMAND "${Java_JAVA_EXECUTABLE}" -Djava.awt.headless=true
-classpath "${classpath}"
org.apache.stylebook.StyleBook
- "targetDirectory=${CMAKE_CURRENT_SOURCE_DIR}/html"
+ "targetDirectory=${CMAKE_CURRENT_BINARY_DIR}/html"
${CMAKE_CURRENT_SOURCE_DIR}/xerces-c_book.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/style
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ ${CMAKE_CURRENT_BINARY_DIR}/style
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)
set_target_properties(createdocs PROPERTIES FOLDER "Documentation")
endif()
@@ -49,9 +60,14 @@ endif()
# Add createapidocs target (if doxygen is available)
find_program(DOXYGEN_EXECUTABLE doxygen)
if(DOXYGEN_EXECUTABLE)
+ set(VERSION "${PROJECT_VERSION}")
+ set(abs_top_srcdir "${PROJECT_SOURCE_DIR}")
+ set(abs_top_builddir "${PROJECT_BINARY_DIR}")
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
+ ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(createapidocs
COMMAND "${DOXYGEN_EXECUTABLE}" Doxyfile
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)
set_target_properties(createapidocs PROPERTIES FOLDER "Documentation")
endif()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org