[petsc] 03/07: apply dh_auto_clean conditionally

Drew Parsons dparsons at moszumanska.debian.org
Thu Oct 1 18:32:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

dparsons pushed a commit to branch master
in repository petsc.

commit ce17ed6ca1a3c716130ef91f4ed069ab1ad0531f
Author: Drew Parsons <dparsons at debian.org>
Date:   Thu Oct 1 19:11:18 2015 +0800

    apply dh_auto_clean conditionally
    
    debian/rules clean fails on clean source, since the upstream makefile
    does not check if PETSC_DIR and PETSC_ARCH have been properly defined
    (e.g. the petscvariables to be included at the top of the makefile do
    not exist yet)
    
    So check if the build directories exist before proceeding with
    dh_auto_clean
---
 debian/rules | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 4920329..7fe96a8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -93,8 +93,18 @@ CONFIGURATION_OPTIONS=--with-shared-libraries \
 %:
 	dh $@ 
 
-# dh_make generated override targets
-# This is example for Cmake (See https://bugs.debian.org/641051 )
+
+override_dh_auto_clean:
+	if [ -d $(PETSC_DEBUG_BUILD_DIR) ]; then \
+	  dh_auto_clean -p$(PETSC_DEBUG_PACKAGE) -- \
+	    PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_DEBUG_BUILD_DIR); \
+	fi
+	if [ -d $(PETSC_BUILD_DIR) ]; then \
+	dh_auto_clean -p$(PETSC_VERSIONED_DEV_PACKAGE) -- \
+	  PETSC_DIR=$(CURDIR) PETSC_ARCH=$(PETSC_BUILD_DIR); \
+	fi
+
+
 override_dh_auto_configure:
 	dh_auto_configure -p$(PETSC_DEBUG_PACKAGE) --  \
           --with-debugging=1  \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/petsc.git



More information about the debian-science-commits mailing list