]> woffs.de Git - fd/haskell-amqp-utils.git/commitdiff
parallel build
authorFrank Doepper <[email protected]>
Sun, 8 Jul 2018 18:47:16 +0000 (20:47 +0200)
committerFrank Doepper <[email protected]>
Sun, 8 Jul 2018 19:04:04 +0000 (21:04 +0200)
Makefile
debian/rules

index cfcd3ae9665d99d5e3b474a0c91e4cc9029a1502..771c4f07d4c52342694eeb0fc1b2fc163a693c83 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,14 @@
 DESTDIR=
 pfx=/usr/local
 flavour=$(shell if stack --version >/dev/null 2>&1; then echo stack; elif cabal --version >/dev/null 2>&1; then echo cabal; else echo simple; fi)
+parallel=$(filter -j%, $(MAKEFLAGS))
 
 build: build-$(flavour)
 install: install-$(flavour) install-common
 
 build-stack:
        stack setup
-       stack build --pedantic
+       stack build
 
 install-stack: build-stack
        install -d -m755 $(DESTDIR)$(pfx)/bin
@@ -23,7 +24,7 @@ build-cabal:
        cabal update
        cabal install --only-dependencies --enable-tests $(CONSTRAINTS)
        cabal configure --enable-tests
-       cabal build
+       cabal build $(parallel)
        cabal test
 
 install-cabal: build-cabal
@@ -31,7 +32,7 @@ install-cabal: build-cabal
 
 build-simple: Setup
        ./Setup configure --prefix=$(pfx)
-       ./Setup build
+       ./Setup build $(parallel)
 
 install-simple: build-simple
        ./Setup copy --destdir=$(DESTDIR)
@@ -39,7 +40,7 @@ install-simple: build-simple
 all:   $(subst .hs,,$(wildcard *.hs))
 
 %:     %.hs
-       ghc -Wall -threaded --make $<
+       ghc -Wall -threaded $<
        rm -f [email protected] [email protected]
 
 clean:
index 51f3a91860a5a0286970bda9fd8c58c9095f2071..e0aed062888bfdf92acb43590d4027440d3c55bf 100755 (executable)
@@ -4,8 +4,8 @@
 
 override_dh_auto_build:
        mkdir -p $(CURDIR)/.home
-       LC_ALL=C.UTF-8 LANG=C.UTF-8 HOME=$(CURDIR)/.home dh_auto_build -- pfx=/usr
+       LC_ALL=C.UTF-8 LANG=C.UTF-8 HOME=$(CURDIR)/.home dh_auto_build --parallel -- pfx=/usr
 
 override_dh_auto_install:
        mkdir -p $(CURDIR)/.home
-       LC_ALL=C.UTF-8 LANG=C.UTF-8 HOME=$(CURDIR)/.home dh_auto_install -- pfx=/usr
+       LC_ALL=C.UTF-8 LANG=C.UTF-8 HOME=$(CURDIR)/.home dh_auto_install --parallel -- pfx=/usr
don't click here