Skip to content
Snippets Groups Projects
Commit 5b35ca58 authored by Matthew Pickering's avatar Matthew Pickering Committed by Marge Bot
Browse files

Fix gen_contents_index logic for hadrian bindist

parent 7bfae2ee
No related branches found
No related tags found
No related merge requests found
......@@ -40,13 +40,18 @@ mv ../../../../../../windows/doc/html/libraries/Win32-* . || \
sh gen_contents_index
cd ..
for i in haddock libraries users_guide
for i in */
do
tar -Jcf ../../../../../$i.html.tar.xz $i
dir=${i%*/}
tar -Jcf ../../../../../$dir.html.tar.xz $dir
done
mv index.html ../../../../..
cd ..
mv ./*.pdf ../../../..
# make
mv ./*.pdf ../../../.. || \
# hadrian
mv ./pdfs/*.pdf ../../../.. || \
die "failed to find PDFs"
cd ../../../..
[ "$NO_CLEAN" -eq 0 ] && rm -r inst
[ "$NO_CLEAN" -eq 0 ] && rm -r windows
......
......@@ -190,6 +190,9 @@ install_docs:
cp -R $$i "$(docdir)/"; \
done
$(INSTALL_DATA) docs-utils/prologue.txt "$(docdir)/html/libraries/"
$(INSTALL_SCRIPT) docs-utils/gen_contents_index "$(docdir)/html/libraries/"
BINARY_NAMES=$(shell ls ./wrappers/)
install_wrappers: install_bin_libdir
@echo "Installing wrapper scripts"
......
......@@ -227,6 +227,9 @@ bindistRules = do
-- included in the bindist in the past (part of the problem in #18669).
whenM (liftIO (IO.doesDirectoryExist (root -/- "docs"))) $ do
copyDirectory (root -/- "docs") bindistFilesDir
copyFile ("libraries" -/- "prologue.txt") (bindistFilesDir -/- "docs-utils" -/- "prologue.txt")
copyFile ("libraries" -/- "gen_contents_index") (bindistFilesDir -/- "docs-utils" -/- "gen_contents_index" )
when windowsHost $ do
copyDirectory (root -/- "mingw") bindistFilesDir
-- we use that opportunity to delete the .stamp file that we use
......
......@@ -32,7 +32,18 @@ then
[ -d dist-haddock ] || mkdir dist-haddock
cd dist-haddock
HADDOCK=../../inplace/bin/haddock
if [ -e ../../inplace/bin/haddock ]
then
# Make #17527
HADDOCK=../../inplace/bin/haddock
elif [ -e ../../../../../bin/haddock ]
then
# Hadrian
HADDOCK=../../../../../bin/haddock
else
echo "Haddock not found"
exit 1
fi
# Exclude Cabal package-tests, which may run haddock
HADDOCK_FILES=`find ../ -name *.haddock | grep -v 'PackageTests' | sort`
HADDOCK_ARGS="-p ../prologue.txt"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment