Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

build: split install into deploy + install

'make deploy' is run in vm

the output of that is then transferred to the server (this is currently
manual, till i figure out how i want to handle this)

'make install' is then run on the server
  • Loading branch information...
commit 6e2c7b60051cd24c296e0478fe60818f47b550bf 1 parent 0c20c8f
Suhail Shergill authored

Showing 1 changed file with 17 additions and 6 deletions. Show diff stats Hide diff stats

  1. +17 6 blog/Makefile
23 blog/Makefile
@@ -6,6 +6,7 @@ v = 1
6 6
7 7 prefix = $(root)
8 8 bindir = $(prefix)/bin
  9 +deploydir = $(HOME)/workspace
9 10 blogInitd = /etc/init.d/blog
10 11
11 12 root = $(realpath $(CURDIR)/../..)
@@ -17,9 +18,10 @@ logFiles = $(stderr) blog.prof blog.summary
17 18 launcherFile= $(root)/bin/blog-launcher
18 19 RTSOPTS = $(GHCRTS) +RTS -pa -sblog.summary -xc -RTS
19 20 define launcherContent
20   -#! /bin/sh
21   -pwd
22   -exec $(bindir)/blog $(RTSOPTS) $$@ 1> /dev/null 2> $(stderr)
  21 +#!/bin/sh
  22 +#pwd
  23 +#exec $(bindir)/blog $(RTSOPTS) $$@ 1> /dev/null 2> $(stderr)
  24 +exec $(bindir)/blog $$@ 1> /dev/null 2> $(stderr)
23 25 endef
24 26 export launcherContent
25 27
@@ -52,12 +54,21 @@ clean:
52 54 doc:
53 55 #haskdogs -e
54 56
55   -.PHONY: install
56   -install: blog blog-launcher
  57 +.PHONY: deploy
  58 +deployBin = $(INSTALL) `$(WHICH) $(1)` $(deploydir); upx $(deploydir)/$(1);
  59 +deploy: blog
57 60 cabal install
  61 + $(call map,deployBin,blog publish-entry)
  62 +
  63 +.PHONY: install
  64 +installBin = $(INSTALL) `$(WHICH) $(1)` $(bindir);
  65 +install: blog-launcher
  66 + upx -d `$(WHICH) blog`
  67 + upx -d `$(WHICH) publish-entry`
  68 + $(INSTALL) $(launcherFile) $(bindir)
58 69 sudo $(blogInitd) stop
59 70 $(call map,rotateLog,$(logFiles))
60   - $(INSTALL) `$(WHICH) blog` $(bindir)
  71 + $(call map,installBin,blog publish-entry)
61 72 sudo $(blogInitd) start
62 73 @sleep 5
63 74 $(MAKE) error-file

0 comments on commit 6e2c7b6

Please sign in to comment.
Something went wrong with that request. Please try again.