File: Makefile

package info (click to toggle)
python-cups 1.9.73-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 460 kB
  • sloc: ansic: 8,863; python: 325; makefile: 58
file content (50 lines) | stat: -rw-r--r-- 1,228 bytes parent folder | download | duplicates (2)
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
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
	mkdir -p html
	pydoc -w $(patsubst %.so,%,$<)
	mv $(patsubst %.so,%.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