Skip to content

Commit 5e49319

Browse files
authored
Merge pull request #2040 from wilzbach/remove-platform-hacks
Start to remove platform-specific Ddox hacks merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2 parents 74806b1 + d2debb3 commit 5e49319

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

posix.mak

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -711,49 +711,45 @@ $W/library-prerelease/.htaccess : dpl_prerelease_htaccess
711711
@mkdir -p $(dir $@)
712712
cp $< $@
713713

714-
DMD_EXCLUDE =
714+
# Can be removed after 2.079.0 (2018-03-01) (see https://github.com/dlang/dmd/pull/7567 for details)
715+
DMD_EXCLUDE_LATEST = -e /mscoff/d
715716
ifeq (osx,$(OS))
716-
DMD_EXCLUDE += -e /scanelf/d -e /libelf/d
717+
DMD_EXCLUDE_LATEST += -e /scanelf/d -e /libelf/d
717718
else
718-
DMD_EXCLUDE += -e /scanmach/d -e /libmach/d
719+
DMD_EXCLUDE_LATEST += -e /scanmach/d -e /libmach/d
719720
endif
720721

721722
$G/docs-latest.json : ${DMD_LATEST} ${DMD_LATEST_DIR} \
722723
${DRUNTIME_LATEST_DIR} ${PHOBOS_LATEST_FILES_GENERATED} | dpl-docs
723724
# remove this after https://github.com/dlang/dmd/pull/7513 has been merged
724725
if [ -f $(DMD_LATEST_DIR)/src/*/objc_glue_stubs.d ] ; then \
725-
DMD_EXCLUDE_LATEST="-e /objc_glue.d/d"; \
726+
DMD_EXCLUDE_LATEST_BASH="-e /objc_glue.d/d"; \
726727
fi; \
727728
find ${DMD_LATEST_DIR}/src -name '*.d' | \
728-
sed -e /mscoff/d $${DMD_EXCLUDE_LATEST} ${DMD_EXCLUDE} \
729-
> $G/.latest-files.txt
729+
sed -e /mscoff/d $${DMD_EXCLUDE_LATEST_BASH} ${DMD_EXCLUDE_LATEST}
730730
find ${DRUNTIME_LATEST_DIR}/src -name '*.d' | \
731731
sed -e /unittest.d/d -e /gcstub/d >> $G/.latest-files.txt
732732
find ${PHOBOS_LATEST_DIR_GENERATED} -name '*.d' | \
733-
sed -e /unittest.d/d -e /windows/d | sort >> $G/.latest-files.txt
733+
sed -e /unittest.d/d | sort >> $G/.latest-files.txt
734734
${DMD_LATEST} -J$(DMD_LATEST_DIR)/res -J$(dir $(DMD_LATEST)) -c -o- -version=CoreDdoc \
735735
-version=MARS -version=CoreDdoc -version=StdDdoc -Df$G/.latest-dummy.html \
736736
-Xf$@ -I${PHOBOS_LATEST_DIR_GENERATED} @$G/.latest-files.txt
737737
${DPL_DOCS} filter $@ --min-protection=Protected \
738738
--only-documented $(MOD_EXCLUDES_LATEST)
739739
rm -f $G/.latest-files.txt $G/.latest-dummy.html
740740

741-
# DDox tries to generate the docs for all `.d` files. However for dmd this is tricky,
742-
# because the `{mach, elf, mscoff}` are platform dependent.
743-
# Thus the need to exclude these files.
744741
$G/docs-prerelease.json : ${DMD} ${DMD_DIR} ${DRUNTIME_DIR} \
745742
${PHOBOS_FILES_GENERATED} | dpl-docs
746743
# remove this after https://github.com/dlang/dmd/pull/7513 has been merged
747744
if [ -f $(DMD_DIR)/src/*/objc_glue_stubs.d ] ; then \
748745
DMD_EXCLUDE_PRERELEASE="-e /objc_glue.d/d"; \
749746
fi; \
750747
find ${DMD_DIR}/src -name '*.d' | \
751-
sed -e /mscoff/d $${DMD_EXCLUDE_PRERELEASE} ${DMD_EXCLUDE} \
752-
> $G/.prerelease-files.txt
753-
find ${DRUNTIME_DIR}/src -name '*.d' | sed -e '/gcstub/d' \
754-
-e /unittest/d >> $G/.prerelease-files.txt
755-
find ${PHOBOS_DIR_GENERATED} -name '*.d' | sed -e /unittest.d/d \
756-
-e /windows/d | sort >> $G/.prerelease-files.txt
748+
sed -e /mscoff/d $${DMD_EXCLUDE_PRERELEASE} > $G/.prerelease-files.txt
749+
find ${DRUNTIME_DIR}/src -name '*.d' | \
750+
sed -e /unittest/d >> $G/.prerelease-files.txt
751+
find ${PHOBOS_DIR_GENERATED} -name '*.d' | \
752+
sed -e /unittest.d/d | sort >> $G/.prerelease-files.txt
757753
${DMD} -J$(DMD_DIR)/res -J$(dir $(DMD)) -c -o- -version=MARS -version=CoreDdoc \
758754
-version=StdDdoc -Df$G/.prerelease-dummy.html \
759755
-Xf$@ -I${PHOBOS_DIR_GENERATED} @$G/.prerelease-files.txt

0 commit comments

Comments
 (0)