Skip to content

Commit

Permalink
Adding stack configuration and updating Makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed Jun 20, 2015
1 parent bd7b0ff commit d2a2648
Show file tree
Hide file tree
Showing 59 changed files with 90 additions and 274 deletions.
31 changes: 20 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
DEPS ?= core $(wildcard amazonka-*)
SERVICES ?= $(wildcard amazonka-*)
LIBRARIES ?= core amazonka $(SERVICES)
FORWARD := sdist upload

.PHONY: full-clean
build:
stack build

test:
stack test amazonka-core

clean:
stack clean

define forward
$1: cabal.sandbox.config $$(addprefix $1-,$$(DEPS))
$1: $$(addprefix $1-,$$(LIBRARIES)
$1-%:
@make -C $$* $1
.PHONY: $1
endef
FORWARD := build configure deps install sdist upload clean doc

$(foreach c,$(FORWARD),$(eval $(call forward, $c)))
full-clean: clean
rm -rf cabal.sandbox.config .cabal-sandbox
.PHONY: $(LIBRARIES)
amazonka:
stack build amazonka
cabal.sandbox.config:
cabal sandbox init
core:
stack build amazonka-core
travis: cabal.sandbox.config
@make -C core test
$(SERVICES):
stack build $@
3 changes: 0 additions & 3 deletions amazonka-autoscaling/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-cloudformation/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-cloudfront/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-cloudhsm/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-cloudsearch-domains/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-cloudsearch/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-cloudtrail/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-cloudwatch-logs/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-cloudwatch/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-codedeploy/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-cognito-identity/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-cognito-sync/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-config/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-datapipeline/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-directconnect/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-ds/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-dynamodb/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-ec2/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-ecs/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-efs/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-elasticache/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-elasticbeanstalk/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-elastictranscoder/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-elb/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-emr/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-glacier/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-iam/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-importexport/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-kinesis/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-kms/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-lambda/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-ml/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-opsworks/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-rds/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-redshift/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-route53-domains/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-route53/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-s3/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-sdb/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-ses/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-sns/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-sqs/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-ssm/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-storagegateway/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-sts/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-support/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-swf/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions amazonka-workspaces/Makefile

This file was deleted.

4 changes: 1 addition & 3 deletions amazonka/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
TOP := ..

include $(TOP)/share/library.mk
include ../share/library.mk
19 changes: 3 additions & 16 deletions comp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ DEPS := vendor/botocore
MODEL_DIR := model
OUT_DIR := ..

CABAL_INSTALL_DEFARGS ?= -j \
--disable-documentation \
--disable-coverage \
--enable-profiling

define version =
$(shell sed -n 's/^version: *\(.*\)$$/\1/p' $(1))
endef
Expand Down Expand Up @@ -93,23 +88,15 @@ compile: build
$(addprefix --model=,$(addprefix $(MODEL_DIR)/,$(MODELS)))

build: $(MODEL_DIR)
cabal build $(addprefix -,$(findstring j,$(MAKEFLAGS)))

include ../share/stackage.mk

deps: $(DEPS) cabal.sandbox.config # temporary cabal.config
cabal install $(CABAL_INSTALL_DEFARGS) --only-dependencies
stack build

clean:
cabal clean
rm -rf $(MODEL_DIR) cabal.sandbox.config .cabal-sandbox cabal.config
stack clean
rm -rf $(MODEL_DIR)

full-clean: clean
rm -rf $(DEPS)

cabal.sandbox.config:
cabal sandbox init

vendor/botocore:
git clone [email protected]:boto/botocore $@

Expand Down
3 changes: 2 additions & 1 deletion comp/amazonka-compiler.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ executable compile
, Compiler.Types.NS
, Compiler.Types.Notation
, Compiler.Types.Orphans
, Compiler.Types.Pager
, Compiler.Types.Service
, Compiler.Types.URI
, Compiler.Types.Waiter
Expand All @@ -63,7 +64,7 @@ executable compile
, data-default-class
, directory-tree
, ede
, errors
, errors == 2.*
, formatting
, free
, hashable
Expand Down
5 changes: 2 additions & 3 deletions comp/stack.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
resolver: nightly-2015-06-17
flags: {}
packages:
- '.'
flags: {}
packages: ['.']
extra-deps:
- errors-2.0.0
- text-regex-replace-0.1.0.1
9 changes: 6 additions & 3 deletions comp/template/example/makefile.ede
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
TOP := ../..
PARENT := {{ libraryName }}
SHELL := /usr/bin/env bash

include $(TOP)/share/examples.mk
build:
stack build

clean:
stack clean
15 changes: 2 additions & 13 deletions core/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
TOP := ..
NAME := amazonka-core
VERSION := $(shell sed -n 's/^version: *\(.*\)$$/\1/p' amazonka-core.cabal)
NAME := amazonka-core

include $(TOP)/share/library.mk

.PHONY: test

test: cabal.config.stripped
ln -fs $(CABAL_SANDBOX_CONFIG) cabal.sandbox.config && \
cabal install --enable-tests --only-dep && \
cabal configure --enable-tests && \
cabal build && \
cabal test
include ../share/library.mk
29 changes: 0 additions & 29 deletions share/examples.mk

This file was deleted.

Loading

0 comments on commit d2a2648

Please sign in to comment.