jmichaelh / xar

Automatically exported from code.google.com/p/xar
0 stars 0 forks source link

src/Makefile.inc.in needs .SECONDARY: line #75

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. autogen.sh, configure & build (should build with -g option)
2. notice the xar.o file was automatically removed as an intermediary during 
the build
3. start gdb on the xar executable that was just built (this is on Mac OS X)
4. gdb complains about missing debugging info

What is the expected output? What do you see instead?

5. Should be able to debug if it was built with -g

What version of the product are you using? On what operating system?

6. Using trunk@232 built on Mac OS X 10.5.8 (and running gdb on there too)

Please provide any additional information below.

7. make normally removes intermediary files during the build.  The way the 
rules are set up in src/Makefile.inc.in results in xar.o being considered an 
intermediary file and so it's normally deleted by make.  On Mac OS X (and 
possibly others) the needed debug information is stored in the .o and so 
debugging fails.

8. The following patch (also attached) to src/Makefile.inc.in corrects the 
problem by telling make to retain the intermediary .o file:

Index: Makefile.inc.in
===================================================================
--- Makefile.inc.in (revision 232)
+++ Makefile.inc.in (working copy)
@@ -1,3 +1,5 @@
+.SECONDARY :
+
 #
 # Include generated dependency files.
 #

9. After the above patch, builds leave the intermediary file xar.o alone and 
debugging succeeds.

Original issue reported on code.google.com by mack...@gmail.com on 12 Aug 2010 at 4:01

Attachments: