VirtualBox

Changeset 12249 in vbox


Ignore:
Timestamp:
Sep 9, 2008 1:26:15 AM (16 years ago)
Author:
vboxsync
Message:

Disassembler/Makefiles: Eliminated PATH_TARGET usage and pushed them up to root level (sub-makefile wise).

Location:
trunk/src/VBox/Disassembler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Disassembler/Makefile.kmk

    r12170 r12249  
    2020#
    2121
    22 ifdef VBOX_SINGLE_MAKEFILE
    2322SUB_DEPTH = ../../..
    24 else
    25 SUB_DEPTH = .
    26 DEPTH    ?= ../../..
    27 endif
    2823include $(KBUILD_PATH)/subheader.kmk
    29 
    30 ifndef VBOX_ONLY_SDK
    3124
    3225# include the sub-makefile first.
     
    10093endif # VBOX_WITH_TESTCASES
    10194
    102 endif #!VBOX_ONLY_SDK
    103 
    10495include $(KBUILD_PATH)/subfooter.kmk
    10596
  • trunk/src/VBox/Disassembler/testcase/Makefile.kmk

    r12170 r12249  
    2020#
    2121
    22 ifdef VBOX_SINGLE_MAKEFILE
    2322SUB_DEPTH = ../../../..
    24 else
    25 SUB_DEPTH = ..
    26 DEPTH    ?= ../../../..
    27 endif
    2823include $(KBUILD_PATH)/subheader.kmk
    2924ifdef VBOX_WITH_TESTCASES
     
    7671
    7772# Where we put the output files from the testcases.
    78 VBOX_DISAS_TEST_PATH := $(PATH_TARGET)/disas-testcase
    79 
    80 $(call DIRDEP,$(VBOX_DISAS_TEST_PATH)):
    81         $(MKDIR) -p $@
     73VBOX_DISAS_TEST_OUT_DIR := $(PATH_TARGET)/Disassembler/testcase
     74BLDDIRS += $(VBOX_DISAS_TEST_OUT_DIR)
    8275
    8376# Generate the rules for creating the .bin files.
    8477VBOX_DISAS_TESTS_BIN = $(VBOX_DISAS_TESTS_BUILD) $(VBOX_DISAS_TESTS_INVALID)
    85 VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_PATH)/,\
     78VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/,\
    8679        $(VBOX_DISAS_TESTS_BIN:.asm=-16.bin)\
    8780        $(VBOX_DISAS_TESTS_BIN:.asm=-32.bin)\
    8881        $(VBOX_DISAS_TESTS_BIN:.asm=-64.bin))
    8982
    90 $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS_BIN:.asm=-16.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-16.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D))
     83$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BIN:.asm=-16.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-16.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D))
    9184        @$(ECHO) "Assembling: $(<F) into $(@F)"
    9285        $(TOOL_YASM_AS) -f bin -a x86 --force-strict -DTEST_BITS=16 -o $@ $<
    9386
    94 $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS_BIN:.asm=-32.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-32.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D))
     87$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BIN:.asm=-32.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-32.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D))
    9588        @$(ECHO) "Assembling: $(<F) into $(@F)"
    9689        $(TOOL_YASM_AS) -f bin -a x86 --force-strict -DTEST_BITS=32 -o $@ $<
    9790
    98 $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS_BIN:.asm=-64.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-64.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D))
     91$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BIN:.asm=-64.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-64.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D))
    9992        @$(ECHO) "Assembling: $(<F) into $(@F)"
    10093        $(TOOL_YASM_AS) -f bin -a x86 --force-strict -DTEST_BITS=64 -o $@ $<
     
    10295
    10396# Generate the rules for the 'build' tests.
    104 VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_PATH)/,\
     97VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/,\
    10598        $(VBOX_DISAS_TESTS_BUILD:.asm=-16-disas.asm)\
    10699        $(VBOX_DISAS_TESTS_BUILD:.asm=-32-disas.asm)\
    107100        $(VBOX_DISAS_TESTS_BUILD:.asm=-64-disas.asm))
    108101
    109 $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-16-disas.asm)): $$(subst -disas.asm,.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))
     102$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-16-disas.asm)): $$(subst -disas.asm,.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))
    110103        @$(ECHO) "Generating: $(@F) from $(<F)"
    111104        $(REDIRECT) -E VBOX_LOG_DEST=nofile -o $@ -- $(INSTARGET_tstDisasm-2) --style=yasm --cpumode=16 $<
    112105
    113 $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-32-disas.asm)): $$(subst -disas.asm,.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))
     106$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-32-disas.asm)): $$(subst -disas.asm,.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))
    114107        @$(ECHO) "Generating: $(@F) from $(<F)"
    115108        $(REDIRECT) -E VBOX_LOG_DEST=nofile -o $@ -- $(INSTARGET_tstDisasm-2) --style=yasm --cpumode=32 $<
    116109
    117 $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-64-disas.asm)): $$(subst -disas.asm,.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))
     110$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-64-disas.asm)): $$(subst -disas.asm,.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))
    118111        @$(ECHO) "Generating: $(@F) from $(<F)"
    119112        $(REDIRECT) -E VBOX_LOG_DEST=nofile -o $@ -- $(INSTARGET_tstDisasm-2) --style=yasm --cpumode=64 $<
    120113
    121114
    122 VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_PATH)/,\
     115VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/,\
    123116        $(VBOX_DISAS_TESTS_BUILD:.asm=-16-disas.bin)\
    124117        $(VBOX_DISAS_TESTS_BUILD:.asm=-32-disas.bin)\
    125118        $(VBOX_DISAS_TESTS_BUILD:.asm=-64-disas.bin))
    126119
    127 $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-16-disas.bin)): $$(subst .bin,.asm,$$@) | $$(call DIRDEP,$$(@D))
     120$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-16-disas.bin)): $$(subst .bin,.asm,$$@) | $$(call DIRDEP,$$(@D))
    128121        @$(ECHO) "Re-assembling: $(<F) into $(@F)"
    129122        $(TOOL_YASM_AS) -f bin -a x86 --force-strict -DTEST_BITS=16 -o $@ $<
    130123
    131 $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-32-disas.bin)): $$(subst .bin,.asm,$$@) | $$(call DIRDEP,$$(@D))
     124$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-32-disas.bin)): $$(subst .bin,.asm,$$@) | $$(call DIRDEP,$$(@D))
    132125        @$(ECHO) "Re-assembling: $(<F) into $(@F)"
    133126        $(TOOL_YASM_AS) -f bin -a x86 --force-strict -DTEST_BITS=32 -o $@ $<
    134127
    135 $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-64-disas.bin)): $$(subst .bin,.asm,$$@) | $$(call DIRDEP,$$(@D))
     128$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-64-disas.bin)): $$(subst .bin,.asm,$$@) | $$(call DIRDEP,$$(@D))
    136129        @$(ECHO) "Re-assembling: $(<F) into $(@F)"
    137130        $(TOOL_YASM_AS) -f bin -a x86 --force-strict -DTEST_BITS=64 -o $@ $<
     
    139132
    140133VBOX_DISAS_TESTS += $(foreach test, $(VBOX_DISAS_TESTS_BUILD:.asm=), $(test)-16.tst $(test)-32.tst $(test)-64.tst)
    141 $(addprefix $(VBOX_DISAS_TEST_PATH)/,\
     134$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/,\
    142135$(VBOX_DISAS_TESTS_BUILD:.asm=-16.tst)\
    143136$(VBOX_DISAS_TESTS_BUILD:.asm=-32.tst)\
     
    154147VBOX_DISAS_TESTS += $(foreach test, $(VBOX_DISAS_TESTS_INVALID:.asm=), $(test)-16.tst $(test)-32.tst $(test)-64.tst)
    155148
    156 $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS_INVALID:.asm=-16.tst)): $$(patsubst %.tst,%.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))
     149$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_INVALID:.asm=-16.tst)): $$(patsubst %.tst,%.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))
    157150        @$(ECHO) "TESTING: $(@F) [--undef-op=all]"
    158151        @$(RM) -f $@
     
    161154        @$(ECHO) " PASSED:  $(@F) [--undef-op=all]"
    162155
    163 $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS_INVALID:.asm=-32.tst)): $$(patsubst %.tst,%.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))
     156$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_INVALID:.asm=-32.tst)): $$(patsubst %.tst,%.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))
    164157        @$(ECHO) "TESTING: $(@F) [--undef-op=all]"
    165158        @$(RM) -f $@
     
    168161        @$(ECHO) " PASSED:  $(@F) [--undef-op=all]"
    169162
    170 $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS_INVALID:.asm=-64.tst)): $$(patsubst %.tst,%.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))
     163$(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_INVALID:.asm=-64.tst)): $$(patsubst %.tst,%.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))
    171164        @$(ECHO) "TESTING: $(@F) [--undef-op=all]"
    172165        @$(RM) -f $@
     
    178171# Generate the rules for the binary tests.
    179172define def_vbox_disas_binary_rules
    180 $(outbase).asm: $(full_binary) $$$$(INSTARGET_tstDisasm-2) | $(VBOX_DISAS_TEST_PATH)/
     173$(outbase).asm: $(full_binary) $$$$(INSTARGET_tstDisasm-2) | $(VBOX_DISAS_TEST_OUT_DIR)/
    181174        @$$(ECHO) "Generating: $$(@F) from $$(<F)"
    182175        $$(REDIRECT) -E VBOX_LOG_DEST=nofile -o $$@ -- $$(INSTARGET_tstDisasm-2) --style=yasm --cpumode=$(bits) --undef-op=db $$<
     
    201194local name := $(notdir $(basename $(binary)))
    202195local full_binary := $(abspathex $(binary),$(PATH_SUB_CURRENT))
    203 local outbase := $(VBOX_DISAS_TEST_PATH)/$(name)-rebuild-$(bits)
     196local outbase := $(VBOX_DISAS_TEST_OUT_DIR)/$(name)-rebuild-$(bits)
    204197$(eval $(def_vbox_disas_binary_rules))
    205198endef # def_vbox_disas_binary
     
    211204
    212205# Add the .tst to the clean up.
    213 VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_PATH)/, $(VBOX_DISAS_TESTS))
     206VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS))
    214207OTHER_CLEAN += $(VBOX_DISAS_TEST_CLEAN)
    215208
     
    223216# (kBuild r1646)
    224217#
    225 TESTING += $(addprefix $(VBOX_DISAS_TEST_PATH)/,$(VBOX_DISAS_TESTS))
     218TESTING += $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/,$(VBOX_DISAS_TESTS))
    226219
    227220# Aliases for use till kBuild gets updated.
     
    239232local test_base := $(basename $(test))
    240233local test_root := $(patsubst %-16,%,$(patsubst %-32,%,$(patsubst %-64,%,$(test_base))))
    241 $(test_base).tst:: $(VBOX_DISAS_TEST_PATH)/$(test)
     234$(test_base).tst:: $(VBOX_DISAS_TEST_OUT_DIR)/$(test)
    242235$(test_root).tst:: $(test_base).tst
    243236$(test_base).o:: $(test_base).tst
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette