;shake: build can take package arguments, drop Shake PKG
This commit is contained in:
parent
a1321b7f26
commit
1f4907928c
19
Shake.hs
19
Shake.hs
@ -75,8 +75,7 @@ usage =
|
|||||||
-- TODO: commit, show commit
|
-- TODO: commit, show commit
|
||||||
,"./Shake changelogs[-dry] add new commits, headings to */CHANGES.md"
|
,"./Shake changelogs[-dry] add new commits, headings to */CHANGES.md"
|
||||||
-- ,"./Shake [PKG/]CHANGES.md[-dry] update (or preview) one changelog"
|
-- ,"./Shake [PKG/]CHANGES.md[-dry] update (or preview) one changelog"
|
||||||
,"./Shake PKG build a single hledger package and its embedded docs"
|
,"./Shake build [PKGS] build hledger packages and their embedded docs"
|
||||||
,"./Shake build build all hledger packages and their embedded docs"
|
|
||||||
,"./Shake clean clean generated help texts, manuals"
|
,"./Shake clean clean generated help texts, manuals"
|
||||||
,"./Shake Clean also clean object files, Shake's cache"
|
,"./Shake Clean also clean object files, Shake's cache"
|
||||||
,"./Shake FILE build any individual file"
|
,"./Shake FILE build any individual file"
|
||||||
@ -349,14 +348,18 @@ main = do
|
|||||||
|
|
||||||
-- HLEDGER PACKAGES/EXECUTABLES
|
-- HLEDGER PACKAGES/EXECUTABLES
|
||||||
|
|
||||||
phony "build" $ need packages
|
-- build [PKGS]
|
||||||
|
-- Build some or all hledger packages, after generating any doc
|
||||||
-- build any of the hledger packages, after generating any doc
|
|
||||||
-- files they embed or import.
|
-- files they embed or import.
|
||||||
sequence_ [ phony pkg $ do
|
phony "build" $ do
|
||||||
|
let
|
||||||
|
pkgs | null args = packages
|
||||||
|
| otherwise = args
|
||||||
|
sequence_ [ do
|
||||||
need $ fromMaybe [] $ lookup pkg embeddedFiles
|
need $ fromMaybe [] $ lookup pkg embeddedFiles
|
||||||
cmd Shell "stack build " pkg
|
cmd Shell "stack build " pkg :: Action ()
|
||||||
| pkg <- packages ]
|
| pkg <- pkgs
|
||||||
|
]
|
||||||
|
|
||||||
phony "commandtxts" $ need commandtxts
|
phony "commandtxts" $ need commandtxts
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user