[jhbuild] autotools: run "make distclean" only if there is a Makefile



commit f3a97b4262affdd6f54a8df8f09e3e54247e897a
Author: Diego Escalante Urrelo <diegoe igalia com>
Date:   Thu Nov 1 23:19:15 2012 -0500

    autotools: run "make distclean" only if there is a Makefile
    
    Make sure "make distclean" is run only if there is a Makefile.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687403

 jhbuild/modtypes/autotools.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/modtypes/autotools.py b/jhbuild/modtypes/autotools.py
index eb6e401..79aa11a 100644
--- a/jhbuild/modtypes/autotools.py
+++ b/jhbuild/modtypes/autotools.py
@@ -350,6 +350,10 @@ class AutogenModule(MakeModule, DownloadableModule):
         builddir = self.get_builddir(buildscript)
         if not os.path.exists(builddir):
             return True
+        if not os.path.exists(os.path.join(builddir, self.makefile)) and \
+           not hasattr(self.branch, 'delete_unknown_files'):
+            return True
+
         return False
 
     def do_distclean(self, buildscript):



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