summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJoey Hess2015-02-28 12:20:03 -0400
committerJoey Hess2015-02-28 12:27:07 -0400
commitdc03e317b40d640e6501be0fce3e32bc29699fbb (patch)
tree4e5b2a7bb2db17c6e962dcbf18f03ada645038f2 /Makefile
parent1a62575d3dc8ce703705de08ccd27b4b034a3388 (diff)
Propellor now builds itself without needing the Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 11 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 414f6741..d706d8ef 100644
--- a/Makefile
+++ b/Makefile
@@ -9,18 +9,10 @@ run: deps build
dev: build tags
-build: dist/setup-config
- @if ! $(CABAL) build; then $(CABAL) configure; $(CABAL) build; fi
- @ln -sf dist/build/propellor-config/propellor-config propellor
-
deps:
@if [ $$(whoami) = root ]; then apt-get --no-upgrade --no-install-recommends -y install $(DEBDEPS) || (apt-get update && apt-get --no-upgrade --no-install-recommends -y install $(DEBDEPS)); 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
-dist/setup-config: propellor.cabal
- @if [ "$(CABAL)" = ./Setup ]; then ghc --make Setup; fi
- @$(CABAL) configure
-
install: propellor.1
install -d $(DESTDIR)/usr/bin $(DESTDIR)/usr/src/propellor
install -s dist/build/propellor/propellor $(DESTDIR)/usr/bin/propellor
@@ -56,3 +48,14 @@ hackage:
@cabal upload dist/*.tar.gz
.PHONY: tags
+
+# The rules below are only used when bootstrapping new propellor
+# installations; propellor contains equivilant haksell code.
+
+build: dist/setup-config
+ @if ! $(CABAL) build; then $(CABAL) configure; $(CABAL) build; fi
+ @ln -sf dist/build/propellor-config/propellor-config propellor
+
+dist/setup-config: propellor.cabal
+ @if [ "$(CABAL)" = ./Setup ]; then ghc --make Setup; fi
+ @$(CABAL) configure