X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/88fad0aaff9eb463f048bfdfe4ad6218aba44ddb..a809031d9c16dd141439f5c5a448ec7b23d42ec9:/tools/cmake/MaintainerMode.cmake diff --git a/tools/cmake/MaintainerMode.cmake b/tools/cmake/MaintainerMode.cmake index e279ee15fe..4765bd44df 100644 --- a/tools/cmake/MaintainerMode.cmake +++ b/tools/cmake/MaintainerMode.cmake @@ -42,24 +42,27 @@ if(enable_maintainer_mode AND NOT WIN32) endif() # Let's generate header files required by SMPI when the call location tracing -# has been activated. +# has been activated. if(enable_maintainer_mode AND NOT WIN32) add_custom_command(OUTPUT ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces.h ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces_fortran.h - + DEPENDS + ${CMAKE_HOME_DIRECTORY}/tools/smpi/generate_smpi_defines.pl + ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi.h + COMMENT "Generating header files for call-location tracing with SMPI" # Make sure there is no space after the redirection operator (>). I received # error messages in that case on my Debian system. COMMAND "${CMAKE_HOME_DIRECTORY}/tools/smpi/generate_smpi_defines.pl" "${CMAKE_HOME_DIRECTORY}/include/smpi/smpi.h >${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces.h" COMMAND "${CMAKE_HOME_DIRECTORY}/tools/smpi/generate_smpi_defines.pl" "-f" "${CMAKE_HOME_DIRECTORY}/include/smpi/smpi.h >${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces_fortran.h" ) - + add_custom_target(smpi_generated_headers_call_location_tracing DEPENDS ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces.h ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces_fortran.h ) - + SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces.h;${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces_fortran.h" ) @@ -174,9 +177,9 @@ if(enable_maintainer_mode AND NOT WIN32) #${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/surf/xml - COMMAND ${FLEXML_EXE} --root-tags platform -b 1000000 -P surfxml --sysid=http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd -S src/surf/xml/simgrid_dtd.l -L src/surf/xml/simgrid.dtd - COMMAND ${SED_EXE} -i ${string14} src/surf/xml/simgrid_dtd.l - COMMAND ${SED_EXE} -i "'s/FAIL(\"Bad declaration %s.\",yytext)/FAIL(\"Bad declaration %s.\\\\nIf your are using a XML v3 file (check the version attribute in ), please update it with tools\\/simgrid_update_xml.pl\",yytext)/'" src/surf/xml/simgrid_dtd.l + COMMAND ${FLEXML_EXE} --root-tags platform -b 1000000 -P surfxml --sysid=https://simgrid.org/simgrid.dtd -S src/surf/xml/simgrid_dtd.l -L src/surf/xml/simgrid.dtd + COMMAND ${PERL_EXE} ${CMAKE_HOME_DIRECTORY}/tools/cmake/scripts/fixup_simgrid_dtd_l.pl < src/surf/xml/simgrid_dtd.l > src/surf/xml/simgrid_dtd.l.tmp + COMMAND mv src/surf/xml/simgrid_dtd.l.tmp src/surf/xml/simgrid_dtd.l COMMAND ${CMAKE_COMMAND} -E echo " Generated src/surf/xml/simgrid_dtd.l" #${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/simdag/dax.dtd @@ -187,7 +190,7 @@ if(enable_maintainer_mode AND NOT WIN32) #${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/include/surf/simgrid.h - COMMAND ${FLEXML_EXE} --root-tags platform -P surfxml --sysid=http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd -H src/surf/xml/simgrid_dtd.h -L src/surf/xml/simgrid.dtd + COMMAND ${FLEXML_EXE} --root-tags platform -P surfxml --sysid=https://simgrid.org/simgrid.dtd -H src/surf/xml/simgrid_dtd.h -L src/surf/xml/simgrid.dtd COMMAND ${SED_EXE} -i ${string1} src/surf/xml/simgrid_dtd.h COMMAND ${SED_EXE} -i ${string2} src/surf/xml/simgrid_dtd.h COMMAND ${SED_EXE} -i ${string14} src/surf/xml/simgrid_dtd.h @@ -205,10 +208,6 @@ if(enable_maintainer_mode AND NOT WIN32) COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c COMMAND ${FLEX_EXE} -o src/surf/xml/simgrid_dtd.c -Psurf_parse_ --noline src/surf/xml/simgrid_dtd.l COMMAND ${SED_EXE} -i ${string9} src/surf/xml/simgrid_dtd.c - COMMAND ${SED_EXE} -i 's/int yyl\;/unsigned int yyl\;/' src/surf/xml/simgrid_dtd.c - COMMAND ${SED_EXE} -i 's/int surf_parse_leng\;/unsigned int surf_parse_leng\;/' src/surf/xml/simgrid_dtd.c - COMMAND ${SED_EXE} -i 's/n = 0\; n < max_size/n = 0\; n < (size_t) max_size/' src/surf/xml/simgrid_dtd.c - COMMAND ${SED_EXE} -i "s/register //" src/surf/xml/simgrid_dtd.c COMMAND ${CMAKE_COMMAND} -E echo " Generated surf/xml/simgrid_dtd.c" #simdag/dax_dtd.c: simdag/dax_dtd.l @@ -216,8 +215,6 @@ if(enable_maintainer_mode AND NOT WIN32) COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/simdag COMMAND ${FLEX_EXE} -o src/simdag/dax_dtd.c -Pdax_ --noline src/simdag/dax_dtd.l COMMAND ${SED_EXE} -i ${string9} src/simdag/dax_dtd.c - COMMAND ${SED_EXE} -i 's/int yyl\;/unsigned int yyl\;/' src/simdag/dax_dtd.c - COMMAND ${SED_EXE} -i 's/int dax_leng\;/unsigned int dax_leng\;/' src/simdag/dax_dtd.c COMMAND ${CMAKE_COMMAND} -E echo " Generated src/simdag/dax_dtd.c" WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY} @@ -235,7 +232,7 @@ if(enable_maintainer_mode AND NOT WIN32) message(STATUS "Error : Install sed before use maintainer mode.") endif() - message(FATAL_ERROR STATUS "Error : Need to install all tools for maintainer mode !!!") + message(FATAL_ERROR STATUS "Error : Need to install all (flexml, flex, sed) tools for maintainer mode !!!") endif() endif()