File: Makefile

package info (click to toggle)
qtchooser 66-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 260 kB
  • sloc: cpp: 900; makefile: 167; sh: 82
file content (113 lines) | stat: -rw-r--r-- 2,651 bytes parent folder | download
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
MKDIR  = mkdir -p
prefix = /usr
bindir = $(prefix)/bin
TOOLS = assistant \
	designer \
	lconvert \
	linguist \
	lrelease \
	lupdate \
	moc \
	pixeltool \
	qcollectiongenerator \
	qdbus \
	qdbuscpp2xml \
	qdbusviewer \
	qdbusxml2cpp \
	qdoc \
	qdoc3 \
	qgltf \
	qhelpconverter \
	qhelpgenerator \
	qlalr \
	qmake \
	qml \
	qml1plugindump \
	qmlbundle \
	qmlcachegen \
	qmleasing \
	qmlimportscanner \
	qmljs \
	qmllint \
	qmlmin \
	qmlplugindump \
	qmlprofiler \
	qmlscene \
	qmltestrunner \
	qmlviewer \
	qtattributionsscanner \
	qtconfig \
	qtdiag \
	qtpaths \
	qtplugininfo \
	qvkgen \
	rcc \
	repc \
	uic \
	uic3 \
	xmlpatterns \
	xmlpatternsvalidator \

# keep the above line empty

MACTOOLS = macdeployqt
QMAKE = qmake

all:
	cd src/qtchooser && $(MAKE)

clean:
	-cd src/qtchooser && $(MAKE) clean
	-cd tests/auto && $(MAKE) clean

distclean:
	-cd src/qtchooser && $(MAKE) distclean
	-cd tests/auto && $(MAKE) distclean

install:
	cd src/qtchooser && $(MAKE) install
	for tool in $(TOOLS); do ln -sf qtchooser "$(INSTALL_ROOT)$(bindir)/$$tool"; done
	case `uname -s` in Darwin) \
	    for tool in $(MACTOOLS); do ln -sf qtchooser "$(INSTALL_ROOT)$(bindir)/$$tool"; done \
	;; esac
	$(MKDIR) $(INSTALL_ROOT)$(prefix)/share/man/man1
	install -m 644 -p doc/qtchooser.1 $(INSTALL_ROOT)$(prefix)/share/man/man1

uninstall:
	cd src/qtchooser && $(MAKE) uninstall
	-for tool in $(TOOLS); do rm -f "$(INSTALL_ROOT)$(bindir)/$$tool"; done
	case `uname -s` in Darwin) \
	    for tool in $(MACTOOLS); do rm -f "$(INSTALL_ROOT)$(bindir)/$$tool"; done \
	;; esac

tests/auto/Makefile: tests/auto/auto.pro
	cd tests/auto && $(QMAKE) -o Makefile auto.pro

check: all tests/auto/Makefile
	cd src/qtchooser && $(MAKE) check
	cd tests/auto && $(MAKE) check

HEAD          = HEAD
dist: .git
	@ \
	{ rev=$$(git describe --exact-match --tags $(HEAD) 2>/dev/null) && \
	  name=qtchooser-$${rev#v}; } || \
	{ rev=$$(git rev-parse --short $(HEAD)) && \
	  name=qtchooser-$$(git rev-list $(HEAD) | wc -l)-g$$rev; } && \
	echo "Creating package $$name" >&2 && \
	git archive --prefix="$$name/" -9 --format=tar.gz -o $$name.tar.gz $$rev && \
	git archive --prefix="$$name/" -9 --format=zip -v -o $$name.zip $$rev

tagdist: .git
	@git describe --exact-match --tags $(HEAD) >/dev/null 2>&1 || { \
	  n=$$(git rev-list --count $(HEAD)) && \
	  echo "Creating tag v$$n" && \
	  git tag -a -m "qtchooser release $$n" v$$n; }
	$(MAKE) dist

distcheck: .git
	git archive --prefix=qtchooser-distcheck/ --format=tar $(HEAD) | tar -xf -
	cd qtchooser-distcheck && $(MAKE) check
	-rm -rf qtchooser-distcheck

.PHONY: all install uninstall check clean distclean dist tagdist distcheck