[gtk-doc] scangobj: when using libtool also remove the .o file



commit cc4fd02dd97ab081d851ec28f0640d28c650982d
Author: Stefan Sauer <ensonic users sf net>
Date:   Mon Jun 26 21:54:05 2017 +0200

    scangobj: when using libtool also remove the .o file
    
    Fixes #783889

 gtkdoc/scangobj.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtkdoc/scangobj.py b/gtkdoc/scangobj.py
index 8d3a956..04f9ec2 100644
--- a/gtkdoc/scangobj.py
+++ b/gtkdoc/scangobj.py
@@ -1250,6 +1250,8 @@ def run(options):
     if not options.verbose:
         stdout = ">/dev/null"
 
+    logging.debug('Intermediate scanner files: %s, %s, %s', c_file, o_file, x_file)
+
     # Compiling scanner
     command = '%s %s %s -c -o %s %s' % (options.cc, stdout, options.cflags, o_file, c_file)
     res = subprocess.check_call(command, shell=True)
@@ -1271,10 +1273,13 @@ def run(options):
         logging.warning('Running scanner failed: %d', res)
         return res
 
+    logging.debug('Scan complete')
     if 'GTK_DOC_KEEP_INTERMEDIATE' not in os.environ:
         os.unlink(c_file)
         os.unlink(o_file)
         os.unlink(x_file)
+        if 'libtool' in options.cc:
+            os.unlink(options.module + '-scan.o')
     else:
         logging.debug('Keeping generated sources for analysis: %s, %s, %s',
                       c_file, o_file, x_file)


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