;tools: just, make, shake: cleanup

This commit is contained in:
Simon Michael 2023-12-09 00:15:17 -10:00
parent 7b8df1d34f
commit 36e1380674
3 changed files with 15 additions and 38 deletions

View File

@ -1,8 +1,6 @@
# One of two project scripts files (Makefile, Shake.hs). # Project scripts, some with file dependencies, using GNU Make.
# This one was a reboot of Makefile.old. # Soon to be migrated to justfile or Shake.hs hopefully.
# It is probably used by hledger developers/contributors but not end-users. # Also uses tools like
# It requires GNU Make (https://www.gnu.org/software/make/).
# Also, some rules may require:
# - stack (http://haskell-lang.org/get-started, installs libs and runs ghc) # - stack (http://haskell-lang.org/get-started, installs libs and runs ghc)
# - shelltestrunner (hackage, runs functional tests) # - shelltestrunner (hackage, runs functional tests)
# - quickbench (hackage/stackage, runs benchmarks) # - quickbench (hackage/stackage, runs benchmarks)
@ -12,21 +10,6 @@
# - profiteur (hackage/stackage, renders profiles as html) # - profiteur (hackage/stackage, renders profiles as html)
# - hpack (hackage/stackage, generates cabal files from package.yaml files) # - hpack (hackage/stackage, generates cabal files from package.yaml files)
# - perl # - perl
#
# Kinds of hledger builds:
#
# - stack build: built with stack
# (hledger/.stack-work/dist/ARCH/CABAL/build/hledger/hledger,
# .stack-work/install/ARCH/SNAPSHOT/GHC/bin/hledger, installs to ~/.local/bin)
# - cabal (v1) build: built with cabal (and maybe a sandbox)
# (hledger/dist/build/hledger/hledger, installs to ~/.cabal/bin)
# - ghc-only build: built quickly with ghc only, unoptimised, with DEVELOPMENT flag
# (hledgerdev)
#
# This makefile mostly uses stack to get things done (slow but robust).
# It may sometimes (still ?) use ghc only, or cabal, when easier.
# see also: https://gmsl.sourceforge.io/
# XXX do we need this ? # XXX do we need this ?
#SHELL=/bin/bash #SHELL=/bin/bash

View File

@ -14,22 +14,12 @@
-- add this to see packages being installed instead of a long silence: -- add this to see packages being installed instead of a long silence:
--verbosity=info --verbosity=info
This is one of two collections of maintainer/developer scripts; Makefile is the other. Heavy project scripts, with file dependencies, using https://shakebuild.com.
This one, based on shake, provides a stronger programming language and See also justfile, Makefile.
more platform independence. It requires stack and will auto-install Also uses tools like:
the haskell packages above when needed.
Some of the commands below require additional command-line tools, including:
- hpack (same version that's in current stack release) - hpack (same version that's in current stack release)
- GNU date (on mac: brew install coreutils) - GNU date (on mac, get it with brew install coreutils)
- groff - pandoc, groff, m4, makeinfo, sed, mv, cat, rm
- m4
- makeinfo
- pandoc
- sed
- mv
- cat
- rm
Some things that may be useful when working on this: Some things that may be useful when working on this:
- https://docs.haskellstack.org/en/stable/GUIDE/#script-interpreter - https://docs.haskellstack.org/en/stable/GUIDE/#script-interpreter
@ -66,7 +56,7 @@ usage =
let scriptname = "Shake" in replaceRe [re|/Shake|] ('/':scriptname) $ let scriptname = "Shake" in replaceRe [re|/Shake|] ('/':scriptname) $
unlines unlines
---------------------------------------79-------------------------------------- ---------------------------------------79--------------------------------------
["Shake: heavy project scripting. See also: make, ./bake" ["Shake: heavy project scripting. See also: justfile, Makefile"
,"Usage:" ,"Usage:"
,"./Shake.hs [CMD [ARGS]] run CMD, compiling this script first if needed" ,"./Shake.hs [CMD [ARGS]] run CMD, compiling this script first if needed"
,"./Shake [CMD [ARGS]] run CMD, using the compiled version of this script" ,"./Shake [CMD [ARGS]] run CMD, using the compiled version of this script"

View File

@ -1,5 +1,9 @@
# * project task scripts managed with https://github.com/casey/just. #!/usr/bin/env just
# This aspires to gradually replace Makefile and bake. # * Light project scripts, without file dependendencies, using https://github.com/casey/just.
# https://docs.rs/regex/1.5.4/regex/#syntax Regexps
# https://just.systems/man/en/chapter_31.html Functions
# See also Makefile, Shake.hs
@help: @help:
just -lu just -lu