Skip to content

Commit d2debb3

Browse files
committed
Start to remove platform-specific Ddox hacks
1 parent 412ec75 commit d2debb3

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
@@ -713,49 +713,45 @@ $W/library-prerelease/.htaccess : dpl_prerelease_htaccess
713713
@mkdir -p $(dir $@)
714714
cp $< $@
715715

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

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

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

0 commit comments

Comments
 (0)