Author: hbelusca
Date: Tue Sep 15 01:59:14 2015
New Revision: 69234

URL: http://svn.reactos.org/svn/reactos?rev=69234&view=rev
Log:
[ASM]
Fix the file header description. Consistently use .endm for closing a macro 
started with .macro.

[NTVDM]
- Add "_clean" targets to generated asm16 targets.
- Fix CMake dependency generation in a somewhat hackish way: I don't know how 
to cleanly specify the location of generated files for custom targets. And it 
is also hackish because in a CMake custom command which depends on the 
COMMAND.COM target, I also need to explicitely say that the command depends on 
the output file created by the COMMAND.COM target...
- Add COMMAND.COM to the CD files, even if NTVDM doesn't use an external 
command.com for now. CORE-5221

Modified:
    trunk/reactos/include/asm/asm.inc
    trunk/reactos/subsystems/mvdm/asm16.cmake
    trunk/reactos/subsystems/mvdm/dos/CMakeLists.txt
    trunk/reactos/subsystems/mvdm/ntvdm/CMakeLists.txt

Modified: trunk/reactos/include/asm/asm.inc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/include/asm/asm.inc?rev=69234&r1=69233&r2=69234&view=diff
==============================================================================
--- trunk/reactos/include/asm/asm.inc   [iso-8859-1] (original)
+++ trunk/reactos/include/asm/asm.inc   [iso-8859-1] Tue Sep 15 01:59:14 2015
@@ -1,7 +1,7 @@
 /*
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS Kernel
- * FILE:            ntoskrnl/include/amd64/asmmacro.S
+ * FILE:            include/asm/asm.inc
  * PURPOSE:         ASM macros for GAS and MASM/ML64
  * PROGRAMMERS:     Timo Kreuzer ([email protected])
  */
@@ -315,15 +315,14 @@
 
 .macro absolute address
     __absolute__address__ = \address
-ENDM
+.endm
 
 .macro resb name, size
     \name = __absolute__address__
     __absolute__address__ = __absolute__address__ + \size
-ENDM
+.endm
 
 .macro UNIMPLEMENTED2 file, line, func
-
     jmp 3f
 1:  .asciz "\func"
 2:  .asciz \file

Modified: trunk/reactos/subsystems/mvdm/asm16.cmake
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/asm16.cmake?rev=69234&r1=69233&r2=69234&view=diff
==============================================================================
--- trunk/reactos/subsystems/mvdm/asm16.cmake   [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/asm16.cmake   [iso-8859-1] Tue Sep 15 
01:59:14 2015
@@ -38,6 +38,7 @@
     # many ASM files is by concatenating them into a single one and
     # compile the resulting file.
     concatenate_files(${_concatenated_asm_file} ${_source_file_list})
+    set_source_files_properties(${_concatenated_asm_file} PROPERTIES GENERATED 
TRUE)
 
     ##
     ## All this part is the same as CreateBootSectorTarget
@@ -53,9 +54,11 @@
         # COMMAND objcopy --output-target binary --image-base 
0x${_base_address} ${_object_file} ${_binary_file}
         DEPENDS ${_object_file} native-obj2bin)
 
-    set_source_files_properties(${_object_file} ${_binary_file} PROPERTIES 
GENERATED TRUE)
-
     add_custom_target(${_target} ALL DEPENDS ${_binary_file})
+    # set_target_properties(${_target} PROPERTIES OUTPUT_NAME ${_target} 
SUFFIX ".bin")
+    set_target_properties(${_target} PROPERTIES LOCATION_${CMAKE_BUILD_TYPE} 
${_binary_file}) ## Support of $<TARGET_FILE:xxx> is limited to 
add_executable() or add_library()
+    set_target_properties(${_target} PROPERTIES LOCATION ${_binary_file})      
               ## Support of $<TARGET_FILE:xxx> is limited to add_executable() 
or add_library()
+    add_clean_target(${_target})
 endfunction()
 
 else()
@@ -93,6 +96,7 @@
     # many ASM files is by concatenating them into a single one and
     # compile the resulting file.
     concatenate_files(${_concatenated_asm_file} ${_source_file_list})
+    set_source_files_properties(${_concatenated_asm_file} PROPERTIES GENERATED 
TRUE)
 
     ##
     ## All this part is the same as CreateBootSectorTarget
@@ -113,9 +117,11 @@
         COMMAND native-obj2bin ${_object_file} ${_binary_file} ${_base_address}
         DEPENDS ${_object_file} native-obj2bin)
 
-    set_source_files_properties(${_object_file} ${_preprocessed_asm_file} 
${_binary_file} PROPERTIES GENERATED TRUE)
-
     add_custom_target(${_target} ALL DEPENDS ${_binary_file})
+    # set_target_properties(${_target} PROPERTIES OUTPUT_NAME ${_target} 
SUFFIX ".bin")
+    set_target_properties(${_target} PROPERTIES LOCATION_${CMAKE_BUILD_TYPE} 
${_binary_file}) ## Support of $<TARGET_FILE:xxx> is limited to 
add_executable() or add_library()
+    set_target_properties(${_target} PROPERTIES LOCATION ${_binary_file})      
               ## Support of $<TARGET_FILE:xxx> is limited to add_executable() 
or add_library()
+    add_clean_target(${_target})
 endfunction()
 
 endif()

Modified: trunk/reactos/subsystems/mvdm/dos/CMakeLists.txt
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/dos/CMakeLists.txt?rev=69234&r1=69233&r2=69234&view=diff
==============================================================================
--- trunk/reactos/subsystems/mvdm/dos/CMakeLists.txt    [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/dos/CMakeLists.txt    [iso-8859-1] Tue Sep 15 
01:59:14 2015
@@ -1,3 +1,4 @@
 
 include_directories(${REACTOS_SOURCE_DIR}/subsystems/mvdm/dos)
 add_asm16_bin(command ${CMAKE_CURRENT_BINARY_DIR}/command.com 0x0100 command.S)
+add_cd_file(TARGET command DESTINATION reactos/system32 FOR all)

Modified: trunk/reactos/subsystems/mvdm/ntvdm/CMakeLists.txt
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/CMakeLists.txt?rev=69234&r1=69233&r2=69234&view=diff
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/CMakeLists.txt  [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/CMakeLists.txt  [iso-8859-1] Tue Sep 15 
01:59:14 2015
@@ -4,10 +4,14 @@
 #####################################
 # Generate the integrated COMMAND.COM
 #
+
+# Retrieve the full path to the generated file of the 'command' target
+get_target_property(_command_com_file command LOCATION)
+
 add_custom_command(
     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/command_com.c 
${CMAKE_CURRENT_BINARY_DIR}/command_com.h
-    COMMAND native-bin2c ${CMAKE_CURRENT_BINARY_DIR}/../dos/command.com 
${CMAKE_CURRENT_BINARY_DIR}/command_com.c 
${CMAKE_CURRENT_BINARY_DIR}/command_com.h BIN CommandCom
-    DEPENDS native-bin2c command)
+    COMMAND native-bin2c ${_command_com_file} 
${CMAKE_CURRENT_BINARY_DIR}/command_com.c 
${CMAKE_CURRENT_BINARY_DIR}/command_com.h BIN CommandCom
+    DEPENDS native-bin2c command ${_command_com_file})
 #####################################
 
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/fast486)


Reply via email to