forked from jaked/deriving
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile.dist
40 lines (33 loc) · 991 Bytes
/
Makefile.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
##
## Usage:
##
## If the released version is tagged in the main repository, use:
##
## make -f Makefile.dist
##
## If the tag has not been pushed, use:
##
## make -f Makefile.dist REPO=${PWD}
##
## otherwise, use:
##
## make -f Makefile.dist REPO=${PWD} VERSION=master
##
VERSION?=$(shell grep Version: _oasis | cut -d ' ' -f 2)
REPO?=https://github.com/ocsigen/deriving
all: dist sign
dist:
@rm -rf deriving-${VERSION} \
deriving-${VERSION}.tar.gz \
deriving-${VERSION}.tar.gz.asc
git clone --local -b ${VERSION} ${REPO} deriving-${VERSION}
oasis -C deriving-${VERSION} setup
sed -i "s/SETUP := setup-dev.exe/SETUP := setup.exe/" \
deriving-${VERSION}/Makefile
cd deriving-${VERSION} && rm -rf .git .gitignore Makefile.dist opam
tar cvzf deriving-${VERSION}.tar.gz deriving-${VERSION}
@rm -rf deriving-${VERSION}
sign: deriving-${VERSION}.tar.gz.asc
deriving-${VERSION}.tar.gz.asc: deriving-${VERSION}.tar.gz
gpg --armor -b $^
.PHONY: dist sign