Skip to content

Commit 758c173

Browse files
committed
Use DUB from the release binary
1 parent e52cd25 commit 758c173

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

posix.mak

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@ PHOBOS_DIR=../phobos
2424
DRUNTIME_DIR=../druntime
2525
TOOLS_DIR=../tools
2626
INSTALLER_DIR=../installer
27-
DUB_DIR=../dub-${DUB_VER}
2827

2928
include $(DMD_DIR)/src/osmodel.mak
3029

3130
# External binaries
3231
DMD=$(DMD_DIR)/generated/$(OS)/release/$(MODEL)/dmd
33-
DUB=${DUB_DIR}/bin/dub
3432

3533
# External directories
3634
DOC_OUTPUT_DIR:=$(PWD)/web
@@ -65,14 +63,14 @@ PHOBOS_STABLE_FILES_GENERATED := $(subst $(PHOBOS_STABLE_DIR), $(PHOBOS_STABLE_D
6563
################################################################################
6664

6765
# stable dub and dmd versions used to build dpl-docs
68-
DUB_VER=1.1.0
6966
STABLE_DMD_VER=2.072.2
7067
STABLE_DMD_ROOT=$(GENERATED)/stable_dmd-$(STABLE_DMD_VER)
7168
STABLE_DMD_URL=http://downloads.dlang.org/releases/2.x/$(STABLE_DMD_VER)/dmd.$(STABLE_DMD_VER).$(OS).zip
72-
STABLE_DMD=$(STABLE_DMD_ROOT)/dmd2/$(OS)/$(if $(filter $(OS),osx),bin,bin$(MODEL))/dmd
69+
STABLE_DMD_BIN_ROOT=$(STABLE_DMD_ROOT)/dmd2/$(OS)/$(if $(filter $(OS),osx),bin,bin$(MODEL))
70+
STABLE_DMD=$(STABLE_DMD_BIN_ROOT)/dmd
7371
STABLE_DMD_CONF=$(STABLE_DMD).conf
74-
STABLE_RDMD=$(STABLE_DMD_ROOT)/dmd2/$(OS)/$(if $(filter $(OS),osx),bin,bin$(MODEL))/rdmd \
75-
--compiler=$(STABLE_DMD) -conf=$(STABLE_DMD_CONF)
72+
STABLE_RDMD=$(STABLE_DMD_BIN_ROOT)/rdmd --compiler=$(STABLE_DMD) -conf=$(STABLE_DMD_CONF)
73+
DUB=$(STABLE_DMD_BIN_ROOT)/dub
7674

7775
# exclude lists
7876
MOD_EXCLUDES_PRERELEASE=$(addprefix --ex=, gc. rt. core.internal. core.stdc.config core.sys. \
@@ -276,7 +274,7 @@ clean:
276274
rm -rf $(DOC_OUTPUT_DIR) ${GENERATED} dpl-docs/.dub
277275
rm -rf auto dlangspec-consolidated.d $(addprefix dlangspec,.aux .d .dvi .fdb_latexmk .fls .log .out .pdf .tex .txt .verbatim.txt)
278276
rm -f docs.json docs-prerelease.json dpl-docs/dpl-docs
279-
@echo You should issue manually: rm -rf ${DMD_STABLE_DIR} ${DRUNTIME_STABLE_DIR} ${PHOBOS_STABLE_DIR} ${STABLE_DMD_ROOT} ${DUB_DIR}
277+
@echo You should issue manually: rm -rf ${DMD_STABLE_DIR} ${DRUNTIME_STABLE_DIR} ${PHOBOS_STABLE_DIR} ${STABLE_DMD_ROOT}
280278

281279
RSYNC_FILTER=-f 'P /Usage' -f 'P /.dpl_rewrite*' -f 'P /install.sh*'
282280

@@ -408,9 +406,6 @@ $G/twid_latest.ddoc:
408406
../%-${LATEST} :
409407
git clone -b v${LATEST} --depth=1 ${GIT_HOME}/$(notdir $*) $@
410408

411-
../%-${DUB_VER} :
412-
git clone --depth=1 -b v${DUB_VER} ${GIT_HOME}/$(notdir $*) $@
413-
414409
${DMD_DIR} ${DRUNTIME_DIR} ${PHOBOS_DIR} ${TOOLS_DIR} ${INSTALLER_DIR}:
415410
git clone --depth=1 ${GIT_HOME}/$(notdir $(@F)) $@
416411

@@ -578,13 +573,13 @@ dpl-docs: ${DUB} ${STABLE_DMD}
578573
DFLAGS="$(DPL_DOCS_DFLAGS)" ${DUB} build --root=${DPL_DOCS_PATH} \
579574
--compiler=${STABLE_DMD}
580575

581-
${STABLE_DMD}:
576+
${STABLE_DMD_ROOT}/.downloaded:
582577
mkdir -p ${STABLE_DMD_ROOT}
583-
TMPFILE=$$(mktemp deleteme.XXXXXXXX) && curl -fsSL ${STABLE_DMD_URL} > ${TMP}/$${TMPFILE}.zip && \
584-
unzip -qd ${STABLE_DMD_ROOT} ${TMP}/$${TMPFILE}.zip && rm ${TMP}/$${TMPFILE}.zip
578+
TMPFILE=$$(mktemp ${TMP}/dmd-download-deleteme.XXXXXXXX) && curl -fsSL ${STABLE_DMD_URL} > $${TMPFILE}.zip && \
579+
unzip -qd ${STABLE_DMD_ROOT} $${TMPFILE}.zip && rm $${TMPFILE}.zip
580+
touch $@
585581

586-
${DUB}: | ${DUB_DIR} ${STABLE_DMD}
587-
cd ${DUB_DIR} && DMD="$(abspath ${STABLE_DMD})" ./build.sh
582+
${STABLE_DMD} ${STABLE_RDMD} ${DUB}: ${STABLE_DMD_ROOT}/.downloaded
588583

589584
################################################################################
590585
# chm help files

0 commit comments

Comments
 (0)