summaryrefslogtreecommitdiffstats
path: root/kdoctools/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2012-04-05 21:36:10 -0500
committerDarrell Anderson <humanreadable@yahoo.com>2012-04-05 21:36:10 -0500
commit8c03e13c8520bae51c9a2c8dfbf4864ef6dc824f (patch)
tree0bde9f98a25ebec19def60234f07d774b656a465 /kdoctools/ConfigureChecks.cmake
parent759f5794fa89a14d4888042b55deedbdad935af9 (diff)
downloadtdelibs-8c03e13c8520bae51c9a2c8dfbf4864ef6dc824f.tar.gz
tdelibs-8c03e13c8520bae51c9a2c8dfbf4864ef6dc824f.zip
Added support for automated release version, date, copyright entities in help files.
Diffstat (limited to 'kdoctools/ConfigureChecks.cmake')
-rw-r--r--kdoctools/ConfigureChecks.cmake39
1 files changed, 39 insertions, 0 deletions
diff --git a/kdoctools/ConfigureChecks.cmake b/kdoctools/ConfigureChecks.cmake
new file mode 100644
index 000000000..01086cf36
--- /dev/null
+++ b/kdoctools/ConfigureChecks.cmake
@@ -0,0 +1,39 @@
+#################################################
+#
+# (C) 2012 Trinity Project
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+configure_file( ${CMAKE_SOURCE_DIR}/kdoctools/update-entities.sh ${CMAKE_SOURCE_DIR}/kdoctools/update-entities IMMEDIATE @ONLY )
+
+set( UPDATE_SCRIPT "${CMAKE_SOURCE_DIR}/kdoctools/update-entities" )
+set( TDEVERSION_FILE "${CMAKE_SOURCE_DIR}/tdecore/tdeversion.h" )
+set( ENTITIES_FILE "${CMAKE_SOURCE_DIR}/kdoctools/customization/entities/general.entities" )
+
+if( NOT EXISTS ${UPDATE_SCRIPT} )
+ tde_message_fatal( "${UPDATE_SCRIPT} not found!\n Check your sources." )
+endif( )
+if( NOT EXISTS ${TDEVERSION_FILE} )
+ tde_message_fatal( "${TDEVERSION_FILE} not found!\n Check your sources." )
+endif( )
+if( NOT EXISTS ${ENTITIES_FILE} )
+ tde_message_fatal( "${ENTITIES_FILE} not found!\n Check your sources." )
+endif( )
+
+execute_process( COMMAND chmod +x ${UPDATE_SCRIPT} )
+execute_process(
+ COMMAND ${UPDATE_SCRIPT}
+ RESULT_VARIABLE _result
+ OUTPUT_STRIP_TRAILING_WHITESPACE )
+if( _result )
+ tde_message_fatal( "Unable to update ${ENTITIES_FILE}!\n " )
+else( )
+ message( STATUS "Updated as follows:" )
+ execute_process( COMMAND echo )
+ execute_process( COMMAND tail -n3 ${ENTITIES_FILE} )
+ execute_process( COMMAND echo )
+endif( )