Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
Move to Stack for build system and support 7.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam C. Foltzer committed Feb 12, 2016
1 parent 843196a commit 3baa282
Show file tree
Hide file tree
Showing 16 changed files with 302 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,3 +1,6 @@
.cabal-sandbox
cabal.sandbox.config
Config.mk
.stack-work
/docs.tar
/docs/
29 changes: 12 additions & 17 deletions Makefile
@@ -1,7 +1,4 @@


STANDALONE_HADDOCK ?= standalone-haddock
HADDOCK_PKGDB ?= $(PWD)/.cabal-sandbox/x86_64-linux-ghc-7.8.4-packages.conf.d
export PATH := $(shell stack path --local-bin-path):$(PATH)

PACKAGES:= ivory/ivory \
ivory/ivory-artifact \
Expand Down Expand Up @@ -36,24 +33,22 @@ PACKAGES:= ivory/ivory \
default:
make -C smaccmpilot-stm32f4

.PHONY: docs-sandbox
docs-sandbox:
cabal sandbox init
echo "documentation: True" >> cabal.sandbox.config
cabal sandbox add-source $(PACKAGES) ivorylang-org smaccmpilot-org
cabal install $(PACKAGES) ivorylang-org smaccmpilot-org
DOCS_STACK ?= stack --stack-yaml $(PWD)/stack-7.10.yaml
DOCS_BIN_PATH ?= $(shell $(DOCS_STACK) path --bin-path)
DOCS_LOCAL_PKGDB ?= $(shell $(DOCS_STACK) path --local-pkg-db)
DOCS_SNAPSHOT_PKGDB ?= $(shell $(DOCS_STACK) path --snapshot-pkg-db)

.PHONY: docs
docs:
$(STANDALONE_HADDOCK) --package-db $(HADDOCK_PKGDB) -o docs $(PACKAGES)
$(DOCS_STACK) haddock
$(DOCS_STACK) install standalone-haddock
(export PATH=$(DOCS_BIN_PATH); \
standalone-haddock --package-db $(LOCAL_PKGDB) \
--package-db $(SNAPSHOT_PKGDB) \
-o docs $(PACKAGES))
tar -cf docs.tar docs/
export SMACCMPILOT_ORG_EXEC=$(PWD)/.cabal-sandbox/bin/smaccmpilot-org
export IVORYLANG_ORG_EXEC=$(PWD)/.cabal-sandbox/bin/ivorylang-org
make -C smaccmpilot-org build
make -C ivorylang-org build


