[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 30 Oct 2010 13:07:15 +0000 (13:07 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 30 Oct 2010 13:07:15 +0000 (13:07 +0000)
- Create folders in single calls.
- Apply a consistent formatting.

svn path=/branches/cmake-bringup/; revision=49353

ros_cd.cmake

index abea72d..936c633 100644 (file)
@@ -2,8 +2,7 @@
 add_custom_command(
     OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
     COMMAND ${CMAKE_COMMAND} -E copy ${REACTOS_SOURCE_DIR}/boot/bootdata/packages/reactos.dff.in ${REACTOS_BINARY_DIR}/boot/reactos.dff
-    DEPENDS ${REACTOS_SOURCE_DIR}/boot/bootdata/packages/reactos.dff.in
-)
+    DEPENDS ${REACTOS_SOURCE_DIR}/boot/bootdata/packages/reactos.dff.in)
     
 file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_cab_target.txt CAB_TARGET_ENTRIES)
 foreach(ENTRY ${CAB_TARGET_ENTRIES})
@@ -14,8 +13,7 @@ foreach(ENTRY ${CAB_TARGET_ENTRIES})
         OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
         COMMAND ${CMAKE_COMMAND} -E echo ${_FILENAME} ${_dir_num} >> ${REACTOS_BINARY_DIR}/boot/reactos.dff
         DEPENDS ${_targetname}
-        APPEND
-    )
+        APPEND)
 endforeach()
 
 file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_cab.txt CAB_TARGET_ENTRIES)
@@ -26,30 +24,28 @@ foreach(ENTRY ${CAB_TARGET_ENTRIES})
         OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
         COMMAND ${CMAKE_COMMAND} -E echo ${_FILENAME} ${_dir_num} >> ${REACTOS_BINARY_DIR}/boot/reactos.dff
         DEPENDS ${_FILENAME}
-        APPEND
-    )
+        APPEND)
 endforeach()
 
 #reactos.cab
 add_custom_command(
     OUTPUT ${REACTOS_BINARY_DIR}/bootcd/reactos/reactos.inf
     COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/reactos.dff -L ${REACTOS_BINARY_DIR}/boot/bootcd/reactos -I
-    DEPENDS ${REACTOS_BINARY_DIR}/boot/reactos.dff
-)
+    DEPENDS ${REACTOS_BINARY_DIR}/boot/reactos.dff)
 add_custom_command(
     OUTPUT ${REACTOS_BINARY_DIR}/bootcd/reactos/reactos.cab
     COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/reactos.dff -RC ${REACTOS_BINARY_DIR}/boot/bootcd/reactos/reactos.inf -L ${REACTOS_BINARY_DIR}/boot/bootcd/reactos -N
-    DEPENDS ${REACTOS_BINARY_DIR}/bootcd/reactos/reactos.inf
-)
-list( APPEND BOOTCD_FILES ${REACTOS_BINARY_DIR}/bootcd/reactos/reactos.cab)
+    DEPENDS ${REACTOS_BINARY_DIR}/bootcd/reactos/reactos.inf)
+list(APPEND BOOTCD_FILES ${REACTOS_BINARY_DIR}/bootcd/reactos/reactos.cab)
 
 #bootcd target
 set(BOOTCD_DIR "${REACTOS_BINARY_DIR}/boot/bootcd")
 
-file(MAKE_DIRECTORY "${BOOTCD_DIR}")
-file(MAKE_DIRECTORY "${BOOTCD_DIR}/loader")
-file(MAKE_DIRECTORY "${BOOTCD_DIR}/reactos")
-file(MAKE_DIRECTORY "${BOOTCD_DIR}/reactos/system32")
+file(MAKE_DIRECTORY
+    "${BOOTCD_DIR}"
+    "${BOOTCD_DIR}/loader"
+    "${BOOTCD_DIR}/reactos"
+    "${BOOTCD_DIR}/reactos/system32")
 
 file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_minicd_target.txt MINICD_TARGET_ENTRIES)
 foreach(ENTRY ${MINICD_TARGET_ENTRIES})
@@ -58,12 +54,11 @@ foreach(ENTRY ${MINICD_TARGET_ENTRIES})
     string(REGEX REPLACE "^.*\t.*\t(.*)"  "\\1"_NAMEONCD ${ENTRY})
     get_target_property(_FILENAME ${_targetname} LOCATION)
     set(filename ${BOOTCD_DIR}/${_DIR}/${_NAMEONCD})
-    list( APPEND BOOTCD_FILES ${filename})
+    list(APPEND BOOTCD_FILES ${filename})
     add_custom_command(
         OUTPUT ${filename}
         COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${BOOTCD_DIR}/${_DIR}/${_NAMEONCD}
-        DEPENDS ${_targetname}
-    )
+        DEPENDS ${_targetname})
 endforeach()
 
 file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_minicd.txt MINICD_ENTRIES)
