Fix gdmd missing files bug
This commit is contained in:
parent
13e4dc2ae8
commit
b9c5654712
31
makefile
31
makefile
|
@ -33,7 +33,8 @@ UT_OBJ_BY_DC_DIR = $(sort $(dir $(UT_OBJ_BY_DC)))
|
||||||
DSCANNER_BIN = bin/dscanner
|
DSCANNER_BIN = bin/dscanner
|
||||||
DSCANNER_BIN_DIR = $(dir $(DSCANNER_BIN))
|
DSCANNER_BIN_DIR = $(dir $(DSCANNER_BIN))
|
||||||
UT_DSCANNER_BIN = bin/dscanner-unittest
|
UT_DSCANNER_BIN = bin/dscanner-unittest
|
||||||
UT_DSCANNER_LIB = bin/dscanner-unittest-lib.a
|
UT_DSCANNER_LIB = bin/$(DC)/dscanner-unittest-lib.a
|
||||||
|
UT_DSCANNER_LIB_DIR = $(dir $(UT_DSCANNER_LIB))
|
||||||
|
|
||||||
INCLUDE_PATHS = \
|
INCLUDE_PATHS = \
|
||||||
-Isrc \
|
-Isrc \
|
||||||
|
@ -60,23 +61,25 @@ override GDC_FLAGS += $(DFLAGS) -O3 -frelease
|
||||||
DC_TEST_FLAGS += -g -Jbin
|
DC_TEST_FLAGS += -g -Jbin
|
||||||
override DMD_TEST_FLAGS += -w
|
override DMD_TEST_FLAGS += -w
|
||||||
|
|
||||||
|
DC_DEBUG_FLAGS := -g -Jbin
|
||||||
|
|
||||||
ifeq ($(DC), $(filter $(DC), dmd ldmd2 gdmd))
|
ifeq ($(DC), $(filter $(DC), dmd ldmd2 gdmd))
|
||||||
VERSIONS := $(DMD_VERSIONS)
|
VERSIONS := $(DMD_VERSIONS)
|
||||||
DEBUG_VERSIONS := $(DMD_DEBUG_VERSIONS)
|
DEBUG_VERSIONS := $(DMD_DEBUG_VERSIONS)
|
||||||
DC_FLAGS += $(DMD_FLAGS)
|
DC_FLAGS += $(DMD_FLAGS)
|
||||||
DC_TEST_FLAGS += $(DMD_TEST_FLAGS)
|
DC_TEST_FLAGS += $(DMD_TEST_FLAGS) -unittest
|
||||||
WRITE_TO_TARGET_NAME = -of=$@
|
WRITE_TO_TARGET_NAME = -of=$@
|
||||||
else ifeq ($(DC), ldc2)
|
else ifneq (,$(findstring ldc2, $(DC)))
|
||||||
VERSIONS := $(LDC_VERSIONS)
|
VERSIONS := $(LDC_VERSIONS)
|
||||||
DEBUG_VERSIONS := $(LDC_DEBUG_VERSIONS)
|
DEBUG_VERSIONS := $(LDC_DEBUG_VERSIONS)
|
||||||
DC_FLAGS += $(LDC_FLAGS)
|
DC_FLAGS += $(LDC_FLAGS)
|
||||||
DC_TEST_FLAGS += $(LDC_TEST_FLAGS)
|
DC_TEST_FLAGS += $(LDC_TEST_FLAGS) -unittest
|
||||||
WRITE_TO_TARGET_NAME = -of=$@
|
WRITE_TO_TARGET_NAME = -of=$@
|
||||||
else ifeq ($(DC), gdc)
|
else ifneq (,$(findstring gdc, $(DC)))
|
||||||
VERSIONS := $(GDC_VERSIONS)
|
VERSIONS := $(GDC_VERSIONS)
|
||||||
DEBUG_VERSIONS := $(GDC_DEBUG_VERSIONS)
|
DEBUG_VERSIONS := $(GDC_DEBUG_VERSIONS)
|
||||||
DC_FLAGS += $(GDC_FLAGS)
|
DC_FLAGS += $(GDC_FLAGS)
|
||||||
DC_TEST_FLAGS += $(GDC_TEST_FLAGS)
|
DC_TEST_FLAGS += $(GDC_TEST_FLAGS) -funittest
|
||||||
WRITE_TO_TARGET_NAME = -o $@
|
WRITE_TO_TARGET_NAME = -o $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -89,7 +92,7 @@ $(OBJ_DIR)/$(DC)/%.o: %.d
|
||||||
${DC} ${DC_FLAGS} ${VERSIONS} ${INCLUDE_PATHS} -c $< ${WRITE_TO_TARGET_NAME}
|
${DC} ${DC_FLAGS} ${VERSIONS} ${INCLUDE_PATHS} -c $< ${WRITE_TO_TARGET_NAME}
|
||||||
|
|
||||||
$(UT_OBJ_DIR)/$(DC)/%.o: %.d
|
$(UT_OBJ_DIR)/$(DC)/%.o: %.d
|
||||||
${DC} ${DC_TEST_FLAGS} ${VERSIONS} -unittest ${INCLUDE_PATHS} -c $< ${WRITE_TO_TARGET_NAME}
|
${DC} ${DC_TEST_FLAGS} ${VERSIONS} ${INCLUDE_PATHS} -c $< ${WRITE_TO_TARGET_NAME}
|
||||||
|
|
||||||
${DSCANNER_BIN}: ${GITHASH} ${OBJ_BY_DC} | ${DSCANNER_BIN_DIR}
|
${DSCANNER_BIN}: ${GITHASH} ${OBJ_BY_DC} | ${DSCANNER_BIN_DIR}
|
||||||
${DC} ${OBJ_BY_DC} ${WRITE_TO_TARGET_NAME}
|
${DC} ${OBJ_BY_DC} ${WRITE_TO_TARGET_NAME}
|
||||||
|
@ -97,11 +100,19 @@ ${DSCANNER_BIN}: ${GITHASH} ${OBJ_BY_DC} | ${DSCANNER_BIN_DIR}
|
||||||
${OBJ_BY_DC}: | ${OBJ_BY_DC_DIR}
|
${OBJ_BY_DC}: | ${OBJ_BY_DC_DIR}
|
||||||
|
|
||||||
${OBJ_BY_DC_DIR}:
|
${OBJ_BY_DC_DIR}:
|
||||||
mkdir -p ${OBJ_BY_DC_DIR}
|
mkdir -p $@
|
||||||
|
|
||||||
|
${UT_OBJ_BY_DC}: | ${UT_OBJ_BY_DC_DIR}
|
||||||
|
|
||||||
|
${UT_OBJ_BY_DC_DIR}:
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
${DSCANNER_BIN_DIR}:
|
${DSCANNER_BIN_DIR}:
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
|
||||||
|
${UT_DSCANNER_LIB_DIR}:
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
all: ${DSCANNER_BIN}
|
all: ${DSCANNER_BIN}
|
||||||
ldc: ${DSCANNER_BIN}
|
ldc: ${DSCANNER_BIN}
|
||||||
gdc: ${DSCANNER_BIN}
|
gdc: ${DSCANNER_BIN}
|
||||||
|
@ -113,8 +124,8 @@ debug: ${GITHASH}
|
||||||
${DC} -w -g -Jbin -ofdsc ${VERSIONS} ${DEBUG_VERSIONS} ${INCLUDE_PATHS} ${SRC}
|
${DC} -w -g -Jbin -ofdsc ${VERSIONS} ${DEBUG_VERSIONS} ${INCLUDE_PATHS} ${SRC}
|
||||||
|
|
||||||
# compile the dependencies separately, s.t. their unittests don't get executed
|
# compile the dependencies separately, s.t. their unittests don't get executed
|
||||||
${UT_DSCANNER_LIB}: ${LIB_SRC} | ${DSCANNER_BIN_DIR}
|
${UT_DSCANNER_LIB}: ${LIB_SRC} | ${UT_DSCANNER_LIB_DIR}
|
||||||
${DC} ${DC_TEST_FLAGS} -c ${VERSIONS} ${INCLUDE_PATHS} ${LIB_SRC} ${WRITE_TO_TARGET_NAME}
|
${DC} ${DC_DEBUG_FLAGS} -c ${VERSIONS} ${INCLUDE_PATHS} ${LIB_SRC} ${WRITE_TO_TARGET_NAME}
|
||||||
|
|
||||||
test: ${UT_DSCANNER_BIN}
|
test: ${UT_DSCANNER_BIN}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue