changeset 412:f16164e720ba

- Remove pandoc - Remove build of documentation - Remove linktool
author David Demelier <markand@malikania.fr>
date Wed, 07 Oct 2015 08:36:22 +0200
parents 2a0b8613498f
children 52a13aad3d02
files C++/modules/Js/Js.h CMakeLists.txt cmake/Doxyfile.in cmake/FindPandoc.cmake tools/CMakeLists.txt tools/linktool/CMakeLists.txt tools/linktool/linktool.cpp
diffstat 7 files changed, 3 insertions(+), 362 deletions(-) [+]
line wrap: on
line diff
--- a/C++/modules/Js/Js.h	Wed Oct 07 08:30:19 2015 +0200
+++ b/C++/modules/Js/Js.h	Wed Oct 07 08:36:22 2015 +0200
@@ -1198,7 +1198,6 @@
 };
 
 /**
- * @class TypeInfo<Map<T>>
  * @brief Push a map of key-value pair as objects.
  *
  * Provides: push.
@@ -1218,7 +1217,6 @@
 };
 
 /**
- * @class TypeInfo<std::vector<T>>
  * @brief Push or get vectors as JavaScript arrays.
  *
  * Provides: get, push.
--- a/CMakeLists.txt	Wed Oct 07 08:30:19 2015 +0200
+++ b/CMakeLists.txt	Wed Oct 07 08:36:22 2015 +0200
@@ -34,7 +34,7 @@
 
 macro(define_module)
 	set(oneValueArgs TARGET NAME DIRECTORY)
-	set(multiValueArgs SOURCES RESOURCES DOCS LIBRARIES INCLUDES)
+	set(multiValueArgs SOURCES RESOURCES LIBRARIES INCLUDES)
 
 	cmake_parse_arguments(MOD "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
 
@@ -59,7 +59,7 @@
 			message(FATAL_ERROR "${MAIN} file does not exists")
 		endif ()
 
-		add_executable(${MOD_TARGET} ${MOD_SOURCES} ${MOD_RESOURCES} ${MOD_DOCS} ${MAIN})
+		add_executable(${MOD_TARGET} ${MOD_SOURCES} ${MOD_RESOURCES} ${MAIN})
 		add_test(${MOD_TARGET}-test ${MOD_TARGET})
 		target_include_directories(
 			${MOD_TARGET}
@@ -88,34 +88,9 @@
 			add_custom_target(${MOD_TARGET}-resources DEPENDS ${outputlist})
 			add_dependencies(${MOD_TARGET} ${MOD_TARGET}-resources)
 		endif ()
-
-		# Generate documentation locally
-		if (MOD_DOCS)
-			foreach (doc ${MOD_DOCS})
-				file(RELATIVE_PATH inputbase ${code_SOURCE_DIR}/C++/doc/${MOD_DIRECTORY} ${doc})
-				string(REGEX REPLACE "^(.*)\\.md" "\\1.html" outputname ${inputbase})
-				set(output ${CMAKE_BINARY_DIR}/doc/${MOD_DIRECTORY}/${outputname})
-
-				pandoc(
-					SOURCES ${doc}
-					OUTPUT ${output}
-					FROM markdown TO html5
-					MAKE_DIRECTORY STANDALONE
-					FILTER $<TARGET_FILE:cclinktool>
-				)
-
-				list(APPEND docoutputlist ${output})
-			endforeach ()
-
-			add_custom_target(${MOD_TARGET}-doc DEPENDS ${docoutputlist})
-			add_dependencies(${MOD_TARGET} ${MOD_TARGET}-doc)
-		endif ()
 	endif ()
 endmacro()
 
-# Required
-find_package(Pandoc REQUIRED)
-
 # Optional
 find_package(Jansson)
 find_package(OpenSSL)
@@ -150,13 +125,6 @@
 	SOURCES
 		${code_SOURCE_DIR}/C++/modules/Base64/Base64.cpp
 		${code_SOURCE_DIR}/C++/modules/Base64/Base64.h
-	DOCS
-		${code_SOURCE_DIR}/C++/doc/Base64/Home.md
-		${code_SOURCE_DIR}/C++/doc/Base64/class/Base64.md
-		${code_SOURCE_DIR}/C++/doc/Base64/class/Base64/decode.md
-		${code_SOURCE_DIR}/C++/doc/Base64/class/Base64/encode.md
-		${code_SOURCE_DIR}/C++/doc/Base64/class/Base64/lookup.md
-		${code_SOURCE_DIR}/C++/doc/Base64/class/Base64/rlookup.md
 )
 
 # ---------------------------------------------------------
@@ -176,20 +144,9 @@
 	SOURCES
 		${code_SOURCE_DIR}/C++/modules/Directory/Directory.cpp
 		${code_SOURCE_DIR}/C++/modules/Directory/Directory.h
-	DOCS
-		${code_SOURCE_DIR}/C++/doc/Directory/Home.md
-		${code_SOURCE_DIR}/C++/doc/Directory/class/Directory.md
-		${code_SOURCE_DIR}/C++/doc/Directory/class/DirectoryEntry.md
-		${code_SOURCE_DIR}/C++/doc/Directory/class/Directory/Constructor.md
 )
 
 # ---------------------------------------------------------
-# Driver
-# ---------------------------------------------------------
-
-# No tests yet
-
-# ---------------------------------------------------------
 # Dynlib
 # ---------------------------------------------------------
 
@@ -210,14 +167,6 @@
 	SOURCES
 		${code_SOURCE_DIR}/C++/modules/Dynlib/Dynlib.cpp
 		${code_SOURCE_DIR}/C++/modules/Dynlib/Dynlib.h
-	DOCS
-		${code_SOURCE_DIR}/C++/doc/Dynlib/Home.md
-		${code_SOURCE_DIR}/C++/doc/Dynlib/class/Dynlib.md
-		${code_SOURCE_DIR}/C++/doc/Dynlib/class/Dynlib/Constructor.md
-		${code_SOURCE_DIR}/C++/doc/Dynlib/class/Dynlib/Destructor.md
-		${code_SOURCE_DIR}/C++/doc/Dynlib/class/Dynlib/Policy.md
-		${code_SOURCE_DIR}/C++/doc/Dynlib/class/Dynlib/sym.md
-		${code_SOURCE_DIR}/C++/doc/Dynlib/macro/DYNLIB_EXPORT.md
 )
 
 if (WITH_DYNLIB)
@@ -261,13 +210,6 @@
 		SOURCES
 			${code_SOURCE_DIR}/C++/modules/Hash/Hash.cpp
 			${code_SOURCE_DIR}/C++/modules/Hash/Hash.h
-		DOCS
-			${code_SOURCE_DIR}/C++/doc/Hash/Home.md
-			${code_SOURCE_DIR}/C++/doc/Hash/class/Hash.md
-			${code_SOURCE_DIR}/C++/doc/Hash/class/Hash/md5.md
-			${code_SOURCE_DIR}/C++/doc/Hash/class/Hash/sha1.md
-			${code_SOURCE_DIR}/C++/doc/Hash/class/Hash/sha256.md
-			${code_SOURCE_DIR}/C++/doc/Hash/class/Hash/sha512.md
 	)
 endif ()
 
@@ -417,16 +359,6 @@
 		SOURCES
 			${code_SOURCE_DIR}/C++/modules/Xdg/Xdg.cpp
 			${code_SOURCE_DIR}/C++/modules/Xdg/Xdg.h
-		DOCS
-			${code_SOURCE_DIR}/C++/doc/Xdg/Home.md
-			${code_SOURCE_DIR}/C++/doc/Xdg/class/Xdg.md
-			${code_SOURCE_DIR}/C++/doc/Xdg/class/Xdg/cacheHome.md
-			${code_SOURCE_DIR}/C++/doc/Xdg/class/Xdg/configDirs.md
-			${code_SOURCE_DIR}/C++/doc/Xdg/class/Xdg/configHome.md
-			${code_SOURCE_DIR}/C++/doc/Xdg/class/Xdg/Constructor.md
-			${code_SOURCE_DIR}/C++/doc/Xdg/class/Xdg/dataDirs.md
-			${code_SOURCE_DIR}/C++/doc/Xdg/class/Xdg/dataHome.md
-			${code_SOURCE_DIR}/C++/doc/Xdg/class/Xdg/runtimeDir.md
 	)
 endif ()
 
--- a/cmake/Doxyfile.in	Wed Oct 07 08:30:19 2015 +0200
+++ b/cmake/Doxyfile.in	Wed Oct 07 08:36:22 2015 +0200
@@ -1571,7 +1571,7 @@
 # If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
 # The default value is: YES.
 
-GENERATE_LATEX         = YES
+GENERATE_LATEX         = NO
 
 # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
--- a/cmake/FindPandoc.cmake	Wed Oct 07 08:30:19 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,231 +0,0 @@
-# FindPandoc
-# ----------
-#
-# Find Pandoc executable, this modules defines:
-#
-# Pandoc_EXECUTABLE, where to find pandoc's executable
-# Pandoc_FOUND, if it is found
-# Pandoc_VERSION, the version
-#
-# This module also defines the following macros:
-#
-# pandoc(
-#	SOURCES file1 [file2 ...]
-#	OUTPUT output
-#	[FROM format]
-#	[TO format]
-#	[TARGET target]
-#	[DEPENDS dependency ...]
-#	[ALL]
-#	[TOC]
-#	[STANDALONE]
-#	[MAKE_DIRECTORY]
-#	[TEMPLATE file]
-#	[FILTER filter]
-#	[HEADER header ...]
-#	[FOOTER footer ...]
-#	[BODY body ...]
-#	[VARIABLE var ...]
-#	[METADATA meta ...]
-#	[ARGS argument ...]
-#	[WORKING_DIRECTORY directory]
-# )
-#
-# The sources files are listed in the parameter SOURCES, all files are passed
-# in the same order they are passed to that variable.
-#
-# The OUTPUT file is set with OUTPUT. It is generated only if one of the file
-# has changed.
-#
-# The FROM (-f) and TO (-t) arguments specify respectively the source and
-# destinations formats.
-#
-# If the parameter TARGET is set, then a target named `target` will be added
-# with the OUTPUT file as the dependency but not listed as sources files.
-# But the SOURCES files will be added as the target sources in the IDE.
-#
-# Optional dependencies can be added to the output command (not the target) with
-# the DEPENDS parameter.
-#
-# If ALL is set and TARGET is also set, the target will be added to the ALL_BUILD.
-#
-# If TOC (--toc) is specified, a table of content will be automatically created.
-#
-# If STANDALONE (-s) is set, the compilation will assume that it is standalone
-# and adds the necessary of the output format.
-#
-# Optional MAKE_DIRECTORY can be set to create the output directory before
-# pandoc processes the file (recommended).
-#
-# The TEMPLATE parameter can be used to specify the formate template file.
-#
-# You can set a filter with the parameter FILTER. The filter will be added to
-# the output dependencies so you can safely use CMake's targets.
-#
-# The HEADER (-H), FOOTER (-A) and BODY (-B) are copied verbatim before, just
-# after and after the body respectively. They can be set more than once.
-#
-# You can pass variables (-V) and metadata (-M) to the parameters VARIABLE
-# and METADATA, be sure to pass the same syntax as pandoc.  (e.g VARIABLE foo=1)
-#
-# ARGS is an optional list of additional arguments to pass to pandoc.
-#
-# The parameter WORKING_DIRECTORY can be set to change the directory when pandoc
-# is invoked.
-#
-
-find_program(
-	Pandoc_EXECUTABLE
-	NAMES pandoc
-	DOC "Pandoc executable"
-)
-
-include(FindPackageHandleStandardArgs)
-include(CMakeParseArguments)
-
-# Extract the version
-if (Pandoc_EXECUTABLE)
-	execute_process(
-		COMMAND ${Pandoc_EXECUTABLE} --version
-		OUTPUT_VARIABLE _pandoc_version_tmp
-	)
-
-	if (_pandoc_version_tmp MATCHES "^pandoc[^ ]* ([0-9]+\\.[0-9]+\\.[0-9]+)")
-		set(Pandoc_VERSION "${CMAKE_MATCH_1}")
-	endif ()
-endif ()
-
-find_package_handle_standard_args(
-	Pandoc
-	FOUND_VAR Pandoc_FOUND
-	VERSION_VAR Pandoc_VERSION
-	REQUIRED_VARS Pandoc_EXECUTABLE
-)
-
-if (Pandoc_FOUND)
-	function(pandoc)
-		set(options MAKE_DIRECTORY STANDALONE TOC)
-		set(oneValueArgs FILTER FROM TARGET TEMPLATE TO OUTPUT WORKING_DIRECTORY)
-		set(multiValueArgs ARGS FOOTER HEADER METADATA SOURCES VARIABLE)
-
-		#
-		# The following variables will be set in that scope:
-		#   _pandoc_arguments		- List of all arguments that will passed to pandoc invocation.
-		#   _pandoc_depends		- List of all dependencies attached to the add_custom_command.
-		#   _pandoc_mkdir		- The mkdir command if MAKE_DIRECTORY is set
-		#   _pandoc_output_base		- The base output directory
-		#
-		cmake_parse_arguments(PANDOC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
-		#
-		# Output and sources are mandatory
-		#
-		if (NOT PANDOC_OUTPUT)
-			message(FATAL_ERROR "Please define OUTPUT")
-		elseif (NOT PANDOC_SOURCES)
-			message(FATAL_ERROR "Please defines SOURCES")
-		endif ()
-
-		#
-		# Handle the filter with care.
-		#
-		# 1. If it is a target, depend on it and use a generator
-		#    expression to get its full path on the disk.
-		# 2. If it is not a target, just use the user provided path.
-		#
-		if (PANDOC_FILTER)
-			# If it is a target, add a dependency so that it is built
-			if (TARGET ${PANDOC_FILTER})
-				list(APPEND _pandoc_arguments --filter "$<TARGET_FILE:${PANDOC_FILTER}>")
-				list(APPEND _pandoc_depends ${PANDOC_FILTER})
-			else ()
-				list(APPEND _pandoc_arguments --filter ${PANDOC_FILTER})
-			endif ()
-		endif ()
-
-		if (PANDOC_TOC)
-			list(APPEND _pandoc_arguments --toc)
-		endif ()
-		if (PANDOC_STANDALONE)
-			list(APPEND _pandoc_arguments -s)
-		endif ()
-		if (PANDOC_FROM)
-			list(APPEND _pandoc_arguments -f ${PANDOC_FROM})
-		endif ()
-		if (PANDOC_TO)
-			list(APPEND _pandoc_arguments -t ${PANDOC_TO})
-		endif ()
-		if (PANDOC_TEMPLATE)
-			list(APPEND _pandoc_arguments --template ${PANDOC_TEMPLATE})
-			list(APPEND _pandoc_depends ${PANDOC_TEMPLATE})
-		endif ()
-
-		# Header, footers and body
-		foreach (h ${PANDOC_HEADER})
-			list(APPEND _pandoc_arguments -H ${h})
-			list(APPEND _pandoc_depends ${h})
-		endforeach ()
-		foreach (b ${PANDOC_BODY})
-			list(APPEND _pandoc_arguments -B ${b})
-			list(APPEND _pandoc_depends ${b})
-		endforeach ()
-		foreach (f ${PANDOC_FOOTER})
-			list(APPEND _pandoc_arguments -A ${f})
-			list(APPEND _pandoc_depends ${f})
-		endforeach ()
-
-		# Variables and metadata
-		foreach (var ${PANDOC_VARIABLE})
-			list(APPEND _pandoc_arguments -V ${var})
-		endforeach ()
-		foreach (meta ${PANDOC_METADATA})
-			list(APPEND _pandoc_arguments -M ${meta})
-		endforeach ()
-
-		# Optional list of arguments
-		foreach (arg ${PANDOC_ARGS})
-			list(APPEND _pandoc_arguments ${arg})
-		endforeach ()
-
-		# Output and sources
-		list(APPEND _pandoc_arguments -o ${PANDOC_OUTPUT})
-
-		#
-		# The following variables are set within the loop:
-		#
-		#   _pandoc_input		- The absolute path to the input file.
-		#   _pandoc_output_base		- The base output directory.
-		#
-		foreach (s ${PANDOC_SOURCES})
-			get_filename_component(_pandoc_input ${s} ABSOLUTE)
-			get_filename_component(_pandoc_output_base ${PANDOC_OUTPUT} DIRECTORY)
-			list(APPEND _pandoc_depends ${_pandoc_input})
-			list(APPEND _pandoc_arguments ${_pandoc_input})
-		endforeach ()
-
-		# Create the output directory if requested
-		if (PANDOC_MAKE_DIRECTORY)
-			set(_pandoc_mkdir ${CMAKE_COMMAND} -E make_directory ${_pandoc_output_base})
-		endif ()
-
-		add_custom_command(
-			OUTPUT ${PANDOC_OUTPUT}
-			COMMAND	${_pandoc_mkdir}
-			COMMAND	${Pandoc_EXECUTABLE} ${_pandoc_arguments}
-			DEPENDS ${_pandoc_depends} ${PANDOC_DEPENDS}
-			WORKING_DIRECTORY ${PANDOC_WORKING_DIRECTORY}
-			VERBATIM
-		)
-
-		if (PANDOC_TARGET)
-			add_custom_target(
-				${PANDOC_TARGET} ${PANDOC_ALL}
-				SOURCES ${_pandoc_depends}
-				DEPENDS ${PANDOC_OUTPUT}
-				WORKING_DIRECTORY ${PANDOC_WORKING_DIRECTORY}
-			)
-		endif ()
-	endfunction()
-endif ()
-
-mark_as_advanced(Pandoc_EXECUTABLE)
--- a/tools/CMakeLists.txt	Wed Oct 07 08:30:19 2015 +0200
+++ b/tools/CMakeLists.txt	Wed Oct 07 08:36:22 2015 +0200
@@ -19,5 +19,4 @@
 project(tools)
 
 add_subdirectory(cat)
-add_subdirectory(linktool)
 add_subdirectory(mkunicode)
--- a/tools/linktool/CMakeLists.txt	Wed Oct 07 08:30:19 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#
-# CMakeLists.txt -- code building for common code
-#
-# Copyright (c) 2013-2015 David Demelier <markand@malikania.fr>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-add_executable(cclinktool linktool.cpp)
\ No newline at end of file
--- a/tools/linktool/linktool.cpp	Wed Oct 07 08:30:19 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * mdtohtml.cpp -- convert .md links to .html for local documentation
- *
- * Copyright (c) 2013, 2014 David Demelier <markand@malikania.fr>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <algorithm>
-#include <iostream>
-#include <string>
-
-using namespace std;
-
-int main(void)
-{
-	string content;
-	string::size_type pos;
-
-	copy(istreambuf_iterator<char>(cin), istreambuf_iterator<char>(), back_inserter(content));
-
-	while ((pos = content.find(".md")) != string::npos)
-		content.replace(pos, 3, ".html");
-
-	copy(content.begin(), content.end(), ostreambuf_iterator<char>(cout));
-
-	return 0;
-}