-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathMakefile
48 lines (37 loc) · 1.14 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
PYTHON=python
NAME=pycups
VERSION:=$(shell $(PYTHON) setup.py --version)
SDIST_ARGS=--formats=bztar -d.
RPMCONFIGDIR:=$(shell rpm -E "%{_rpmconfigdir}" 2>/dev/null || :)
SOURCES=cupsmodule.c cupsconnection.c cupsppd.c cupsipp.c setup.py \
cupsppd.h cupsipp.h cupsconnection.h cupsmodule.h \
psdriver.attr postscriptdriver.prov
DIST=Makefile test.py \
examples \
COPYING NEWS README TODO
cups.so: force
$(PYTHON) setup.py build
ln -sf build/lib*/$@ .
doc: cups.so
rm -rf html
epydoc -o html --html $<
doczip: doc
cd html && zip ../cups-html.zip *
clean:
-rm -rf build cups.so *.pyc *~
dist:
$(PYTHON) setup.py sdist $(SDIST_ARGS)
upload:
$(PYTHON) setup.py sdist $(SDIST_ARGS) upload -s
install: install-rpmhook
ROOT= ; \
if [ -n "$$DESTDIR" ]; then ROOT="--root $$DESTDIR"; fi; \
$(PYTHON) setup.py install --skip-build $$ROOT
install-rpmhook:
if [ -n "$(RPMCONFIGDIR)" ]; then \
RPMCONFIG="$$DESTDIR$(RPMCONFIGDIR)" ; \
mkdir -p "$$RPMCONFIG"/fileattrs ; \
install -m0644 psdriver.attr "$$RPMCONFIG"/fileattrs/ ; \
install -m0755 postscriptdriver.prov "$$RPMCONFIG"/ ; \
fi
.PHONY: doc doczip clean dist install install-rpmhook force