@@ -277,6 +277,12 @@ DDOC_VARS_PRERELEASE_VERBATIM=$(DDOC_VARS_PRERELEASE) \
277
277
DOC_OUTPUT_DIR="$W/phobos-prerelease-verbatim" \
278
278
STDDOC="$(PWD ) /verbatim.ddoc"
279
279
280
+ # ###############################################################################
281
+ # Ddoc binaries
282
+ # ###############################################################################
283
+
284
+ DDOC_BIN: =$G/ddoc
285
+
280
286
# ###############################################################################
281
287
# Resources
282
288
# ###############################################################################
@@ -460,8 +466,8 @@ $W/changelog/pending.html : changelog/pending.dd $(CHANGELOG_PENDING_DDOC) $(DMD
460
466
$W/changelog/% .html : changelog/% .dd $(CHANGELOG_DDOC ) $(DMD )
461
467
$(DMD ) -conf= -c -o- -Df$@ $(CHANGELOG_DDOC ) $<
462
468
463
- $W/spec/% .html : spec/% .dd $(SPEC_DDOC ) $(DMD )
464
- $(DMD ) -c -o- -Df $@ $(SPEC_DDOC ) $<
469
+ $W/spec/% .html : spec/% .dd $(SPEC_DDOC ) $(DMD ) $( DDOC_BIN )
470
+ $(DDOC_BIN ) --compiler= $( DMD ) -o $@ $(SPEC_DDOC ) $<
465
471
466
472
$W/404.html : 404.dd $(DDOC ) $(DMD )
467
473
$(DMD ) -conf= -c -o- -Df$@ $(DDOC ) errorpage.ddoc $<
@@ -947,4 +953,15 @@ $G/contributors_list.ddoc: | $(STABLE_RDMD) $(TOOLS_DIR) $(INSTALLER_DIR)
947
953
echo " D_CONTRIBUTORS=" >> $@
948
954
cat $G /contributors_list.tmp >> $@
949
955
956
+ # ###############################################################################
957
+ # Custom DDoc wrapper
958
+ # ------------------
959
+ #
960
+ # This allows extending Ddoc files dynamically on-the-fly.
961
+ # It is currently only used for the specification pages
962
+ # ###############################################################################
963
+
964
+ $(DDOC_BIN ) : ddoc.d | $(STABLE_DMD )
965
+ $(STABLE_DMD ) -of$@ $<
966
+
950
967
.DELETE_ON_ERROR : # GNU Make directive (delete output files on error)
0 commit comments