diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-03-03 13:52:03 +0000 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-03-04 12:29:25 +0000 |
commit | d31f8790f37498c382a1bee3fd59e70be86cf8cd (patch) | |
tree | 74e522c6145ab497ffdaa9c52b4fed1bbb422a72 | |
parent | 106b9dbdb7ce24e12c50f35413de64a52d17b39b (diff) | |
download | haskell-wip/deb10-hadrian-ci.tar.gz |
Fix gen_contents_index logic for hadrian bindistwip/deb10-hadrian-ci
-rwxr-xr-x | distrib/mkDocs/mkDocs | 11 | ||||
-rw-r--r-- | hadrian/bindist/Makefile | 3 | ||||
-rw-r--r-- | hadrian/src/Rules/BinaryDist.hs | 3 | ||||
-rw-r--r-- | libraries/gen_contents_index | 13 |
4 files changed, 26 insertions, 4 deletions
diff --git a/distrib/mkDocs/mkDocs b/distrib/mkDocs/mkDocs index 641d945cfa..b11c9dde78 100755 --- a/distrib/mkDocs/mkDocs +++ b/distrib/mkDocs/mkDocs @@ -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 diff --git a/hadrian/bindist/Makefile b/hadrian/bindist/Makefile index 3ae599452f..fdeb06ace5 100644 --- a/hadrian/bindist/Makefile +++ b/hadrian/bindist/Makefile @@ -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" diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs index a6693a75f3..f07c455e38 100644 --- a/hadrian/src/Rules/BinaryDist.hs +++ b/hadrian/src/Rules/BinaryDist.hs @@ -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 diff --git a/libraries/gen_contents_index b/libraries/gen_contents_index index 29be2e13f9..1efd5eb157 100644 --- a/libraries/gen_contents_index +++ b/libraries/gen_contents_index @@ -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" |