Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Little cleanups to the install target. Still a long way to go, unfortunately
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 17 May 2010 16:15:02 +0000 (16:15 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 17 May 2010 16:15:02 +0000 (16:15 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7757 48e7efb5-ca39-0410-a469-dd3cf9ba447f

buildtools/Cmake/src/CMakeDefinePackages.txt
buildtools/Cmake/src/CMakeDistrib.txt

index c0776fd..adcf5fb 100755 (executable)
@@ -342,69 +342,63 @@ set(MC_SRC
        ${PROJECT_DIRECTORY}/src/mc/private.h
 )
 
        ${PROJECT_DIRECTORY}/src/mc/private.h
 )
 
-set(install_bins
-${PROJECT_DIRECTORY}/src/smpi/smpicc
-${PROJECT_DIRECTORY}/src/smpi/smpirun
-${PROJECT_DIRECTORY}/tools/gras/gras_stub_generator
-${PROJECT_DIRECTORY}/tools/tesh/tesh
-)
 
 set(install_HEADERS
 
 set(install_HEADERS
-./include/gras.h 
-./include/xbt.h
-./include/simgrid_config.h
-./include/xbt/misc.h
-./include/xbt/sysdep.h
-./include/xbt/virtu.h
-./include/xbt/str.h
-./include/xbt/strbuff.h
-./include/xbt/hash.h
-./include/xbt/function_types.h
-./include/xbt/asserts.h 
-./include/xbt/ex.h
-./include/xbt/log.h
-./include/xbt/module.h
-./include/xbt/mallocator.h
-./include/xbt/dynar.h
-./include/xbt/dict.h
-./include/xbt/set.h
-./include/xbt/heap.h
-./include/xbt/graph.h
-./include/xbt/fifo.h
-./include/xbt/swag.h
-./include/xbt/matrix.h
-./include/xbt/peer.h
-./include/xbt/config.h
-./include/xbt/cunit.h
-./include/xbt/graphxml_parse.h
-./include/xbt/graphxml.h
-./include/xbt/time.h
-./include/xbt/synchro.h
-./include/xbt/synchro_core.h
-./include/xbt/queue.h
-./include/xbt/setset.h
-./include/xbt/mmalloc.h
-./include/mc/modelchecker.h
-./include/msg/msg.h
-./include/msg/datatypes.h
-./include/simdag/simdag.h
-./include/simdag/datatypes.h
-./include/smpi/smpi.h
-./include/smpi/mpi.h
-./include/surf/surfxml_parse.h
-./include/surf/simgrid_dtd.h
-./include/gras/datadesc.h
-./include/gras/transport.h
-./include/gras/virtu.h
-./include/gras/emul.h
-./include/gras/process.h
-./include/gras/module.h
-./include/gras/messages.h
-./include/gras/timer.h
-./include/amok/peermanagement.h
-./include/amok/bandwidth.h
-./include/instr/instr.h
-./include/instr/tracing_config.h
+include/gras.h 
+include/xbt.h
+include/simgrid_config.h
+include/xbt/misc.h
+include/xbt/sysdep.h
+include/xbt/virtu.h
+include/xbt/str.h
+include/xbt/strbuff.h
+include/xbt/hash.h
+include/xbt/function_types.h
+include/xbt/asserts.h 
+include/xbt/ex.h
+include/xbt/log.h
+include/xbt/module.h
+include/xbt/mallocator.h
+include/xbt/dynar.h
+include/xbt/dict.h
+include/xbt/set.h
+include/xbt/heap.h
+include/xbt/graph.h
+include/xbt/fifo.h
+include/xbt/swag.h
+include/xbt/matrix.h
+include/xbt/peer.h
+include/xbt/config.h
+include/xbt/cunit.h
+include/xbt/graphxml_parse.h
+include/xbt/graphxml.h
+include/xbt/time.h
+include/xbt/synchro.h
+include/xbt/synchro_core.h
+include/xbt/queue.h
+include/xbt/setset.h
+include/xbt/mmalloc.h
+include/mc/modelchecker.h
+include/msg/msg.h
+include/msg/datatypes.h
+include/simdag/simdag.h
+include/simdag/datatypes.h
+include/smpi/smpi.h
+include/smpi/mpi.h
+include/surf/surfxml_parse.h
+include/surf/simgrid_dtd.h
+include/gras/datadesc.h
+include/gras/transport.h
+include/gras/virtu.h
+include/gras/emul.h
+include/gras/process.h
+include/gras/module.h
+include/gras/messages.h
+include/gras/timer.h
+include/amok/peermanagement.h
+include/amok/bandwidth.h
+include/instr/instr.h
+include/instr/tracing_config.h
 )
 
 set(TEST_UNITS
 )
 
 set(TEST_UNITS
@@ -779,18 +773,18 @@ set(to_svg
        ${PROJECT_DIRECTORY}/./src/bindings/rubyDag/simdag.rb
 )
 set(script_to_install
        ${PROJECT_DIRECTORY}/./src/bindings/rubyDag/simdag.rb
 )
 set(script_to_install
-       ${PROJECT_DIRECTORY}/./src/smpi/smpicc
-       ${PROJECT_DIRECTORY}/./src/smpi/smpirun
-       ${PROJECT_DIRECTORY}/./tools/MSG_visualization/colorize.pl
-)
-#      ${PROJECT_DIRECTORY}/./tools/sg_unit_extractor.pl
-#      ${PROJECT_DIRECTORY}/./tools/doxygen/index_create.pl
-#      ${PROJECT_DIRECTORY}/./tools/doxygen/toc_create.pl
-#      ${PROJECT_DIRECTORY}/./tools/doxygen/index_php.pl
-#      ${PROJECT_DIRECTORY}/./tools/doxygen/doxygen_postprocesser.pl
-#      ${PROJECT_DIRECTORY}/./tools/doxygen/bibtex2html_table_count.pl
-#      ${PROJECT_DIRECTORY}/./tools/doxygen/bibtex2html_postprocessor.pl
-#      ${PROJECT_DIRECTORY}/./tools/doxygen/xbt_log_extract_hierarchy.pl
-#      ${PROJECT_DIRECTORY}/./tools/MSG_visualization/trace2fig.pl
+       ${PROJECT_DIRECTORY}/src/smpi/smpicc
+       ${PROJECT_DIRECTORY}/src/smpi/smpirun
+       ${PROJECT_DIRECTORY}/tools/MSG_visualization/colorize.pl
+)
+#      ${PROJECT_DIRECTORY}/tools/sg_unit_extractor.pl
+#      ${PROJECT_DIRECTORY}/tools/doxygen/index_create.pl
+#      ${PROJECT_DIRECTORY}/tools/doxygen/toc_create.pl
+#      ${PROJECT_DIRECTORY}/tools/doxygen/index_php.pl
+#      ${PROJECT_DIRECTORY}/tools/doxygen/doxygen_postprocesser.pl
+#      ${PROJECT_DIRECTORY}/tools/doxygen/bibtex2html_table_count.pl
+#      ${PROJECT_DIRECTORY}/tools/doxygen/bibtex2html_postprocessor.pl
+#      ${PROJECT_DIRECTORY}/tools/doxygen/xbt_log_extract_hierarchy.pl
+#      ${PROJECT_DIRECTORY}/tools/MSG_visualization/trace2fig.pl
 
 #message("\n\ntesh:\n${txt_files}")
 
 #message("\n\ntesh:\n${txt_files}")
index 35b5fe9..294bd9f 100755 (executable)
@@ -3,43 +3,36 @@ set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
 set(CPACK_PROJECT_NAME "${PROJECT_NAME}")
 set(CPACK_PACKAGE_FILE_NAME "simgrid-${release_version}")
 set(CPACK_GENERATOR "TBZ2;TGZ") #;TGZ;TZ;ZIP
 set(CPACK_PROJECT_NAME "${PROJECT_NAME}")
 set(CPACK_PACKAGE_FILE_NAME "simgrid-${release_version}")
 set(CPACK_GENERATOR "TBZ2;TGZ") #;TGZ;TZ;ZIP
+set(CPACK_SET_DESTDIR on)
+set(CMAKE_INSTALL_PREFIX ${prefix} CACHE TYPE INTERNAL FORCE)
 
 
-foreach(file ${script_to_install})
-       get_filename_component(file_location ${file} PATH)
-       string(REPLACE "${PROJECT_DIRECTORY}/" "/" file_location ${file_location})
-       install(FILES ${file} DESTINATION "${file_location}")
-endforeach(file ${EXTRA_DIST})
-
-foreach(file ${to_svg})
+foreach(file ${script_to_install} ${to_svg})
        get_filename_component(file_location ${file} PATH)
        get_filename_component(file_location ${file} PATH)
-       string(REPLACE "${PROJECT_DIRECTORY}/" "/" file_location ${file_location})
+       string(REPLACE "${PROJECT_DIRECTORY}/" "" file_location ${file_location})
        install(FILES ${file} DESTINATION "${file_location}")
 endforeach(file ${EXTRA_DIST})
 
        install(FILES ${file} DESTINATION "${file_location}")
 endforeach(file ${EXTRA_DIST})
 
-foreach(file ${TEST_UNITS})
-       install(FILES src/${file} DESTINATION "/src/")
-endforeach(file ${TEST_UNITS})
-
 ###copy doc
 ###copy doc
-install(DIRECTORY "${PROJECT_DIRECTORY}/doc/"
-DESTINATION "/doc/"
-PATTERN ".svn" EXCLUDE 
-PATTERN ".git" EXCLUDE 
-PATTERN "*.o" EXCLUDE
-PATTERN "*~" EXCLUDE
+install(DIRECTORY "${PROJECT_DIRECTORY}/doc/html/"
+  DESTINATION "$ENV{DESTDIR}${prefix}/doc/html/"
+  PATTERN ".svn" EXCLUDE 
+  PATTERN ".git" EXCLUDE 
+  PATTERN "*.o" EXCLUDE
+  PATTERN "*~" EXCLUDE
 )
 
 )
 
-###buildtools 
-install(DIRECTORY "${PROJECT_DIRECTORY}/buildtools/Cmake/"
-DESTINATION "/buildtools/Cmake/"
-PATTERN ".svn" EXCLUDE 
-PATTERN ".git" EXCLUDE
-PATTERN "*.o" EXCLUDE
-PATTERN "*~" EXCLUDE
+### scripts
+set(install_bins
+ ${PROJECT_DIRECTORY}/src/smpi/smpicc
+ ${PROJECT_DIRECTORY}/src/smpi/smpirun
+ ${PROJECT_DIRECTORY}/tools/gras/gras_stub_generator
+ ${PROJECT_DIRECTORY}/tools/tesh/tesh
 )
 
 )
 
-set(CPACK_SET_DESTDIR on)
-set(CMAKE_INSTALL_PREFIX ${prefix} CACHE TYPE INTERNAL FORCE)
+# FIXME: the following does not work because these binaries are not known as targets
+#install(TARGETS smpicc smpirun gras_stub_generator tesh 
+#        RUNTIME DESTINATION $ENV{DESTDIR}${prefix}/bin)
+       
 
 string(REPLACE ";" "\t" install_libs "${install_libs}")
 set(uninstall_bins "${install_bins}")
 
 string(REPLACE ";" "\t" install_libs "${install_libs}")
 set(uninstall_bins "${install_bins}")