-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
40 lines (32 loc) · 1.03 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
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := all
.DELETE_ON_ERROR:
.SUFFIXES:
# Figure out what version we're building
VERSION := $(shell bin/package-version)
HASH := $(shell git -C uwsgi rev-parse HEAD)
# Grab a clean checkout of uWSGI
build/$(HASH).tar.gz:
mkdir -p build
cd build && curl -sLO https://github.com/unbit/uwsgi/archive/$(HASH).tar.gz
# Patch Python packaging of uWSGI
build/pyuwsgi-$(VERSION): build/$(HASH).tar.gz
cd build; tar xzf $(HASH).tar.gz
mv build/uwsgi-$(HASH) build/pyuwsgi-$(VERSION)
bin/patch-uwsgi-packaging build/pyuwsgi-$(VERSION)
echo "graft ." > build/pyuwsgi-$(VERSION)/MANIFEST.in
# Create sdist from patched uWSGI
dist/pyuwsgi-$(VERSION).tar.gz: build/pyuwsgi-$(VERSION)
mkdir -p dist
cd build/pyuwsgi-$(VERSION); python3 setup.py sdist
mv build/pyuwsgi-$(VERSION)/dist/pyuwsgi-$(VERSION).tar.gz $@
.PHONY: sdist
sdist: dist/pyuwsgi-$(VERSION).tar.gz
.PHONY: update
update:
cd uwsgi; git pull
.PHONY: clean
clean:
rm -rf ./dist ./build