@@ -72,12 +67,11 @@ foreach(ENTRY ${MINICD_ENTRIES})
     string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
     string(REGEX REPLACE "^.*\t.*\t(.*)"  "\\1"_NAMEONCD ${ENTRY})
     set(filename ${BOOTCD_DIR}/${_DIR}/${_NAMEONCD})
-    list( APPEND BOOTCD_FILES ${filename})
+    list(APPEND BOOTCD_FILES ${filename})
     add_custom_command(
         OUTPUT ${filename}
         COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${BOOTCD_DIR}/${_DIR}/${_NAMEONCD}
-        DEPENDS ${_FILENAME}
-    )
+        DEPENDS ${_FILENAME})
 endforeach()
 
 add_custom_target(bootcd 
@@ -89,19 +83,20 @@ add_dependencies(bootcd dosmbr ext2 fat32 fat isoboot isobtrt vgafonts)
 set_directory_properties(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${REACTOS_BINARY_DIR}/minicd.iso)
 
 #livecd target
-file(MAKE_DIRECTORY "${LIVECD_DIR}")
-file(MAKE_DIRECTORY "${LIVECD_DIR}/loader")
-file(MAKE_DIRECTORY "${LIVECD_DIR}/Profiles")
-file(MAKE_DIRECTORY "${LIVECD_DIR}/Profiles/All Users")
-file(MAKE_DIRECTORY "${LIVECD_DIR}/Profiles/All Users/Desktop")
-file(MAKE_DIRECTORY "${LIVECD_DIR}/Profiles/Default User")
-file(MAKE_DIRECTORY "${LIVECD_DIR}/Profiles/Default User/Desktop")
-file(MAKE_DIRECTORY "${LIVECD_DIR}/Profiles/Default User/My Documents")
-file(MAKE_DIRECTORY "${LIVECD_DIR}/reactos")
-file(MAKE_DIRECTORY "${LIVECD_DIR}/reactos/inf")
-file(MAKE_DIRECTORY "${LIVECD_DIR}/reactos/fonts")
-file(MAKE_DIRECTORY "${LIVECD_DIR}/reactos/system32")
-file(MAKE_DIRECTORY "${LIVECD_DIR}/reactos/system32/config")
+file(MAKE_DIRECTORY
+    "${LIVECD_DIR}"
+    "${LIVECD_DIR}/loader"
+    "${LIVECD_DIR}/Profiles"
+    "${LIVECD_DIR}/Profiles/All Users"
+    "${LIVECD_DIR}/Profiles/All Users/Desktop"
+    "${LIVECD_DIR}/Profiles/Default User"
+    "${LIVECD_DIR}/Profiles/Default User/Desktop"
+    "${LIVECD_DIR}/Profiles/Default User/My Documents"
+    "${LIVECD_DIR}/reactos"
+    "${LIVECD_DIR}/reactos/inf"
+    "${LIVECD_DIR}/reactos/fonts"
+    "${LIVECD_DIR}/reactos/system32"
+    "${LIVECD_DIR}/reactos/system32/config")
 
 file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_livecd_target.txt LIVECD_TARGET_ENTRIES)
 foreach(ENTRY ${LIVECD_TARGET_ENTRIES})
@@ -110,12 +105,11 @@ foreach(ENTRY ${LIVECD_TARGET_ENTRIES})
     string(REGEX REPLACE "^.*\t.*\t(.*)"  "\\1"_NAMEONCD ${ENTRY})
     get_target_property(_FILENAME ${_targetname} LOCATION)
     set(filename ${LIVECD_DIR}/${_DIR}/${_NAMEONCD})
-    list( APPEND LIVECD_FILES ${filename})
+    list(APPEND LIVECD_FILES ${filename})
     add_custom_command(
         OUTPUT ${filename}
         COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${LIVECD_DIR}/${_DIR}/${_NAMEONCD}
-        DEPENDS ${_targetname}
-    )
+        DEPENDS ${_targetname})
 endforeach()
 file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_livecd.txt LIVECD_ENTRIES)
 
@@ -124,12 +118,11 @@ foreach(ENTRY ${LIVECD_ENTRIES})
     string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
     string(REGEX REPLACE "^.*\t.*\t(.*)"  "\\1"_NAMEONCD ${ENTRY})
     set(filename ${LIVECD_DIR}/${_DIR}/${_NAMEONCD})
-    list( APPEND LIVECD_FILES ${filename})
+    list(APPEND LIVECD_FILES ${filename})
     add_custom_command(
         OUTPUT ${filename}
         COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${LIVECD_DIR}/${_DIR}/${_NAMEONCD}
-        DEPENDS ${_FILENAME}
-    )
+        DEPENDS ${_FILENAME})
 endforeach()
 
 add_custom_target(livecd