Move removal of generated file into new releaseclean target.
[debian/confclerk.git] / confclerk.pro
1 # confclerk.pro
2
3 QMAKEVERSION = $$[QMAKE_VERSION]
4 ISQT4 = $$find(QMAKEVERSION, ^[2-9])
5 isEmpty( ISQT4 ) {
6         error("Use the qmake include with Qt4.4 or greater, on Debian that is qmake-qt4");
7 }
8
9 TEMPLATE = subdirs
10 SUBDIRS = src
11
12 # The global.pri defines the VERSION of the project
13 include(src/global.pri)
14
15 QMAKE_EXTRA_TARGETS += changelog icon man release releaseclean tarball
16
17 changelog.target = ChangeLog
18 changelog.commands = \
19         svn up && svn2cl --group-by-day --reparagraph
20 changelog.CONFIG = phony
21
22 icon.target = data/$${TARGET}.png
23 icon.commands = convert data/$${TARGET}.svg data/$${TARGET}.png
24 icon.depends = data/$${TARGET}.svg
25
26 man.target = data/$${TARGET}.1
27 man.commands = pod2man --utf8 --center=\"Offlince conference scheduler\" --release=\"Version $${VERSION}\" data/$${TARGET}.pod > data/$${TARGET}.1
28 man.depends = data/$${TARGET}.pod
29
30 release.depends = releaseclean tarball
31
32 releaseclean.commands = \
33  $(DEL_FILE) data/$${TARGET}.png data/$${TARGET}.1 ChangeLog
34 #releaseclean.CONFIG = phony
35
36 tarball.target = $${TARGET}-$${VERSION}.tar.gz
37 tarball.commands = \
38         $(DEL_FILE) -r $${TARGET}-$${VERSION} ; \
39         $(MKDIR) $${TARGET}-$${VERSION} ; \
40         $(COPY_DIR) * $${TARGET}-$${VERSION}/ ; \
41         $(DEL_FILE) $${TARGET}-$${VERSION}/*.pro.user* \
42                 $${TARGET}-$${VERSION}/$${TARGET}-$${VERSION}.tar.gz \
43                 $(DEL_FILE) -r $${TARGET}-$${VERSION}/$${TARGET}-$${VERSION} \
44                 $${TARGET}-$${VERSION}/Makefile ; \
45         tar -cz --exclude=.svn --exclude=*.tar.gz -f $$tarball.target $${TARGET}-$${VERSION} ; \
46         $(DEL_FILE) -r $${TARGET}-$${VERSION}
47 tarball.depends = changelog icon man