Remove the Shake build system.
This commit is contained in:
parent
e1dd529134
commit
487ead6f5a
2 changed files with 0 additions and 67 deletions
|
@ -1,42 +0,0 @@
|
||||||
import Development.Shake
|
|
||||||
import Development.Shake.FilePath
|
|
||||||
|
|
||||||
target :: FilePath
|
|
||||||
target = "candidature"
|
|
||||||
|
|
||||||
buildDir :: FilePath
|
|
||||||
buildDir = "_build"
|
|
||||||
|
|
||||||
fullTarget :: FilePath
|
|
||||||
fullTarget = buildDir </> target <.> "pdf"
|
|
||||||
|
|
||||||
pdflatexCmd :: [String]
|
|
||||||
pdflatexCmd = ["lualatex", "-halt-on-error", "-output-directory=" ++ buildDir, target]
|
|
||||||
|
|
||||||
-- | Filters out the files which contain '#'.
|
|
||||||
noEmacsFiles :: [FilePath] -> [FilePath]
|
|
||||||
noEmacsFiles = filter ('#' `notElem`)
|
|
||||||
|
|
||||||
main :: IO ()
|
|
||||||
main = shakeArgs shakeOptions { shakeFiles = buildDir } $ do
|
|
||||||
want [ fullTarget ]
|
|
||||||
|
|
||||||
fullTarget %> \out -> do
|
|
||||||
src <- getDirectoryFiles "" ["*.tex", "*.sty"]
|
|
||||||
need $ (out -<.> "bbl") : noEmacsFiles src
|
|
||||||
|
|
||||||
cmd pdflatexCmd
|
|
||||||
|
|
||||||
fullTarget -<.> "bbl" %> \out -> do
|
|
||||||
bibs <- getDirectoryFiles "bib" ["*.bib"]
|
|
||||||
need $ map ("bib" </>) $ noEmacsFiles bibs
|
|
||||||
|
|
||||||
exists <- doesFileExist $ fullTarget -<.> "aux"
|
|
||||||
if not exists
|
|
||||||
then cmd pdflatexCmd
|
|
||||||
else return ()
|
|
||||||
|
|
||||||
cmd ["biber", dropExtension out]
|
|
||||||
|
|
||||||
phony "clean" $ do
|
|
||||||
removeFilesAfter "_build" ["//*"]
|
|
|
@ -1,25 +0,0 @@
|
||||||
-- Initial build.cabal generated by cabal init. For further documentation,
|
|
||||||
-- see http://haskell.org/cabal/users-guide/
|
|
||||||
|
|
||||||
name: build
|
|
||||||
version: 0.1.0.0
|
|
||||||
synopsis: A Shake build system for my application in French.
|
|
||||||
-- description:
|
|
||||||
license: GPL-3
|
|
||||||
license-file: LICENSE
|
|
||||||
author: Sergiu Ivanov
|
|
||||||
maintainer: sivanov@colimite.fr
|
|
||||||
-- copyright:
|
|
||||||
category: Text
|
|
||||||
build-type: Simple
|
|
||||||
extra-source-files: ChangeLog.md
|
|
||||||
cabal-version: >=1.10
|
|
||||||
|
|
||||||
executable build
|
|
||||||
main-is: Build.hs
|
|
||||||
-- other-modules:
|
|
||||||
-- other-extensions:
|
|
||||||
build-depends: base >=4.9 && <4.14,
|
|
||||||
shake >=0.16 && <0.20
|
|
||||||
-- hs-source-dirs:
|
|
||||||
default-language: Haskell2010
|
|
Loading…
Reference in a new issue