[gegl-qt] Build: Add make dist and make distcheck targets



commit a68209e9279e94e5fa7c31b4241658fc3db713ac
Author: Jon Nordby <jononor gmail com>
Date:   Mon Aug 22 23:44:12 2011 +0200

    Build: Add make dist and make distcheck targets

 config.pri  |    1 +
 gegl-qt.pro |   25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/config.pri b/config.pri
index c37c55e..b7e97af 100644
--- a/config.pri
+++ b/config.pri
@@ -1,4 +1,5 @@
 
+GEGLQT_PROJECTNAME = gegl-qt
 GEGLQT_API_VERSION = 0.1
 GEGLQT_VERSION = 0.0.1
 GEGLQT_BASELIBNAME = gegl-qt4
diff --git a/gegl-qt.pro b/gegl-qt.pro
index c68ecb9..c14eab7 100644
--- a/gegl-qt.pro
+++ b/gegl-qt.pro
@@ -1,6 +1,31 @@
+include(config.pri)
 
 TEMPLATE = subdirs
 CONFIG += ordered
 SUBDIRS = gegl-qt operations examples tests
 
 !system(pkg-config --exists gegl):error("Could not find gegl")
+
+
+DIST_NAME = $$GEGLQT_PROJECTNAME-$$GEGLQT_VERSION
+DIST_PATH = $$OUT_PWD/$$DIST_NAME
+TMP_PATH = /tmp/$$GEGLQT_PROJECTNAME-$$GEGLQT_VERSION
+
+# The 'make dist' target
+QMAKE_EXTRA_TARGETS += dist
+dist.target = dist
+dist.commands += git clone $$IN_PWD $$DIST_PATH;
+dist.commands += cd $$OUT_PWD;
+dist.commands += tar -caf $$DIST_NAME\\.tar.xz $$DIST_NAME;
+
+# The 'make distcheck' target
+QMAKE_EXTRA_TARGETS += distcheck
+distcheck.target = distcheck
+distcheck.depends += dist;
+distcheck.commands += mkdir -p $$OUT_PWD/distcheck-build;
+distcheck.commands += cd $$OUT_PWD/distcheck-build;
+distcheck.commands += tar -xf $$DIST_PATH\\.tar.xz;
+distcheck.commands += cd $$DIST_NAME;
+distcheck.commands += qmake;
+distcheck.commands += make -j4;
+distcheck.commands += make check;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]