diff --git a/_shake/Build.hs b/_shake/Build.hs deleted file mode 100644 index eb897b4..0000000 --- a/_shake/Build.hs +++ /dev/null @@ -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" ["//*"] diff --git a/_shake/build.cabal b/_shake/build.cabal deleted file mode 100644 index f491bbf..0000000 --- a/_shake/build.cabal +++ /dev/null @@ -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