From 93a69962ae1cbf55bc07119521e2006f5b6f5234 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 8 Apr 2013 14:36:08 +0000 Subject: [PATCH] Improve documentation --- doc/salome/gui/SMESH/CMakeLists.txt | 9 ++++++--- doc/salome/gui/SMESH/Makefile.am | 15 ++++++++++++--- doc/salome/gui/SMESH/collect_mesh_methods.py | 7 +------ doc/salome/gui/SMESH/doxyfile_py.in | 8 ++++---- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/doc/salome/gui/SMESH/CMakeLists.txt b/doc/salome/gui/SMESH/CMakeLists.txt index 1d484199e..7f816199f 100644 --- a/doc/salome/gui/SMESH/CMakeLists.txt +++ b/doc/salome/gui/SMESH/CMakeLists.txt @@ -69,11 +69,14 @@ ENDIF(WINDOWS) FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} "${SCR}") -ADD_CUSTOM_TARGET(usr_docs ${PYTHON_EXECUTABLE} ${f} smesh.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smeshDC.py smesh - COMMAND mkdir -p tmp && ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} && ${PYTHON_EXECUTABLE} ${f1} -o tmp/smesh.py StdMeshers +ADD_CUSTOM_TARGET(usr_docs mkdir -p tmp1 tmp2 + COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp2/smeshBuilder.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smeshBuilder.py + COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp2/smesh_algorithm.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smesh_algorithm.py + COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp2/StdMeshersBuilder.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/StdMeshersBuilder.py + COMMAND ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} && ${PYTHON_EXECUTABLE} ${f1} -o tmp1/smeshBuilder.py StdMeshers COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py COMMAND ${DOXYGEN_EXECUTABLE} doxyfile - COMMAND ${PYTHON_EXECUTABLE} -c "import os, shutil; os.remove(r'''smesh.py'''); shutil.rmtree(r'''tmp''')" + COMMAND ${PYTHON_EXECUTABLE} -c "import os, shutil; shutil.rmtree(r'''tmp1'''); shutil.rmtree(r'''tmp2''')" COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''', ignore=shutil.ignore_patterns('tmp_env.*', '*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*')); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''')" VERBATIM WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} diff --git a/doc/salome/gui/SMESH/Makefile.am b/doc/salome/gui/SMESH/Makefile.am index 32df83656..0ee964f52 100755 --- a/doc/salome/gui/SMESH/Makefile.am +++ b/doc/salome/gui/SMESH/Makefile.am @@ -35,10 +35,19 @@ DOC_PYTHONPATH=$(prefix)/bin/salome:$(prefix)/lib/python$(PYTHON_VERSION)/site-p DOC_LD_LIBRARY_PATH=$(prefix)lib/salome:${MED_ROOT_DIR}/lib/salome:${GEOM_ROOT_DIR}/lib/salome:${KERNEL_ROOT_DIR}/lib/salome DOC_SMESH_MeshersList=StdMeshers -tmp/smeshBuilder.py: $(top_srcdir)/src/SMESH_SWIG/StdMeshersBuilder.py $(srcdir)/collect_mesh_methods.py - @mkdir -p tmp && PYTHONPATH=$(DOC_PYTHONPATH):${PYTHONPATH} LD_LIBRARY_PATH=$(DOC_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} SMESH_MeshersList=$(DOC_SMESH_MeshersList) $(PYTHON) $(srcdir)/collect_mesh_methods.py -o $@ StdMeshers +tmp1/smeshBuilder.py: $(top_srcdir)/src/SMESH_SWIG/StdMeshersBuilder.py $(srcdir)/collect_mesh_methods.py + @mkdir -p tmp1 && PYTHONPATH=$(DOC_PYTHONPATH):${PYTHONPATH} LD_LIBRARY_PATH=$(DOC_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} SMESH_MeshersList=$(DOC_SMESH_MeshersList) $(PYTHON) $(srcdir)/collect_mesh_methods.py -o $@ StdMeshers -usr_docs: doxyfile_py doxyfile tmp/smeshBuilder.py +tmp2/smeshBuilder.py: $(top_srcdir)/src/SMESH_SWIG/smeshBuilder.py + mkdir -p tmp2 && $(KERNEL_ROOT_DIR)/bin/salome/prepare_generating_doc.py -o $@ $< + +tmp2/smesh_algorithm.py: $(top_srcdir)/src/SMESH_SWIG/smesh_algorithm.py + mkdir -p tmp2 && $(KERNEL_ROOT_DIR)/bin/salome/prepare_generating_doc.py -o $@ $< + +tmp2/StdMeshersBuilder.py: $(top_srcdir)/src/SMESH_SWIG/StdMeshersBuilder.py + mkdir -p tmp2 && $(KERNEL_ROOT_DIR)/bin/salome/prepare_generating_doc.py -o $@ $< + +usr_docs: doxyfile_py doxyfile tmp1/smeshBuilder.py tmp2/smeshBuilder.py tmp2/smesh_algorithm.py tmp2/StdMeshersBuilder.py @$(DOXYGEN) doxyfile_py ; \ $(DOXYGEN) doxyfile diff --git a/doc/salome/gui/SMESH/collect_mesh_methods.py b/doc/salome/gui/SMESH/collect_mesh_methods.py index 8f524bc2d..14b2ea953 100755 --- a/doc/salome/gui/SMESH/collect_mesh_methods.py +++ b/doc/salome/gui/SMESH/collect_mesh_methods.py @@ -51,11 +51,6 @@ import sys def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py"): plugin_module_name = plugin_name + "Builder" plugin_module = "salome.%s.%s" % (plugin_name, plugin_module_name) - if dummymeshhelp: - namespace = plugin_name - else: - namespace = "SMESH_SWIG" - plugin_module_short = "%s.%s" % (namespace, plugin_module_name) try: exec( "from salome.smesh.smeshBuilder import *") exec( "import %s" % plugin_module ) @@ -112,7 +107,7 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py"): output.append( " # @param algo_type type of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)" ) output.append( " # @param geom_shape if defined, the subshape to be meshed (GEOM_Object)" ) output.append( " # @return An instance of Mesh_Algorithm sub-class according to the specified @a algo_type, see " ) - output.append( " # %s" % ", ".join( [ "%s.%s" % ( plugin_module_short, algo.__name__ ) for algo in methods[ method ] ] ) ) + output.append( " # %s" % ", ".join( [ "%s.%s" % ( plugin_module_name, algo.__name__ ) for algo in methods[ method ] ] ) ) output.append( " def %s(algo_type, geom_shape=0):" % method ) output.append( " pass" ) pass diff --git a/doc/salome/gui/SMESH/doxyfile_py.in b/doc/salome/gui/SMESH/doxyfile_py.in index 5450d6b86..d56d7c3f3 100755 --- a/doc/salome/gui/SMESH/doxyfile_py.in +++ b/doc/salome/gui/SMESH/doxyfile_py.in @@ -99,10 +99,10 @@ EXAMPLE_RECURSIVE = NO #--------------------------------------------------------------------------- #Input related options #--------------------------------------------------------------------------- -INPUT = @top_srcdir@/src/SMESH_SWIG/smeshBuilder.py \ - @top_srcdir@/src/SMESH_SWIG/smesh_algorithm.py \ - @top_srcdir@/src/SMESH_SWIG/StdMeshersBuilder.py \ - tmp/smeshBuilder.py +INPUT = tmp2/smeshBuilder.py \ + tmp2/smesh_algorithm.py \ + tmp2/StdMeshersBuilder.py \ + tmp1/smeshBuilder.py FILE_PATTERNS = IMAGE_PATH = @srcdir@/images RECURSIVE = NO -- 2.39.2