mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 21:51:03 +03:00
Top-level Makefile: Extract {dmd,druntime}[-test] targets
For convenience, and to make the compiler build triggered from druntime/posix.mak more robust.
This commit is contained in:
parent
fa9731559a
commit
4c06834bdf
2 changed files with 25 additions and 11 deletions
31
Makefile
31
Makefile
|
@ -29,13 +29,12 @@ GENERATED=generated
|
||||||
BUILD_EXE=$(GENERATED)/build$(EXE)
|
BUILD_EXE=$(GENERATED)/build$(EXE)
|
||||||
RUN_EXE=$(GENERATED)/run$(EXE)
|
RUN_EXE=$(GENERATED)/run$(EXE)
|
||||||
|
|
||||||
.PHONY: all clean test install auto-tester-build auto-tester-test toolchain-info
|
.PHONY: all clean test html install \
|
||||||
|
dmd dmd-test druntime druntime-test \
|
||||||
|
auto-tester-build auto-tester-test buildkite-test \
|
||||||
|
toolchain-info check-clean-git style
|
||||||
|
|
||||||
all: $(BUILD_EXE)
|
all: dmd druntime
|
||||||
$(BUILD_EXE) dmd
|
|
||||||
ifneq (windows,$(OS))
|
|
||||||
$(QUIET)$(MAKE) -C druntime -f posix.mak target
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(BUILD_EXE): compiler/src/build.d
|
$(BUILD_EXE): compiler/src/build.d
|
||||||
$(HOST_DMD) -of$@ -g $<
|
$(HOST_DMD) -of$@ -g $<
|
||||||
|
@ -62,13 +61,29 @@ ifneq (windows,$(OS))
|
||||||
$(QUIET)$(MAKE) -C druntime -f posix.mak clean
|
$(QUIET)$(MAKE) -C druntime -f posix.mak clean
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test: all $(BUILD_EXE) $(RUN_EXE)
|
dmd: $(BUILD_EXE)
|
||||||
|
$(BUILD_EXE) $@
|
||||||
|
|
||||||
|
dmd-test: dmd druntime $(BUILD_EXE) $(RUN_EXE)
|
||||||
$(BUILD_EXE) unittest
|
$(BUILD_EXE) unittest
|
||||||
$(RUN_EXE) --environment
|
$(RUN_EXE) --environment
|
||||||
ifneq (windows,$(OS))
|
|
||||||
|
druntime: dmd
|
||||||
|
ifeq (windows,$(OS))
|
||||||
|
@echo "Building druntime via top-level Makefile on Windows will come soon"
|
||||||
|
else
|
||||||
|
$(QUIET)$(MAKE) -C druntime -f posix.mak
|
||||||
|
endif
|
||||||
|
|
||||||
|
druntime-test: dmd
|
||||||
|
ifeq (windows,$(OS))
|
||||||
|
@echo "Testing druntime via top-level Makefile on Windows will come soon"
|
||||||
|
else
|
||||||
$(QUIET)$(MAKE) -C druntime -f posix.mak unittest
|
$(QUIET)$(MAKE) -C druntime -f posix.mak unittest
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
test: dmd-test druntime-test
|
||||||
|
|
||||||
html: $(BUILD_EXE)
|
html: $(BUILD_EXE)
|
||||||
$(BUILD_EXE) $@
|
$(BUILD_EXE) $@
|
||||||
|
|
||||||
|
|
|
@ -350,9 +350,8 @@ $(IMPDIR)/%.h : src/%.h
|
||||||
|
|
||||||
######################## Build DMD if non-existent ##############################
|
######################## Build DMD if non-existent ##############################
|
||||||
|
|
||||||
$(DMD):
|
$(DMD_DIR)/../generated/$(OS)/$(BUILD)/$(MODEL)/dmd:
|
||||||
$(MAKE) -C .. generated/build DMD=""
|
$(MAKE) -C $(DMD_DIR)/.. dmd BUILD=$(BUILD) OS=$(OS) MODEL=$(MODEL) DMD=""
|
||||||
../generated/build dmd BUILD=$(BUILD) OS=$(OS) MODEL=$(MODEL)
|
|
||||||
|
|
||||||
################### C/ASM Targets ############################
|
################### C/ASM Targets ############################
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue