diff --git a/.travis.yml b/.travis.yml index 19e87d3..d89416c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,58 +86,10 @@ before_script: - cabal update - ghc --version - ghc-pkg list - - pushd .. - - git clone --depth=100 --quiet https://github.com/svenpanne/ObjectName.git - - cd ObjectName - - cabal install --enable-documentation - - popd - - ghc-pkg list - - pushd .. - - git clone --depth=100 --quiet https://github.com/haskell-opengl/StateVar.git - - cd StateVar - - cabal install --enable-documentation - - popd - - ghc-pkg list - - pushd .. - - git clone --depth=100 --quiet https://github.com/haskell-opengl/OpenGLRaw.git - - cd OpenGLRaw - - cabal install --enable-documentation - - popd - - ghc-pkg list - - pushd .. - - git clone --depth=100 --quiet https://github.com/haskell-opengl/GLURaw.git - - cd GLURaw - - cabal install --enable-documentation - - popd - - ghc-pkg list - - pushd .. - - git clone --depth=100 --quiet https://github.com/haskell-opengl/OpenGL.git - - cd OpenGL - - cabal install --enable-documentation - - popd - - ghc-pkg list - - pushd .. - - git clone --depth=100 --quiet https://github.com/haskell-openal/OpenAL.git - - cd OpenAL - - cabal install --enable-documentation - - popd - - ghc-pkg list script: - - cabal install --enable-documentation + - cabal install --enable-documentation --flags=BuildExamples `test "$GHCVER" \> "7.3" && echo "--jobs"` - cabal sdist - - pushd examples/Basic - - ghc --make -Wall -O2 HelloWorld.hs - - ghc --make -Wall -O2 OpenALInfo.hs - - ghc --make -Wall -O2 PlayFile.hs - - popd - - pushd examples/TestSuite - - ghc --make -Wall -O2 TestErrorStuff.hs - - ghc --make -Wall -O2 TestFileLoader.hs - - ghc --make -Wall -O2 TestMemoryLoader.hs - - ghc --make -Wall -O2 TestVersion.hs - - ghc --make -Wall -O2 TestWaveforms.hs - - popd after_script: - ghc-pkg list diff --git a/ALUT.cabal b/ALUT.cabal index 7035dad..e88c164 100644 --- a/ALUT.cabal +++ b/ALUT.cabal @@ -20,14 +20,6 @@ cabal-version: >= 1.10 extra-source-files: CHANGELOG.md README.md - examples/Basic/HelloWorld.hs - examples/Basic/OpenALInfo.hs - examples/Basic/PlayFile.hs - examples/TestSuite/TestErrorStuff.hs - examples/TestSuite/TestFileLoader.hs - examples/TestSuite/TestMemoryLoader.hs - examples/TestSuite/TestVersion.hs - examples/TestSuite/TestWaveforms.hs examples/TestSuite/file1.wav examples/TestSuite/file2.au examples/TestSuite/file3.raw @@ -37,6 +29,10 @@ flag UseNativeWindowsLibraries When compiling under Windows, use the native libraries instead of e.g. the ones coming with Cygwin. +flag BuildExamples + description: Build various ALUT examples. + default: False + library exposed-modules: Sound.ALUT @@ -70,6 +66,78 @@ library else extra-libraries: alut +executable Basic-HelloWorld + if !flag(BuildExamples) + buildable: False + main-is: HelloWorld.hs + build-depends: base >= 3 && < 5, ALUT + hs-source-dirs: examples/Basic + default-language: Haskell2010 + ghc-options: -Wall + +executable Basic-OpenALInfo + if !flag(BuildExamples) + buildable: False + main-is: OpenALInfo.hs + build-depends: base >= 3 && < 5, pretty, ALUT + hs-source-dirs: examples/Basic + default-language: Haskell2010 + ghc-options: -Wall + +executable Basic-PlayFile + if !flag(BuildExamples) + buildable: False + main-is: PlayFile.hs + build-depends: base >= 3 && < 5, ALUT + hs-source-dirs: examples/Basic + default-language: Haskell2010 + ghc-options: -Wall + +executable TestSuite-TestErrorStuff + if !flag(BuildExamples) + buildable: False + main-is: TestErrorStuff.hs + build-depends: base >= 3 && < 5, ALUT + hs-source-dirs: examples/TestSuite + default-language: Haskell2010 + ghc-options: -Wall + +executable TestSuite-TestFileLoader + if !flag(BuildExamples) + buildable: False + main-is: TestFileLoader.hs + build-depends: base >= 3 && < 5, ALUT + hs-source-dirs: examples/TestSuite + default-language: Haskell2010 + ghc-options: -Wall + +executable TestSuite-TestMemoryLoader + if !flag(BuildExamples) + buildable: False + main-is: TestMemoryLoader.hs + build-depends: base >= 3 && < 5, ALUT + hs-source-dirs: examples/TestSuite + default-language: Haskell2010 + ghc-options: -Wall + +executable TestSuite-TestVersion + if !flag(BuildExamples) + buildable: False + main-is: TestVersion.hs + build-depends: base >= 3 && < 5, ALUT + hs-source-dirs: examples/TestSuite + default-language: Haskell2010 + ghc-options: -Wall + +executable TestSuite-TestWaveforms + if !flag(BuildExamples) + buildable: False + main-is: TestWaveforms.hs + build-depends: base >= 3 && < 5, ALUT + hs-source-dirs: examples/TestSuite + default-language: Haskell2010 + ghc-options: -Wall + source-repository head type: git location: https://github.com/haskell-openal/ALUT.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fd1e59..3348dbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +2.4.0.2 +------- +* Build examples via cabal. + 2.4.0.1 ------- * Relaxed upper version bound for `transformers`.