Salome HOME
fix "Replacing smeshDC by smesh"
authoreap <eap@opencascade.com>
Wed, 2 Mar 2011 15:12:48 +0000 (15:12 +0000)
committereap <eap@opencascade.com>
Wed, 2 Mar 2011 15:12:48 +0000 (15:12 +0000)
1) make global functions of class smeshDC only, class Mesh and others remain untouched
2) make temporary smesh.py in the current dir to avoid overwriting
   smesh.py when building in SMESH_SRC

doc/salome/gui/SMESH/Makefile.am

index 1bb1e9beeb5951b492bb0ab8592dd14cb023bef6..65acf38b5a6d71ae25c75a8430b00e93d76b1fd1 100755 (executable)
@@ -34,9 +34,8 @@ usr_docs: doxyfile_py doxyfile
        echo "===========================================" ;                    \
        echo "Replacing smeshDC by smesh" ;                                     \
        echo "===========================================" ;                    \
-       sed -e "/class smeshDC/d" -e "s/^ *#/#/g" -e "s/^ *def /def /g"         \
-         -e "s/smeshDC/smesh/g" $(top_srcdir)/src/SMESH_SWIG/smeshDC.py >      \
-         $(top_builddir)/src/SMESH_SWIG/smesh.py ;                             \
+       awk '/^class Mesh:/ { mesh_found=1 } // { if (mesh_found) {print $$0; next} } /^ +(def|#)/ { match( $$0, /^ +/); print substr( $$0, 1+RLENGTH ); next } /^class smeshDC/ { next } //' \
+         $(top_srcdir)/src/SMESH_SWIG/smeshDC.py > ./smesh.py ;                \
        echo "===========================================" ;                    \
        echo "Generating Python interface documentation";                       \
        echo "===========================================" ;                    \
@@ -45,7 +44,7 @@ usr_docs: doxyfile_py doxyfile
        echo "Generating GUI documentation" ;                                   \
        echo "===========================================" ;                    \
        $(DOXYGEN) doxyfile ;                                                   \
-       rm -f $(top_builddir)/src/SMESH_SWIG/smesh.py
+       rm -f ./smesh.py
 
 docs: usr_docs