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 764983 - Update how introspection builds are done on Visual Studio
Update how introspection builds are done on Visual Studio
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: build
unspecified
Other Windows
: Normal normal
: ---
Assigned To: ATK maintainer(s)
ATK maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-04-13 09:05 UTC by Fan, Chun-wei
Modified: 2016-04-13 12:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a common autotools module to generate the items needed for building introspection under Visual Studio (7.30 KB, patch)
2016-04-13 09:09 UTC, Fan, Chun-wei
committed Details | Review
Generate the items for generating introspection on Visual Studio builds during 'make dist' (28.37 KB, patch)
2016-04-13 09:12 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2016-04-13 09:05:47 UTC
Hi,

Currently, in ATK, introspection builds are done on Visual Studio builds in the following way, when the NMake Makefile is invoked:

-A Python script is used to parse atk/Makefile.am for the files that
 need to be fed through the introspection scanner, which is then made
 into a file list that is passed into g-ir-scanner.

-The full introspection command that calls g-ir-scanner, which is currently 
 maintained by hand in the NMake Makefiles, is then run to generate the 
 Atk-1.0.gir file.

-The Atk-1.0.typelib is then generated using g-ir-compiler, using a
 hand-written command line in the NMake Makefiles

This works for our purposes, but is not actually that optimal, in terms of maintenance.

This bug will attempt to move the process to depend on 'make dist', when we generate the release tarball, to do these steps automatically, which is the approach that is currently done in GtkSourceview, libsoup and HarfBuzz.  This helps to make things more consistent across the board and that we can have the same NMake Makefile modules as far as possible.

Note that this is *not* done in GObject-Introspection due to differences of how introspection is done there, specifically the file list is generated in a different way for *all* builds, at least for the .gir's for GLib (i.e. GLib-2.0.gir, GObject-2.0.gir, GModule-2.0.gir and Gio-2.0.gir).

I will attach the patch for this in a bit.
Comment 1 Fan, Chun-wei 2016-04-13 09:09:49 UTC
Created attachment 325845 [details] [review]
Add a common autotools module to generate the items needed for building introspection under Visual Studio

Hi,

This is the same Makefile.msvc-introspection that is used in GtkSourceview and libsoup, which is included by atk/Makefile.am to:

-Generate the file list that is to be fed into g-ir-scanner
-Generate the NMake Makefile snippet that contains the full
 command line for g-ir-scanner and g-ir-compiler...
Comment 2 Fan, Chun-wei 2016-04-13 09:12:48 UTC
Created attachment 325846 [details] [review]
Generate the items for generating introspection on Visual Studio builds during 'make dist'

Hi,

This updates the autotools files to:
-Generate the items (as described in the previous comment) for generating
 introspection on Visual Studio builds during 'make dist'.
 This is not unlike what is done in build/Makefile.msvcproj when generating
 the full Visual Studio project files.
-Dist those files that are generated.
-Move the NMake Makefiles that are used for introspection into build/win32.

With blessings, thank you!
Comment 3 Ignacio Casal Quinteiro (nacho) 2016-04-13 09:31:01 UTC
Review of attachment 325845 [details] [review]:

Go ahead
Comment 4 Ignacio Casal Quinteiro (nacho) 2016-04-13 09:32:48 UTC
Review of attachment 325846 [details] [review]:

If you tested that dist check still passes go for it.
Comment 5 Fan, Chun-wei 2016-04-13 12:57:50 UTC
Hi Nacho,

Thanks!  I have pushed these patches as:
-Attachment 325845 [details]: 8c77521
-Attachment 325846 [details]: d7b5fb0

I checked with 'make distcheck' to make sure things were alright.

With blessings, thank you!