forked from upgrades-migrations/redhat-upgrade-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (27 loc) · 798 Bytes
/
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
PYTHON=python
VERSION=0.7.50
all: build
SUBDIRS := systemd man
$(SUBDIRS):
$(MAKE) -C $@
INSTALL_TARGETS = $(SUBDIRS:%=install-%)
$(INSTALL_TARGETS):
$(MAKE) -C $(@:install-%=%) install
CLEAN_TARGETS = $(SUBDIRS:%=clean-%)
$(CLEAN_TARGETS):
$(MAKE) -C $(@:clean-%=%) clean
build: $(SUBDIRS)
$(PYTHON) setup.py build
install: all $(INSTALL_TARGETS)
$(PYTHON) setup.py install --skip-build --root $(DESTDIR)/
clean: $(CLEAN_TARGETS)
$(PYTHON) setup.py clean
rm -rf build
rm -f $(ARCHIVE)
ARCHIVE = redhat-upgrade-tool-$(VERSION).tar.xz
archive: $(ARCHIVE)
redhat-upgrade-tool-$(VERSION).tar.xz:
git archive --format=tar --prefix=redhat-upgrade-tool-$(VERSION)/ HEAD \
| xz -c > $@ || rm $@
.PHONY: all archive install clean
.PHONY: $(SUBDIRS) $(INSTALL_TARGETS) $(CLEAN_TARGETS)