X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4de2a148bea34f550b79c07fb5e80ac36e6aa0e9..cd094ed7aafb051a96f0eaf6019632736fc326a7:/tools/cmake/MaintainerMode.cmake diff --git a/tools/cmake/MaintainerMode.cmake b/tools/cmake/MaintainerMode.cmake index a2ab5449e7..810f67f3ac 100644 --- a/tools/cmake/MaintainerMode.cmake +++ b/tools/cmake/MaintainerMode.cmake @@ -10,7 +10,7 @@ set(FLEX_MIN_PATCH 39) # Let's generate header files required by SMPI when the call location tracing # has been activated. -if(enable_maintainer_mode AND NOT WIN32) +if(enable_maintainer_mode) add_custom_command(OUTPUT ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces.h ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces_fortran.h DEPENDS @@ -35,7 +35,7 @@ if(enable_maintainer_mode AND NOT WIN32) ) endif() -if(enable_maintainer_mode AND NOT WIN32) +if(enable_maintainer_mode) find_program(FLEX_EXE NAMES flex) find_program(FLEXML_EXE NAMES flexml) find_program(SED_EXE NAMES sed) @@ -129,10 +129,9 @@ if(enable_maintainer_mode AND NOT WIN32) set(string1 "'s/extern /XBT_PUBLIC_DATA /'") set(string2 "'s/XBT_PUBLIC_DATA \\([^(]*\\)(/XBT_PUBLIC \\1(/'") - set(string3 "'s/XBT_PUBLIC void STag_surfxml_include/XBT_ATTRIB_NORETURN &/'") # remove with v5 of the dtd - set(string4 "'s/XBT_PUBLIC void STag_surfxml_\\(mount\\|storage\\)/XBT_ATTRIB_NORETURN &/'") # remove with v5 of the dtd + set(string3 "'s/XBT_PUBLIC void STag_simgrid_parse_include/XBT_ATTRIB_NORETURN &/'") # remove with v5 of the dtd + set(string4 "'s/XBT_PUBLIC void STag_simgrid_parse_\\(mount\\|storage\\)/XBT_ATTRIB_NORETURN &/'") # remove with v5 of the dtd set(string5 "'s/SET(DOCTYPE)/SET(ROOT_dax__adag)/'") - set(string9 "'s/#include /#if defined(_WIN32)\\n# ifndef __STRICT_ANSI__\\n# include \\n# include \\n# endif\\n#else\\n# include \\n#endif/g'") set(string14 "'\\!^ \\* Generated [0-9/]\\{10\\} [0-9:]\\{8\\}\\.$$!d'") ADD_CUSTOM_COMMAND( @@ -146,7 +145,7 @@ 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=https://simgrid.org/simgrid.dtd -S src/surf/xml/simgrid_dtd.l -L src/surf/xml/simgrid.dtd + COMMAND ${FLEXML_EXE} --root-tags platform -b 1000000 -P simgrid_parse --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" @@ -159,7 +158,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=https://simgrid.org/simgrid.dtd -H src/surf/xml/simgrid_dtd.h -L src/surf/xml/simgrid.dtd + COMMAND ${FLEXML_EXE} --root-tags platform -P simgrid_parse --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 ${string3} src/surf/xml/simgrid_dtd.h @@ -177,15 +176,13 @@ if(enable_maintainer_mode AND NOT WIN32) #surf/xml/simgrid_dtd.c: surf/xml/simgrid_dtd.l 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 ${FLEX_EXE} -o src/surf/xml/simgrid_dtd.c -Psimgrid_parse_ --noline src/surf/xml/simgrid_dtd.l COMMAND ${CMAKE_COMMAND} -E echo " Generated surf/xml/simgrid_dtd.c" #dag/dax_dtd.c: dag/dax_dtd.l COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.c COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/dag COMMAND ${FLEX_EXE} -o src/dag/dax_dtd.c -Pdax_ --noline src/dag/dax_dtd.l - COMMAND ${SED_EXE} -i ${string9} src/dag/dax_dtd.c COMMAND ${CMAKE_COMMAND} -E echo " Generated src/dag/dax_dtd.c" WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}