mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-16 00:37:33 +03:00
make: fix haddock[-watch|-open]
This commit is contained in:
parent
efc154a1cb
commit
37bb9a03be
33
Makefile
33
Makefile
@ -792,30 +792,35 @@ quickheap-%: hledgerprof samplejournals \
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
$(call def-help-subheading,DOCUMENTATION: (see also Shake.hs))
|
$(call def-help-subheading,DOCUMENTATION: (see also Shake.hs))
|
||||||
|
|
||||||
# cf http://www.haskell.org/haddock/doc/html/invoking.html
|
# http://www.haskell.org/haddock/doc/html/invoking.html
|
||||||
# --ghc-options=-optP-P is a workaround for http://trac.haskell.org/haddock/ticket/284
|
STACKHADDOCK=time $(STACK) --verbosity=error haddock --fast --no-keep-going \
|
||||||
HADDOCKFLAGS= \
|
--only-locals --no-haddock-deps --no-haddock-hyperlink-source \
|
||||||
--haddock-options='--no-warnings' \
|
--haddock-arguments="--no-warnings"
|
||||||
--ghc-options='-optP-P' \
|
# -ghc-options='-optP-P' # workaround for http://trac.haskell.org/haddock/ticket/284
|
||||||
|
|
||||||
|
# uncomment to run haddock on fewer packages, saving time
|
||||||
|
#HADDOCKPKGS=hledger-lib
|
||||||
|
|
||||||
releasediag: \
|
releasediag: \
|
||||||
$(call def-help,releasediag, optimise and commit RELEASING value map diagram )
|
$(call def-help,releasediag, optimise and commit RELEASING value map diagram )
|
||||||
pngquant doc/HledgerReleaseValueMap.png -f -o doc/HledgerReleaseValueMap.png && git add doc/HledgerReleaseValueMap.png && git commit -m ';doc: RELEASING: update value map' -- doc/HledgerReleaseValueMap.png
|
pngquant doc/HledgerReleaseValueMap.png -f -o doc/HledgerReleaseValueMap.png && git add doc/HledgerReleaseValueMap.png && git commit -m ';doc: RELEASING: update value map' -- doc/HledgerReleaseValueMap.png
|
||||||
|
|
||||||
haddock: \
|
haddock: \
|
||||||
$(call def-help,haddock, generate haddock docs for the hledger packages )
|
$(call def-help,haddock, regenerate haddock docs for the hledger packages and open them )
|
||||||
$(STACK) haddock --no-haddock-deps --fast --no-keep-going
|
$(STACKHADDOCK) $(HADDOCKPKGS) && make -s haddock-open # --open shows all deps and packages
|
||||||
# $(STACK) -v
|
|
||||||
|
|
||||||
haddock-watch: \
|
haddock-watch: \
|
||||||
$(call def-help,haddock-watch, regenerate haddock docs )
|
$(call def-help,haddock-watch, regenerate haddock docs when files change )
|
||||||
$(STACK) haddock --no-haddock-deps --fast --file-watch
|
$(STACKHADDOCK) $(HADDOCK_PKGS) --file-watch --exec='echo done'
|
||||||
|
|
||||||
|
haddock-watch2: \
|
||||||
|
$(call def-help,haddock-watch2, regenerate haddock docs when files change )
|
||||||
|
watchexec -r -e yaml,cabal,hs --print-events -- \
|
||||||
|
$(STACKHADDOCK) $(HADDOCK_PKGS) --exec="'echo done'"0
|
||||||
|
|
||||||
haddock-open: \
|
haddock-open: \
|
||||||
$(call def-help,haddock-open,\
|
$(call def-help,haddock-open, open the haddock root (hledger-lib:Hledger) in a browser )
|
||||||
browse the haddock generated for hledger-lib\
|
$(BROWSE) `stack path --local-install-root`/doc/hledger-lib-`cat .version`/index.html
|
||||||
)
|
|
||||||
$(VIEWHTML) hledger/dist/doc/html/hledger-lib/index.html
|
|
||||||
|
|
||||||
hoogle-setup: $(call def-help,hoogle-setup, install hoogle then build haddocks and a hoogle db for the project and all deps )
|
hoogle-setup: $(call def-help,hoogle-setup, install hoogle then build haddocks and a hoogle db for the project and all deps )
|
||||||
stack hoogle --rebuild
|
stack hoogle --rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user