clean:
-rm cabal.sandbox.config
-rm -rf .cabal-sandbox
-rm -rf dist
stack clean
2 changes: 1 addition & 1 deletion gec
2 changes: 1 addition & 1 deletion ivory
Submodule ivory updated 128 files
2 changes: 1 addition & 1 deletion ivory-tower-stm32
Submodule ivory-tower-stm32 updated 54 files
+3 −0 .gitignore
+50 −28 .travis.yml
+8 −2 Makefile
+0 −34 Makefile.sandbox
+1 −3 ivory-bsp-stm32/Makefile
+0 −9 ivory-bsp-stm32/Makefile.deps
+1 −1 ivory-bsp-stm32/src/Ivory/BSP/STM32/ClockConfig/Init.hs
+4 −4 ivory-bsp-stm32/src/Ivory/BSP/STM32/Driver/CAN.hs
+1 −1 ivory-bsp-stm32/src/Ivory/BSP/STM32/Driver/DMA.hs
+16 −16 ivory-bsp-stm32/src/Ivory/BSP/STM32/Driver/I2C.hs
+1 −1 ivory-bsp-stm32/src/Ivory/BSP/STM32/Driver/RNG.hs
+8 −8 ivory-bsp-stm32/src/Ivory/BSP/STM32/Driver/SPI.hs
+9 −9 ivory-bsp-stm32/src/Ivory/BSP/STM32/Driver/UART.hs
+10 −10 ivory-bsp-stm32/src/Ivory/BSP/STM32/Driver/UART/DMA.hs
+6 −6 ivory-bsp-stm32/src/Ivory/BSP/STM32/Driver/UART/DMA/Synchronous.hs
+3 −3 ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/CAN/Peripheral.hs
+1 −1 ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/DMA/Peripheral.hs
+1 −1 ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/I2C/Peripheral.hs
+4 −4 ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/SPI/Peripheral.hs
+2 −2 ivory-bsp-stm32/src/Ivory/BSP/STM32/Peripheral/UART/Peripheral.hs
+5 −5 ivory-bsp-tests/BSP/Tests/DMAUART/TestApp.hs
+2 −2 ivory-bsp-tests/BSP/Tests/LED/Blink.hs
+4 −4 ivory-bsp-tests/BSP/Tests/RNG.hs
+2 −2 ivory-bsp-tests/BSP/Tests/UART/Buffer.hs
+2 −2 ivory-bsp-tests/BSP/Tests/UART/DebugApp.hs
+8 −8 ivory-bsp-tests/BSP/Tests/UART/TestApp.hs
+15 −73 ivory-bsp-tests/Makefile
+0 −10 ivory-bsp-tests/Makefile.deps
+1 −2 ivory-freertos-bindings/Makefile
+0 −4 ivory-freertos-bindings/Makefile.deps
+1 −1 ivory-freertos-bindings/freertos-sources/portable/GCC/ARM_CM4F/port.c
+6 −6 ivory-freertos-bindings/freertos-sources/portable/MemMang/heap_4.c
+6 −6 ivory-freertos-bindings/freertos-sources/portable/MemMang/heap_5.c
+2 −2 ivory-freertos-bindings/freertos-sources/queue.c
+0 −1 ivory-freertos-bindings/src/Ivory/OS/FreeRTOS.hs
+2 −2 ivory-freertos-bindings/src/Ivory/OS/FreeRTOS/Atomic.hs
+6 −6 ivory-freertos-bindings/src/Ivory/OS/FreeRTOS/BinarySemaphore.hs
+0 −2 ivory-freertos-bindings/src/Ivory/OS/FreeRTOS/Config.hs
+5 −5 ivory-freertos-bindings/src/Ivory/OS/FreeRTOS/Mutex.hs
+3 −3 ivory-freertos-bindings/src/Ivory/OS/FreeRTOS/Task.hs
+4 −4 ivory-freertos-bindings/src/Ivory/OS/FreeRTOS/Time.hs
+62 −0 stack-7.10.yaml
+61 −0 stack-8.0.yaml
+12 −0 stack.mk
+58 −0 stack.yaml
+6 −6 tower-freertos-stm32-tests/Makefile
+0 −12 tower-freertos-stm32-tests/Makefile.deps
+1 −4 tower-freertos-stm32/Makefile
+0 −11 tower-freertos-stm32/Makefile.deps
+3 −3 tower-freertos-stm32/src/Ivory/OS/FreeRTOS/Tower/Monitor.hs
+15 −13 tower-freertos-stm32/src/Ivory/OS/FreeRTOS/Tower/STM32.hs
+6 −6 tower-freertos-stm32/src/Ivory/OS/FreeRTOS/Tower/System.hs
+1 −1 tower-freertos-stm32/src/Ivory/OS/FreeRTOS/Tower/Time.hs
+1 −1 tower-freertos-stm32/tower-freertos-stm32.cabal
2 changes: 1 addition & 1 deletion ivorylang-org
Submodule ivorylang-org updated 4 files
+1 −0 .gitignore
+9 −15 Makefile
+1 −1 site.hs
+39 −0 stack.yaml
2 changes: 1 addition & 1 deletion smaccmpilot-org
2 changes: 1 addition & 1 deletion smaccmpilot-stm32f4
92 changes: 92 additions & 0 deletions stack-7.10.yaml
@@ -0,0 +1,92 @@
# For more information, see: http://docs.haskellstack.org/en/stable/yaml_configuration.html

# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver: lts-5.1

