After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 137530 - Possible generation of incorrect includes in wrap_init.cc
Possible generation of incorrect includes in wrap_init.cc
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: build
2.2
Other All
: Normal trivial
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2004-03-17 20:21 UTC by Victor Zverovich
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4



Description Victor Zverovich 2004-03-17 20:21:39 UTC
When building gtkmm2 outside of source tree incorrect includes (such as
#include "../../../gtkmm2/glib/src/convert.h") will be generated in
wrap_init.cc if it is rebuilt.

Reproducing:
1. touch any file on which wrap_init.cc depends (e.c. gtkmm2/gtk/src/*.hg)
2. configure and build gtkmm2 in a directory outside of source tree

My solution is to strip out path from each filename when generating include
file list. This should be relevant because wrap_init.cc is located in the
same directory as generated headers it includes.

Patch:

Index: tools/generate_wrap_init.pl.in
===================================================================
RCS file: /cvs/gnome/gtkmm-root/tools/generate_wrap_init.pl.in,v
retrieving revision 1.5
diff -u -u -r1.5 generate_wrap_init.pl.in
--- tools/generate_wrap_init.pl.in      25 Aug 2002 20:06:29 -0000      1.5
+++ tools/generate_wrap_init.pl.in      17 Mar 2004 19:53:01 -0000
@@ -136,7 +136,7 @@
  
   # Store header filename so that we can #include it later:
   my $filename_header = $filename;
-  $filename_header =~ s/\.hg/\.h/;
+  $filename_header =~ s/.*\/([^\/]+)\.hg/$1.h/;
   push(@filenames_headers, $filename_header);
  
   shift @ARGV;
Comment 1 Murray Cumming 2004-03-18 13:38:26 UTC
OK, let's try that. Committed. Thanks. 

Please submit an actual patch in future - see gtkmm.org/bugs.shtml