-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
59 lines (49 loc) · 1.21 KB
/
Makefile
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# A simple makefile for creating the Turbine Client distribution file
##########################################################################
# Joshua R. Boverhof, LBNL
# See LICENSE.md for copyright notice!
###########################################################################
VERSION := $(shell git describe --tags --dirty)
PRODUCT=Turbine Client Scripts
PROD_SNAME=turb_client
LICENSE=LICENSE.md
TARGET_NAME=CCSI_$(PROD_SNAME)_$(VERSION)
# OS detection & changes
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
MD5BIN=md5sum
endif
ifeq ($(UNAME), Darwin)
MD5BIN=md5
endif
ifeq ($(UNAME), FreeBSD)
MD5BIN=md5
endif
.DEFAULT_GOAL := all
###
### DIRECT TARGETS
###
$(TARGET_NAME).tar.gz: $(LICENSE)
@python setup.py -q sdist --formats=gztar
@cp dist/TurbineClient-$(VERSION).tar.gz $@
@$(MD5BIN) $@
$(TARGET_NAME).zip: $(LICENSE)
@python setup.py -q sdist --formats=zip
@cp dist/TurbineClient-$(VERSION).zip $@
@$(MD5BIN) $@
###
### PHONY TARGETS
###
.PHONY: all
all: zip tar
.PHONY: tar
tar: $(TARGET_NAME).tar.gz
.PHONY: zip
zip: $(TARGET_NAME).zip
.PHONY: clean
clean:
@\rm -rf dist TurbineClient.egg-info
.PHONY: distclean
distclean: clean
@rm -f $(TARGET_NAME).zip
@rm -f $(TARGET_NAME).tar.gz