[pan] Run make dist to avoid missing out on renamed files in EXTRA_DIST



commit d20d27dd6540757e49326ed9a5c6a244a62250c0
Author: Petr Kovar <pkovar redhat com>
Date:   Mon Dec 6 19:12:33 2021 +0100

    Run make dist to avoid missing out on renamed files in EXTRA_DIST

 .gitlab-ci.yml | 23 +++++++++++++++++------
 autogen.sh     | 32 ++++++++++++++++++--------------
 configure.ac   |  2 +-
 3 files changed, 36 insertions(+), 21 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1aa35af..037a0ec 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,8 +1,14 @@
+stages:
+  - build
+
 variables:
   DEBIAN_FRONTEND: noninteractive
 
 build-ubuntu-gtk2:
   image: ubuntu:rolling
+  stage: build
+  except:
+    - tags
   before_script:
     - apt-get update
     - apt-get install -q -y --no-install-recommends
@@ -21,12 +27,16 @@ build-ubuntu-gtk2:
         libgnutls28-dev
         yelp-tools
   script:
-    - ./autogen.sh --without-gtk3 --with-gnutls --with-dbus --with-gmime-crypto --with-gtkspell 
--enable-libnotify --enable-gkr --enable-manual
-    - make
-    - make check
+    - mkdir _build
+    - cd _build
+    - ../autogen.sh --without-gtk3 --with-gnutls --with-dbus --with-gmime-crypto --with-gtkspell 
--enable-libnotify --enable-gkr --enable-manual
+    - make && make distcheck
 
 build-ubuntu-gtk3:
   image: ubuntu:rolling
+  stage: build
+  except:
+    - tags
   before_script:
     - apt-get update
     - apt-get install -q -y --no-install-recommends
@@ -47,8 +57,9 @@ build-ubuntu-gtk3:
         libsecret-1-dev
         libgtkspell3-3-dev
         yelp-tools
-
   script:
-    - ./autogen.sh --with-gtk3 --with-gnutls --with-dbus --with-gmime-crypto --with-gtkspell 
--enable-libnotify --enable-gkr --enable-manual
+    - mkdir _build
+    - cd _build
+    - ../autogen.sh --with-gtk3 --with-gnutls --with-dbus --with-gmime-crypto --with-gtkspell 
--enable-libnotify --enable-gkr --enable-manual
     - make
-    - make check
+    - make distcheck
diff --git a/autogen.sh b/autogen.sh
index 6f8dff2..9647ea6 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,40 +1,44 @@
 #!/bin/sh
 # Run this to generate all the initial makefiles, etc.
 
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+test -n "$srcdir" || srcdir=$(dirname "$0")
+test -n "$srcdir" || srcdir=.
 
 olddir=$(pwd)
 
 cd $srcdir
 
-(test -f $srcdir/Makefile.am && test -d $srcdir/pan) || {
+(test -f configure.ac && test -d pan) || {
     echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
     echo " top-level Pan directory"
     exit 1
 }
 
+# Allows running make dist(check) in gitlab-ci.yml
+if [ ! -f pan-git.version ] ; then
+    touch pan-git.version
+fi
+
 # shellcheck disable=SC2016
 PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
 
 if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
-       echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
-       echo "*** If you wish to pass any to it, please specify them on the" >&2
-       echo "*** '$0' command line." >&2
-       echo "" >&2
+    echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
+    echo "*** If you wish to pass any to it, please specify them on the" >&2
+    echo "*** '$0' command line." >&2
+    echo "" >&2
 fi
 
 autoreconf --verbose --force --install || exit 1
 
 cd "$olddir"
 if [ "$NOCONFIGURE" = "" ]; then
-       $srcdir/configure "$@" || exit 1
+    $srcdir/configure "$@" || exit 1
 
-       if [ "$1" = "--help" ]; then exit 0
-       else
-               echo "Now type 'make' to compile $PKG_NAME" || exit 1
-       fi
+    if [ "$1" = "--help" ]; then exit 0
+    else
+        echo "Now type 'make' to compile $PKG_NAME" || exit 1
+    fi
 else
-       echo "Skipping configure process."
+    echo "Skipping configure process."
 fi
-
diff --git a/configure.ac b/configure.ac
index 7e61faf..a719895 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@ if test ! -z $GIT_HASH; then
     GIT_REV="$GIT_HASH $GIT_REMOTE"
   fi
     echo $GIT_REV > pan-git.version
-  elif test -f pan-git.version ; then
+  elif test -s pan-git.version ; then
     GIT_REV=`cat pan-git.version`
   else
     GIT_REV="Unknown"


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