propellor/Makefile

42 lines
1.4 KiB
Makefile
Raw Normal View History

CABAL?=cabal
run: deps build
2014-03-30 06:51:21 +00:00
./propellor
2014-03-31 20:20:38 +00:00
dev: build tags
2014-03-30 06:57:02 +00:00
build: dist/setup-config
if ! $(CABAL) build; then $(CABAL) configure; $(CABAL) build; fi
ln -sf dist/build/config/config propellor
2014-03-30 06:48:01 +00:00
deps:
2014-04-10 20:07:13 +00:00
@if [ $$(whoami) = root ]; then apt-get --no-upgrade --no-install-recommends -y install gnupg ghc cabal-install libghc-missingh-dev libghc-ansi-terminal-dev libghc-ifelse-dev libghc-unix-compat-dev libghc-hslogger-dev libghc-network-dev libghc-quickcheck2-dev; fi || true
@if [ $$(whoami) = root ]; then apt-get --no-upgrade --no-install-recommends -y install libghc-async-dev || cabal update; cabal install async; fi || true
2014-03-30 06:48:01 +00:00
2014-03-30 06:44:40 +00:00
dist/setup-config: propellor.cabal
if [ "$(CABAL)" = ./Setup ]; then ghc --make Setup; fi
$(CABAL) configure
install:
install -d $(DESTDIR)/usr/bin $(DESTDIR)/usr/src/propellor
install -s dist/build/propellor/propellor $(DESTDIR)/usr/bin
$(CABAL) sdist
cat dist/propellor-*.tar.gz | \
(cd $(DESTDIR)/usr/src/propellor && tar zx --strip-components=1)
2014-03-30 04:08:02 +00:00
clean:
rm -rf dist Setup tags propellor propellor-wrapper privdata/local
find -name \*.o -exec rm {} \;
find -name \*.hi -exec rm {} \;
# hothasktags chokes on some template haskell etc, so ignore errors
tags:
find . | grep -v /.git/ | grep -v /tmp/ | grep -v /dist/ | grep -v /doc/ | egrep '\.hs$$' | xargs hothasktags > tags 2>/dev/null
2014-03-31 00:46:31 +00:00
# Upload to hackage.
hackage:
@cabal sdist
@cabal upload dist/*.tar.gz
2014-03-31 00:46:31 +00:00
.PHONY: tags