From d8f899e1181452042b11da9addd467157edd53e5 Mon Sep 17 00:00:00 2001 From: Nicolas Trangez Date: Thu, 20 Oct 2016 00:36:31 +0200 Subject: [PATCH] Move `reedsolomon` into a subdirectory The aim for this move is to extract the SIMD backend from the main library in the future, which should ease the build infrastructure maintenance, and allow to implement some other (optional) backend types (like OpenCL). --- appveyor.yml | 4 ++-- ci/travisci/build-test-bench/install.sh | 2 +- ci/travisci/cbits-cross/install.sh | 2 +- ci/travisci/cbits-cross/script.sh | 2 ++ ci/travisci/check-sdist/install.sh | 2 +- ci/travisci/check-sdist/script.sh | 4 ++++ circle.yml | 17 +++++++++-------- LICENSE => reedsolomon/LICENSE | 0 README.md => reedsolomon/README.md | 0 Setup.hs => reedsolomon/Setup.hs | 0 {bench => reedsolomon/bench}/Main.hs | 0 {bench => reedsolomon/bench}/profiling.hs | 0 .../build-tools}/ar-wrapper | 0 .../build-tools}/ghc-wrapper | 0 {cbits => reedsolomon/cbits}/.gitignore | 0 {cbits => reedsolomon/cbits}/Makefile.am | 0 {cbits => reedsolomon/cbits}/compare-isa.sh | 0 {cbits => reedsolomon/cbits}/configure.ac | 0 .../cbits}/m4/ax_append_compile_flags.m4 | 0 .../cbits}/m4/ax_append_flag.m4 | 0 .../cbits}/m4/ax_check_compile_flag.m4 | 0 .../cbits}/m4/ax_gcc_func_attribute.m4 | 0 .../cbits}/m4/ax_require_defined.m4 | 0 {cbits => reedsolomon/cbits}/malloc.c | 0 .../reedsolomon-gal-mul-stdio-quickcheck.hs | 0 .../cbits}/reedsolomon-gal-mul-stdio.c | 0 {cbits => reedsolomon/cbits}/reedsolomon.c | 0 {cbits => reedsolomon/cbits}/reedsolomon.h | 0 .../cbits}/reedsolomon_dispatch.c | 0 {cbits => reedsolomon/cbits}/test-compilers.sh | 0 {examples => reedsolomon/examples}/README.md | 0 .../examples}/simple-bench.hs | 0 .../examples}/simple-decoder.lhs | 0 .../examples}/simple-encoder.lhs | 0 .../reedsolomon.cabal | 1 - {src => reedsolomon/src}/Data/ReedSolomon.lhs | 0 .../src}/Data/ReedSolomon/Backend.hs | 0 .../src}/Data/ReedSolomon/BuildInfo.hs | 0 .../src}/Data/ReedSolomon/Galois.lhs | 0 .../src}/Data/ReedSolomon/Galois/GenTables.lhs | 0 .../src}/Data/ReedSolomon/Galois/NoAsm.lhs | 0 .../src}/Data/ReedSolomon/Galois/SIMD.lhs | 0 .../src}/Data/ReedSolomon/Matrix.lhs | 0 .../src}/Data/Vector/Generic/Compat.hs | 0 .../src}/Data/Vector/Generic/Exceptions.hs | 0 .../src}/Data/Vector/Generic/Lifted.hs | 0 .../src}/Data/Vector/Generic/Sized.hs | 0 .../src}/Data/Vector/Storable/ByteString.hs | 0 {test => reedsolomon/test}/Galois.lhs | 0 {test => reedsolomon/test}/Main.hs | 0 {test => reedsolomon/test}/Matrix.lhs | 0 {test => reedsolomon/test}/ReedSolomon.lhs | 0 {test => reedsolomon/test}/Vector.hs | 0 stack.yaml | 2 +- 54 files changed, 21 insertions(+), 15 deletions(-) rename LICENSE => reedsolomon/LICENSE (100%) rename README.md => reedsolomon/README.md (100%) rename Setup.hs => reedsolomon/Setup.hs (100%) rename {bench => reedsolomon/bench}/Main.hs (100%) rename {bench => reedsolomon/bench}/profiling.hs (100%) rename {build-tools => reedsolomon/build-tools}/ar-wrapper (100%) rename {build-tools => reedsolomon/build-tools}/ghc-wrapper (100%) rename {cbits => reedsolomon/cbits}/.gitignore (100%) rename {cbits => reedsolomon/cbits}/Makefile.am (100%) rename {cbits => reedsolomon/cbits}/compare-isa.sh (100%) rename {cbits => reedsolomon/cbits}/configure.ac (100%) rename {cbits => reedsolomon/cbits}/m4/ax_append_compile_flags.m4 (100%) rename {cbits => reedsolomon/cbits}/m4/ax_append_flag.m4 (100%) rename {cbits => reedsolomon/cbits}/m4/ax_check_compile_flag.m4 (100%) rename {cbits => reedsolomon/cbits}/m4/ax_gcc_func_attribute.m4 (100%) rename {cbits => reedsolomon/cbits}/m4/ax_require_defined.m4 (100%) rename {cbits => reedsolomon/cbits}/malloc.c (100%) rename {cbits => reedsolomon/cbits}/reedsolomon-gal-mul-stdio-quickcheck.hs (100%) rename {cbits => reedsolomon/cbits}/reedsolomon-gal-mul-stdio.c (100%) rename {cbits => reedsolomon/cbits}/reedsolomon.c (100%) rename {cbits => reedsolomon/cbits}/reedsolomon.h (100%) rename {cbits => reedsolomon/cbits}/reedsolomon_dispatch.c (100%) rename {cbits => reedsolomon/cbits}/test-compilers.sh (100%) rename {examples => reedsolomon/examples}/README.md (100%) rename {examples => reedsolomon/examples}/simple-bench.hs (100%) rename {examples => reedsolomon/examples}/simple-decoder.lhs (100%) rename {examples => reedsolomon/examples}/simple-encoder.lhs (100%) rename reedsolomon.cabal => reedsolomon/reedsolomon.cabal (99%) rename {src => reedsolomon/src}/Data/ReedSolomon.lhs (100%) rename {src => reedsolomon/src}/Data/ReedSolomon/Backend.hs (100%) rename {src => reedsolomon/src}/Data/ReedSolomon/BuildInfo.hs (100%) rename {src => reedsolomon/src}/Data/ReedSolomon/Galois.lhs (100%) rename {src => reedsolomon/src}/Data/ReedSolomon/Galois/GenTables.lhs (100%) rename {src => reedsolomon/src}/Data/ReedSolomon/Galois/NoAsm.lhs (100%) rename {src => reedsolomon/src}/Data/ReedSolomon/Galois/SIMD.lhs (100%) rename {src => reedsolomon/src}/Data/ReedSolomon/Matrix.lhs (100%) rename {src => reedsolomon/src}/Data/Vector/Generic/Compat.hs (100%) rename {src => reedsolomon/src}/Data/Vector/Generic/Exceptions.hs (100%) rename {src => reedsolomon/src}/Data/Vector/Generic/Lifted.hs (100%) rename {src => reedsolomon/src}/Data/Vector/Generic/Sized.hs (100%) rename {src => reedsolomon/src}/Data/Vector/Storable/ByteString.hs (100%) rename {test => reedsolomon/test}/Galois.lhs (100%) rename {test => reedsolomon/test}/Main.hs (100%) rename {test => reedsolomon/test}/Matrix.lhs (100%) rename {test => reedsolomon/test}/ReedSolomon.lhs (100%) rename {test => reedsolomon/test}/Vector.hs (100%) diff --git a/appveyor.yml b/appveyor.yml index 16a22b62..f9c86dc1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -25,7 +25,7 @@ install: - echo "" | stack build --test --only-snapshot --flag=reedsolomon:-LLVM build_script: - - echo "" | stack exec bash -- -lc "cd /c/reedsolomon/cbits; autoreconf -vi" + - echo "" | stack exec bash -- -lc "cd /c/reedsolomon/reedsolomon/cbits; autoreconf -vi" # Building benchmarks is temporarily disabled due to https://github.com/fpco/stackage/issues/1912 # - echo "" | stack build --pedantic --test --no-run-tests --bench --no-run-benchmarks --flag=reedsolomon:-LLVM --flag=reedsolomon:examples - echo "" | stack build --pedantic --test --no-run-tests --flag=reedsolomon:-LLVM @@ -35,4 +35,4 @@ test_script: - echo "" | stack build --pedantic --test --test-arguments "--xml junit.xml +RTS -N1" --flag=reedsolomon:-LLVM on_finish: - - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\junit.xml)) + - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\reedsolomon\junit.xml)) diff --git a/ci/travisci/build-test-bench/install.sh b/ci/travisci/build-test-bench/install.sh index 94941381..b35a7f4f 100755 --- a/ci/travisci/build-test-bench/install.sh +++ b/ci/travisci/build-test-bench/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -ue -pushd cbits +pushd reedsolomon/cbits autoreconf -fvi popd diff --git a/ci/travisci/cbits-cross/install.sh b/ci/travisci/cbits-cross/install.sh index 28905f54..48e59cdb 100755 --- a/ci/travisci/cbits-cross/install.sh +++ b/ci/travisci/cbits-cross/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -xue -pushd cbits +pushd reedsolomon/cbits autoreconf -fvi popd diff --git a/ci/travisci/cbits-cross/script.sh b/ci/travisci/cbits-cross/script.sh index 6d6e9a82..358ffbcd 100755 --- a/ci/travisci/cbits-cross/script.sh +++ b/ci/travisci/cbits-cross/script.sh @@ -1,5 +1,7 @@ #!/bin/bash -xue +cd reedsolomon + function build() { local suffix=$1 shift diff --git a/ci/travisci/check-sdist/install.sh b/ci/travisci/check-sdist/install.sh index 48f7bc90..240c2405 100755 --- a/ci/travisci/check-sdist/install.sh +++ b/ci/travisci/check-sdist/install.sh @@ -1,5 +1,5 @@ #!/bin/bash -xue -pushd cbits +pushd reedsolomon/cbits autoreconf -fvi popd diff --git a/ci/travisci/check-sdist/script.sh b/ci/travisci/check-sdist/script.sh index bcf3c745..105b0477 100755 --- a/ci/travisci/check-sdist/script.sh +++ b/ci/travisci/check-sdist/script.sh @@ -1,5 +1,6 @@ #!/bin/bash -xue +pushd reedsolomon PKG_VERSION=`grep ^Version\: reedsolomon.cabal | awk '{ print $2 }'` pushd cbits @@ -8,11 +9,14 @@ make distcheck mv reedsolomon-$PKG_VERSION.tar.gz /tmp/reedsolomon-$PKG_VERSION-cbits.tar.gz make distclean popd +popd cp ci/travisci/check-sdist/test.hs /tmp git clean -dxf +cd reedsolomon + cabal sdist PKG_TAR=reedsolomon-$PKG_VERSION.tar.gz diff --git a/circle.yml b/circle.yml index b92669aa..374e6dfc 100644 --- a/circle.yml +++ b/circle.yml @@ -16,16 +16,17 @@ dependencies: override: - cabal update - cabal sandbox init - - cabal install --constraint="template-haskell installed" --dependencies-only --enable-tests -fexamples - - cabal configure --enable-tests -fexamples + - cd reedsolomon; cabal sandbox init --sandbox `pwd`/../.cabal-sandbox + - cd reedsolomon; cabal install --constraint="template-haskell installed" --dependencies-only --enable-tests -fexamples + - cd reedsolomon; cabal configure --enable-tests -fexamples test: override: - - cd cbits; autoreconf -vi - - cabal build - - cabal test --show-details=always --test-options="+RTS -N2" - - cabal test --show-details=always --test-options="--xml $CIRCLE_TEST_REPORTS/junit.xml +RTS -N2" + - cd reedsolomon; cd cbits; autoreconf -vi + - cd reedsolomon; cabal build + - cd reedsolomon; cabal test --show-details=always --test-options="+RTS -N2" + - cd reedsolomon; cabal test --show-details=always --test-options="--xml $CIRCLE_TEST_REPORTS/junit.xml +RTS -N2" post: - - cabal haddock --hyperlink-source - - mv dist/doc/html/reedsolomon/* $CIRCLE_ARTIFACTS/ + - cd reedsolomon; cabal haddock --hyperlink-source + - cd reedsolomon; mv dist/doc/html/reedsolomon/* $CIRCLE_ARTIFACTS/ diff --git a/LICENSE b/reedsolomon/LICENSE similarity index 100% rename from LICENSE rename to reedsolomon/LICENSE diff --git a/README.md b/reedsolomon/README.md similarity index 100% rename from README.md rename to reedsolomon/README.md diff --git a/Setup.hs b/reedsolomon/Setup.hs similarity index 100% rename from Setup.hs rename to reedsolomon/Setup.hs diff --git a/bench/Main.hs b/reedsolomon/bench/Main.hs similarity index 100% rename from bench/Main.hs rename to reedsolomon/bench/Main.hs diff --git a/bench/profiling.hs b/reedsolomon/bench/profiling.hs similarity index 100% rename from bench/profiling.hs rename to reedsolomon/bench/profiling.hs diff --git a/build-tools/ar-wrapper b/reedsolomon/build-tools/ar-wrapper similarity index 100% rename from build-tools/ar-wrapper rename to reedsolomon/build-tools/ar-wrapper diff --git a/build-tools/ghc-wrapper b/reedsolomon/build-tools/ghc-wrapper similarity index 100% rename from build-tools/ghc-wrapper rename to reedsolomon/build-tools/ghc-wrapper diff --git a/cbits/.gitignore b/reedsolomon/cbits/.gitignore similarity index 100% rename from cbits/.gitignore rename to reedsolomon/cbits/.gitignore diff --git a/cbits/Makefile.am b/reedsolomon/cbits/Makefile.am similarity index 100% rename from cbits/Makefile.am rename to reedsolomon/cbits/Makefile.am diff --git a/cbits/compare-isa.sh b/reedsolomon/cbits/compare-isa.sh similarity index 100% rename from cbits/compare-isa.sh rename to reedsolomon/cbits/compare-isa.sh diff --git a/cbits/configure.ac b/reedsolomon/cbits/configure.ac similarity index 100% rename from cbits/configure.ac rename to reedsolomon/cbits/configure.ac diff --git a/cbits/m4/ax_append_compile_flags.m4 b/reedsolomon/cbits/m4/ax_append_compile_flags.m4 similarity index 100% rename from cbits/m4/ax_append_compile_flags.m4 rename to reedsolomon/cbits/m4/ax_append_compile_flags.m4 diff --git a/cbits/m4/ax_append_flag.m4 b/reedsolomon/cbits/m4/ax_append_flag.m4 similarity index 100% rename from cbits/m4/ax_append_flag.m4 rename to reedsolomon/cbits/m4/ax_append_flag.m4 diff --git a/cbits/m4/ax_check_compile_flag.m4 b/reedsolomon/cbits/m4/ax_check_compile_flag.m4 similarity index 100% rename from cbits/m4/ax_check_compile_flag.m4 rename to reedsolomon/cbits/m4/ax_check_compile_flag.m4 diff --git a/cbits/m4/ax_gcc_func_attribute.m4 b/reedsolomon/cbits/m4/ax_gcc_func_attribute.m4 similarity index 100% rename from cbits/m4/ax_gcc_func_attribute.m4 rename to reedsolomon/cbits/m4/ax_gcc_func_attribute.m4 diff --git a/cbits/m4/ax_require_defined.m4 b/reedsolomon/cbits/m4/ax_require_defined.m4 similarity index 100% rename from cbits/m4/ax_require_defined.m4 rename to reedsolomon/cbits/m4/ax_require_defined.m4 diff --git a/cbits/malloc.c b/reedsolomon/cbits/malloc.c similarity index 100% rename from cbits/malloc.c rename to reedsolomon/cbits/malloc.c diff --git a/cbits/reedsolomon-gal-mul-stdio-quickcheck.hs b/reedsolomon/cbits/reedsolomon-gal-mul-stdio-quickcheck.hs similarity index 100% rename from cbits/reedsolomon-gal-mul-stdio-quickcheck.hs rename to reedsolomon/cbits/reedsolomon-gal-mul-stdio-quickcheck.hs diff --git a/cbits/reedsolomon-gal-mul-stdio.c b/reedsolomon/cbits/reedsolomon-gal-mul-stdio.c similarity index 100% rename from cbits/reedsolomon-gal-mul-stdio.c rename to reedsolomon/cbits/reedsolomon-gal-mul-stdio.c diff --git a/cbits/reedsolomon.c b/reedsolomon/cbits/reedsolomon.c similarity index 100% rename from cbits/reedsolomon.c rename to reedsolomon/cbits/reedsolomon.c diff --git a/cbits/reedsolomon.h b/reedsolomon/cbits/reedsolomon.h similarity index 100% rename from cbits/reedsolomon.h rename to reedsolomon/cbits/reedsolomon.h diff --git a/cbits/reedsolomon_dispatch.c b/reedsolomon/cbits/reedsolomon_dispatch.c similarity index 100% rename from cbits/reedsolomon_dispatch.c rename to reedsolomon/cbits/reedsolomon_dispatch.c diff --git a/cbits/test-compilers.sh b/reedsolomon/cbits/test-compilers.sh similarity index 100% rename from cbits/test-compilers.sh rename to reedsolomon/cbits/test-compilers.sh diff --git a/examples/README.md b/reedsolomon/examples/README.md similarity index 100% rename from examples/README.md rename to reedsolomon/examples/README.md diff --git a/examples/simple-bench.hs b/reedsolomon/examples/simple-bench.hs similarity index 100% rename from examples/simple-bench.hs rename to reedsolomon/examples/simple-bench.hs diff --git a/examples/simple-decoder.lhs b/reedsolomon/examples/simple-decoder.lhs similarity index 100% rename from examples/simple-decoder.lhs rename to reedsolomon/examples/simple-decoder.lhs diff --git a/examples/simple-encoder.lhs b/reedsolomon/examples/simple-encoder.lhs similarity index 100% rename from examples/simple-encoder.lhs rename to reedsolomon/examples/simple-encoder.lhs diff --git a/reedsolomon.cabal b/reedsolomon/reedsolomon.cabal similarity index 99% rename from reedsolomon.cabal rename to reedsolomon/reedsolomon.cabal index cbac0dcf..96ace0dd 100644 --- a/reedsolomon.cabal +++ b/reedsolomon/reedsolomon.cabal @@ -16,7 +16,6 @@ Category: Data Build-Type: Custom Extra-Source-Files: README.md , examples/README.md - , stack.yaml , build-tools/ar-wrapper , build-tools/ghc-wrapper diff --git a/src/Data/ReedSolomon.lhs b/reedsolomon/src/Data/ReedSolomon.lhs similarity index 100% rename from src/Data/ReedSolomon.lhs rename to reedsolomon/src/Data/ReedSolomon.lhs diff --git a/src/Data/ReedSolomon/Backend.hs b/reedsolomon/src/Data/ReedSolomon/Backend.hs similarity index 100% rename from src/Data/ReedSolomon/Backend.hs rename to reedsolomon/src/Data/ReedSolomon/Backend.hs diff --git a/src/Data/ReedSolomon/BuildInfo.hs b/reedsolomon/src/Data/ReedSolomon/BuildInfo.hs similarity index 100% rename from src/Data/ReedSolomon/BuildInfo.hs rename to reedsolomon/src/Data/ReedSolomon/BuildInfo.hs diff --git a/src/Data/ReedSolomon/Galois.lhs b/reedsolomon/src/Data/ReedSolomon/Galois.lhs similarity index 100% rename from src/Data/ReedSolomon/Galois.lhs rename to reedsolomon/src/Data/ReedSolomon/Galois.lhs diff --git a/src/Data/ReedSolomon/Galois/GenTables.lhs b/reedsolomon/src/Data/ReedSolomon/Galois/GenTables.lhs similarity index 100% rename from src/Data/ReedSolomon/Galois/GenTables.lhs rename to reedsolomon/src/Data/ReedSolomon/Galois/GenTables.lhs diff --git a/src/Data/ReedSolomon/Galois/NoAsm.lhs b/reedsolomon/src/Data/ReedSolomon/Galois/NoAsm.lhs similarity index 100% rename from src/Data/ReedSolomon/Galois/NoAsm.lhs rename to reedsolomon/src/Data/ReedSolomon/Galois/NoAsm.lhs diff --git a/src/Data/ReedSolomon/Galois/SIMD.lhs b/reedsolomon/src/Data/ReedSolomon/Galois/SIMD.lhs similarity index 100% rename from src/Data/ReedSolomon/Galois/SIMD.lhs rename to reedsolomon/src/Data/ReedSolomon/Galois/SIMD.lhs diff --git a/src/Data/ReedSolomon/Matrix.lhs b/reedsolomon/src/Data/ReedSolomon/Matrix.lhs similarity index 100% rename from src/Data/ReedSolomon/Matrix.lhs rename to reedsolomon/src/Data/ReedSolomon/Matrix.lhs diff --git a/src/Data/Vector/Generic/Compat.hs b/reedsolomon/src/Data/Vector/Generic/Compat.hs similarity index 100% rename from src/Data/Vector/Generic/Compat.hs rename to reedsolomon/src/Data/Vector/Generic/Compat.hs diff --git a/src/Data/Vector/Generic/Exceptions.hs b/reedsolomon/src/Data/Vector/Generic/Exceptions.hs similarity index 100% rename from src/Data/Vector/Generic/Exceptions.hs rename to reedsolomon/src/Data/Vector/Generic/Exceptions.hs diff --git a/src/Data/Vector/Generic/Lifted.hs b/reedsolomon/src/Data/Vector/Generic/Lifted.hs similarity index 100% rename from src/Data/Vector/Generic/Lifted.hs rename to reedsolomon/src/Data/Vector/Generic/Lifted.hs diff --git a/src/Data/Vector/Generic/Sized.hs b/reedsolomon/src/Data/Vector/Generic/Sized.hs similarity index 100% rename from src/Data/Vector/Generic/Sized.hs rename to reedsolomon/src/Data/Vector/Generic/Sized.hs diff --git a/src/Data/Vector/Storable/ByteString.hs b/reedsolomon/src/Data/Vector/Storable/ByteString.hs similarity index 100% rename from src/Data/Vector/Storable/ByteString.hs rename to reedsolomon/src/Data/Vector/Storable/ByteString.hs diff --git a/test/Galois.lhs b/reedsolomon/test/Galois.lhs similarity index 100% rename from test/Galois.lhs rename to reedsolomon/test/Galois.lhs diff --git a/test/Main.hs b/reedsolomon/test/Main.hs similarity index 100% rename from test/Main.hs rename to reedsolomon/test/Main.hs diff --git a/test/Matrix.lhs b/reedsolomon/test/Matrix.lhs similarity index 100% rename from test/Matrix.lhs rename to reedsolomon/test/Matrix.lhs diff --git a/test/ReedSolomon.lhs b/reedsolomon/test/ReedSolomon.lhs similarity index 100% rename from test/ReedSolomon.lhs rename to reedsolomon/test/ReedSolomon.lhs diff --git a/test/Vector.hs b/reedsolomon/test/Vector.hs similarity index 100% rename from test/Vector.hs rename to reedsolomon/test/Vector.hs diff --git a/stack.yaml b/stack.yaml index 7a46f5f6..229a3ab4 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ packages: -- '.' +- reedsolomon extra-deps: - bytestring-mmap-0.2.2