# Local packages, usually specified by relative directory name
packages:
- gec/
- gidl/
- ivory/ivory/
- ivory/ivory-artifact/
- ivory/ivory-backend-c/
- ivory/ivory-eval/
- ivory/ivory-examples/
- ivory/ivory-hw/
- ivory/ivory-model-check/
- ivory/ivory-opts/
- ivory/ivory-quickcheck/
- ivory/ivory-serialize/
- ivory/ivory-stdlib/
#- ivory-rtverification/rtv-example/
#- ivory-rtverification/rtv-lib/
- ivory-tower-posix/
- ivory-tower-stm32/ivory-bsp-stm32/
- ivory-tower-stm32/ivory-bsp-tests/
- ivory-tower-stm32/ivory-freertos-bindings/
- ivory-tower-stm32/tower-freertos-stm32/
- ivory-tower-stm32/tower-freertos-stm32-tests/
#- ivorylang-org/
#- smaccmpilot-org/
- smaccmpilot-stm32f4/src/ivory-geo/
- smaccmpilot-stm32f4/src/ivory-px4-hw/
- smaccmpilot-stm32f4/src/smaccm-comm-client/
- smaccmpilot-stm32f4/src/smaccm-comm-schema/smaccm-comm-schema-native/
- smaccmpilot-stm32f4/src/smaccm-comm-schema/smaccm-comm-schema-tower/
- smaccmpilot-stm32f4/src/smaccm-commsec/
- smaccmpilot-stm32f4/src/smaccm-datalink/
- smaccmpilot-stm32f4/src/smaccm-flight/
- smaccmpilot-stm32f4/src/smaccm-ins/
- tower/tower/
- tower/tower-aadl/
- tower/tower-config/
- tower/tower-hal/
- tower-camkes-odroid/
# estimator with relaxed version bounds; remove when pushed to Hackage
- location:
git: https://github.com/GaloisInc/estimator.git
commit: 4818515e8a05d7d9c54e51d7ac7fa21580336366
extra-dep: true

# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
extra-deps:
- base-compat-0.9.0
- cipher-aes128-0.7.0.1
- cpphs-1.19.3
- curve25519-0.2.2
- ed25519-donna-0.1.1
# - estimator-1.1.0.2
- exception-mtl-0.4
- ghc-srcspan-plugin-0.2.1.0
- language-c-quote-0.11.4
- mainland-pretty-0.4.1.2
- primitive-0.6.1.0
- s-cargot-0.1.0.0
- serialport-0.4.7
- symbol-0.2.4

# Override default flag values for local packages and extra-deps
flags: {}

# Extra package databases containing global packages
extra-package-dbs: []

install-ghc: true

# Control whether we use the GHC we find on the path
# system-ghc: true

# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: >= 1.0.0

# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64

# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]

# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor
91 changes: 91 additions & 0 deletions stack-8.0.yaml
@@ -0,0 +1,91 @@
# For more information, see: http://docs.haskellstack.org/en/stable/yaml_configuration.html

# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver: ghc-8.0.1

# Local packages, usually specified by relative directory name
packages:
- gec/
- gidl/
- ivory/ivory/
- ivory/ivory-artifact/
- ivory/ivory-backend-c/
- ivory/ivory-eval/
- ivory/ivory-examples/
- ivory/ivory-hw/
- ivory/ivory-model-check/
- ivory/ivory-opts/
- ivory/ivory-quickcheck/
- ivory/ivory-serialize/
- ivory/ivory-stdlib/
#- ivory-rtverification/rtv-example/
#- ivory-rtverification/rtv-lib/
- ivory-tower-posix/
- ivory-tower-stm32/ivory-bsp-stm32/
- ivory-tower-stm32/ivory-bsp-tests/
- ivory-tower-stm32/ivory-freertos-bindings/
- ivory-tower-stm32/tower-freertos-stm32/
- ivory-tower-stm32/tower-freertos-stm32-tests/
#- ivorylang-org/
#- smaccmpilot-org/
- smaccmpilot-stm32f4/src/ivory-geo/
- smaccmpilot-stm32f4/src/ivory-px4-hw/
- smaccmpilot-stm32f4/src/smaccm-comm-client/
- smaccmpilot-stm32f4/src/smaccm-comm-schema/smaccm-comm-schema-native/
- smaccmpilot-stm32f4/src/smaccm-comm-schema/smaccm-comm-schema-tower/
- smaccmpilot-stm32f4/src/smaccm-commsec/
- smaccmpilot-stm32f4/src/smaccm-datalink/
- smaccmpilot-stm32f4/src/smaccm-flight/
- smaccmpilot-stm32f4/src/smaccm-ins/
- tower/tower/
- tower/tower-aadl/
- tower/tower-config/
- tower/tower-hal/
- tower-camkes-odroid/
# estimator with relaxed version bounds; remove when pushed to Hackage
- location:
git: https://github.com/GaloisInc/estimator.git
commit: 4818515e8a05d7d9c54e51d7ac7fa21580336366
extra-dep: true

# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
extra-deps:
- base-compat-0.9.0
- cipher-aes128-0.7.0.1
- cpphs-1.19.3
- curve25519-0.2.2
- ed25519-donna-0.1.1
# - estimator-1.1.0.2
- exception-mtl-0.4
- ghc-srcspan-plugin-0.2.1.0
- language-c-quote-0.11.4
- mainland-pretty-0.4.1.2
- primitive-0.6.1.0
- s-cargot-0.1.0.0
- serialport-0.4.7
- symbol-0.2.4

# Override default flag values for local packages and extra-deps
flags: {}

# Extra package databases containing global packages
extra-package-dbs: []

system-ghc: true
skip-ghc-check: true
allow-newer: true

# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: >= 1.0.0

# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64

# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]

# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor
11 changes: 11 additions & 0 deletions stack.mk
@@ -0,0 +1,11 @@
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

# Here lies some fine ideas for how to avoid rebuilding packages in
# new stack subprojects, such as those generated by the gidl
# tests. Unfortunately, there's no way to prevent stack from
# rebuilding dependencies pointed to by the `packages` stanza.

# STACK ?= stack --work-dir $(ROOT_DIR)/.stack-work
# export STACK_ROOT := $(ROOT_DIR)/.stack-work
# $(info STACK=$(STACK))
# $(info STACK_ROOT=$(STACK_ROOT))
83 changes: 83 additions & 0 deletions stack.yaml
@@ -0,0 +1,83 @@
# For more information, see: http://docs.haskellstack.org/en/stable/yaml_configuration.html

# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver: lts-2.22

# Local packages, usually specified by relative directory name
packages:
- gec/
- gidl/
- ivory/ivory/
- ivory/ivory-artifact/
- ivory/ivory-backend-c/
- ivory/ivory-eval/
- ivory/ivory-examples/
- ivory/ivory-hw/
- ivory/ivory-model-check/
- ivory/ivory-opts/
- ivory/ivory-quickcheck/
- ivory/ivory-serialize/
- ivory/ivory-stdlib/
#- ivory-rtverification/rtv-example/
#- ivory-rtverification/rtv-lib/
- ivory-tower-posix/
- ivory-tower-stm32/ivory-bsp-stm32/
- ivory-tower-stm32/ivory-bsp-tests/
- ivory-tower-stm32/ivory-freertos-bindings/
- ivory-tower-stm32/tower-freertos-stm32/
- ivory-tower-stm32/tower-freertos-stm32-tests/
#- ivorylang-org/
#- smaccmpilot-org/
- smaccmpilot-stm32f4/src/ivory-geo/
- smaccmpilot-stm32f4/src/ivory-px4-hw/
- smaccmpilot-stm32f4/src/smaccm-comm-client/
- smaccmpilot-stm32f4/src/smaccm-comm-schema/smaccm-comm-schema-native/
- smaccmpilot-stm32f4/src/smaccm-comm-schema/smaccm-comm-schema-tower/
- smaccmpilot-stm32f4/src/smaccm-commsec/
- smaccmpilot-stm32f4/src/smaccm-datalink/
- smaccmpilot-stm32f4/src/smaccm-flight/
- smaccmpilot-stm32f4/src/smaccm-ins/
- tower/tower/
- tower/tower-aadl/
- tower/tower-config/
- tower/tower-hal/
- tower-camkes-odroid/

# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
extra-deps:
- base-compat-0.9.0
- cipher-aes128-0.7.0.1
- cpphs-1.19.3
- curve25519-0.2.2
- ed25519-donna-0.1
- estimator-1.1.0.1
- ghc-srcspan-plugin-0.2.1.0
- primitive-0.6.1.0
- s-cargot-0.1.0.0
- serialport-0.4.7

# Override default flag values for local packages and extra-deps
flags: {}

# Extra package databases containing global packages
extra-package-dbs: []

install-ghc: true

# Control whether we use the GHC we find on the path
# system-ghc: true

# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: >= 1.0.0

# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64

# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]

# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor
2 changes: 1 addition & 1 deletion tower
Submodule tower updated 49 files
+1 −0 .gitignore
+36 −16 .travis.yml
+8 −2 Makefile
+0 −34 Makefile.sandbox
+54 −0 stack-7.10.yaml
+54 −0 stack-8.0.yaml
+11 −0 stack.mk
+50 −0 stack.yaml
+5 −7 tower-aadl/Makefile
+0 −7 tower-aadl/Makefile.deps
+4 −2 tower-aadl/src/Tower/AADL/AST/Common.hs
+7 −5 tower-aadl/src/Tower/AADL/CodeGen.hs
+1 −1 tower-aadl/src/Tower/AADL/Priorities.hs
+2 −2 tower-aadl/src/Tower/AADL/Threads.hs
+2 −2 tower-aadl/test-echronos/Simple.hs
+2 −2 tower-aadl/test/Simple.hs
+3 −0 tower-aadl/tower-aadl.cabal
+1 −6 tower-config/Makefile
+0 −5 tower-config/Makefile.deps
+8 −2 tower-config/src/Ivory/Tower/Config/Parser.hs
+5 −4 tower-config/src/Text/TOML.hs
+26 −11 tower-config/src/Text/TOML/Parser.hs
+1 −0 tower-config/src/Text/TOML/Value.hs
+1 −0 tower-config/tower-config.cabal
+1 −3 tower-hal/Makefile
+0 −6 tower-hal/Makefile.deps
+10 −8 tower-hal/src/Ivory/Tower/HAL/Bus/CAN/Fragment.hs
+13 −12 tower-hal/src/Ivory/Tower/HAL/Bus/CAN/Sched.hs
+1 −1 tower-hal/src/Ivory/Tower/HAL/Bus/Interface.hs
+2 −2 tower-hal/src/Ivory/Tower/HAL/Bus/Sched.hs
+8 −8 tower-hal/src/Ivory/Tower/HAL/RingBuffer.hs
+1 −3 tower/Makefile
+0 −6 tower/Makefile.deps
+3 −2 tower/src/Ivory/Tower/AST/Tower.hs
+3 −1 tower/src/Ivory/Tower/Coroutine.hs
+4 −4 tower/src/Ivory/Tower/Handler.hs
+3 −1 tower/src/Ivory/Tower/Monad/Base.hs
+3 −2 tower/src/Ivory/Tower/Monad/Handler.hs
+3 −2 tower/src/Ivory/Tower/Monad/Monitor.hs
+3 −2 tower/src/Ivory/Tower/Monad/Tower.hs
+3 −3 tower/src/Ivory/Tower/Monitor.hs
+3 −1 tower/src/Ivory/Tower/Options.hs
+4 −3 tower/src/Ivory/Tower/SrcLoc/Location.hs
+0 −4 tower/src/Ivory/Tower/SrcLoc/Plugin.hs
+10 −8 tower/src/Ivory/Tower/Tower.hs
+3 −1 tower/src/Ivory/Tower/Types/Dependencies.hs
+3 −1 tower/src/Ivory/Tower/Types/SignalCode.hs
+3 −2 tower/src/Ivory/Tower/Types/ThreadCode.hs
+1 −0 tower/tower.cabal
2 changes: 1 addition & 1 deletion tower-camkes-odroid

0 comments on commit 3baa282

Please sign in to comment.