make: rename sub-makefiles; start moving site script to make/shake
[ci skip
This commit is contained in:
parent
08d694610d
commit
51d3395564
39
Makefile
39
Makefile
@ -36,7 +36,7 @@
|
|||||||
# (see the file for more details), and a "help" target (our default).
|
# (see the file for more details), and a "help" target (our default).
|
||||||
# Every useful rule in this makefile should use def-help to describe itself.
|
# Every useful rule in this makefile should use def-help to describe itself.
|
||||||
# "make" or "make help" will show these descriptions.
|
# "make" or "make help" will show these descriptions.
|
||||||
-include help-system.mk
|
-include Makefile.helpsys
|
||||||
|
|
||||||
# Some calls and dummy targets to augment the default help output.
|
# Some calls and dummy targets to augment the default help output.
|
||||||
# Also, help-SUBSTR and SUBSTR-help targets to show only matching help.
|
# Also, help-SUBSTR and SUBSTR-help targets to show only matching help.
|
||||||
@ -636,15 +636,6 @@ quickheap-%: hledgerprof samplejournals \
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
$(call def-help-subheading,DOCUMENTATION: (see also Shake.hs))
|
$(call def-help-subheading,DOCUMENTATION: (see also Shake.hs))
|
||||||
|
|
||||||
site-liverender: Shake \
|
|
||||||
$(call def-help,site-liverender, update the website html when source files are saved )
|
|
||||||
ls $(DOCSOURCEFILES) | entr ./Shake website
|
|
||||||
|
|
||||||
site-livereload: \
|
|
||||||
$(call def-help,site-livereload, open a browser on the website html and reload the page when it updates )
|
|
||||||
(sleep 1; open http://localhost:8001) &
|
|
||||||
livereloadx -p 8001 --static site/_site
|
|
||||||
|
|
||||||
# cf http://www.haskell.org/haddock/doc/html/invoking.html
|
# cf http://www.haskell.org/haddock/doc/html/invoking.html
|
||||||
# --ghc-options=-optP-P is a workaround for http://trac.haskell.org/haddock/ticket/284
|
# --ghc-options=-optP-P is a workaround for http://trac.haskell.org/haddock/ticket/284
|
||||||
HADDOCKFLAGS= \
|
HADDOCKFLAGS= \
|
||||||
@ -653,7 +644,7 @@ HADDOCKFLAGS= \
|
|||||||
|
|
||||||
haddock: \
|
haddock: \
|
||||||
$(call def-help,haddock, generate haddock docs for the hledger packages )
|
$(call def-help,haddock, generate haddock docs for the hledger packages )
|
||||||
$(STACK) haddock --no-haddock-deps --no-keep-going # && echo OK
|
$(STACK) haddock --no-haddock-deps --no-keep-going
|
||||||
# $(STACK) -v haddock --no-haddock-deps --no-keep-going # && echo OK
|
# $(STACK) -v haddock --no-haddock-deps --no-keep-going # && echo OK
|
||||||
|
|
||||||
# view-haddock: \
|
# view-haddock: \
|
||||||
@ -698,6 +689,26 @@ haddock: \
|
|||||||
# # cd site/api && \
|
# # cd site/api && \
|
||||||
# # hoogle --convert=main.txt --output=default.hoo
|
# # hoogle --convert=main.txt --output=default.hoo
|
||||||
|
|
||||||
|
site-liverender: Shake \
|
||||||
|
$(call def-help,site-liverender, update the local website html when source files are saved )
|
||||||
|
ls $(DOCSOURCEFILES) | entr ./Shake website
|
||||||
|
|
||||||
|
site-livereload: \
|
||||||
|
$(call def-help,site-livereload, open a browser on the local website html and reload the page when it updates )
|
||||||
|
(sleep 1; open http://localhost:8001) &
|
||||||
|
livereloadx -p 8001 --static site/_site
|
||||||
|
|
||||||
|
# This rule, for updating the live hledger.org site, gets called by:
|
||||||
|
# 1. github-post-receive (github webhook handler), when something is pushed
|
||||||
|
# to the main or wiki repos on Github. Config:
|
||||||
|
# /etc/supervisord.conf -> [program:github-post-receive]
|
||||||
|
# /etc/github-post-receive.conf
|
||||||
|
# 2. cron, nightly. Config: /etc/crontab
|
||||||
|
# 3. manually (make site).
|
||||||
|
.PHONY: site
|
||||||
|
site: \
|
||||||
|
$(call def-help,site, update the hledger.org website (run on prod) )
|
||||||
|
@tools/site.sh
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
$(call def-help-subheading,RELEASING:)
|
$(call def-help-subheading,RELEASING:)
|
||||||
@ -960,9 +971,11 @@ Clean: stackclean cabalclean cleanghc cleantags clean-manpages \
|
|||||||
# reverse = $(if $(wordlist 2,2,$(1)),$(call reverse,$(wordlist 2,$(words $(1)),$(1))) $(firstword $(1)),$(1))
|
# reverse = $(if $(wordlist 2,2,$(1)),$(call reverse,$(wordlist 2,$(words $(1)),$(1))) $(firstword $(1)),$(1))
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# LOCAL UNTRACKED CUSTOMISATIONS
|
# END
|
||||||
|
|
||||||
-include local.mk
|
# optional local customisations, not in version control
|
||||||
|
-include Makefile.local
|
||||||
|
|
||||||
|
# show a final message in make help
|
||||||
$(call def-help-heading,)
|
$(call def-help-heading,)
|
||||||
$(call def-help-heading,See also ./Shake help (after make Shake))
|
$(call def-help-heading,See also ./Shake help (after make Shake))
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
# /etc/github-post-receive.conf
|
# /etc/github-post-receive.conf
|
||||||
# and via cron (nightly)
|
# and via cron (nightly)
|
||||||
# /etc/crontab
|
# /etc/crontab
|
||||||
# or manually (make deploy)
|
# or manually (make site)
|
||||||
|
|
||||||
(\
|
(\
|
||||||
|
|
||||||
@ -31,4 +31,4 @@ export LANG=en_US.UTF-8 && \
|
|||||||
./Shake website \
|
./Shake website \
|
||||||
|
|
||||||
# print and log to:
|
# print and log to:
|
||||||
) 2>&1 | tee -a deploy.log
|
) 2>&1 | tee -a site.log
|
||||||
Loading…
Reference in New Issue
Block a user