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 735039 - Clean up the autotools build files a bit (in particular the MSVC-related parts)
Clean up the autotools build files a bit (in particular the MSVC-related parts)
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2014-08-19 09:20 UTC by Fan, Chun-wei
Modified: 2015-04-10 02:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Makefile.am's: Change all INCLUDES to AM_CPPFLAGS (5.68 KB, patch)
2014-08-19 12:51 UTC, Fan, Chun-wei
none Details | Review
Build: Do the build of libmini-fribidi within pango/Makefile.am (10.88 KB, patch)
2014-08-19 12:56 UTC, Fan, Chun-wei
none Details | Review
build: Add common autotools module that can be included by various projects to generate MSVC projects from their respective templates (5.14 KB, patch)
2014-08-19 13:03 UTC, Fan, Chun-wei
none Details | Review
build: Use the common autotools module for generating the MSVC projects from their respective templates (22.76 KB, patch)
2014-08-19 13:07 UTC, Fan, Chun-wei
none Details | Review
build: Add common autotools module that can be included by various projects to generate MSVC projects from their respective templates (take ii) (5.70 KB, patch)
2014-08-25 06:59 UTC, Fan, Chun-wei
committed Details | Review
Restore Visual Studio 2008/2010 Project Generation (52.96 KB, patch)
2015-04-07 10:16 UTC, Fan, Chun-wei
committed Details | Review
Fix and Clean Up the Autotools Modules to Generate the Visual Studio 2012/2013 Projects (2.50 KB, patch)
2015-04-07 10:19 UTC, Fan, Chun-wei
committed Details | Review
Restore the Generation of Visual Studio 2012/2013 Projects (2.00 KB, patch)
2015-04-07 10:20 UTC, Fan, Chun-wei
committed Details | Review
build/Makefile.msvcproj: Don't Use realpath(1) (1.49 KB, patch)
2015-04-08 06:24 UTC, Fan, Chun-wei
none Details | Review
build/Makefile.msvcproj: Don't Use realpath(1) (take ii) (2.73 KB, patch)
2015-04-09 10:47 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2014-08-19 09:20:12 UTC
Hi,

According to a discussion that I had with Behdad some time ago, he suggested to me that the generic parts in the autotools build files used to fill in the MSVC project templates be consolidated into a separate autotools module that can be made use of by various projects.

I thought, as I try to come up with this, also try to clean up the Makefile.am's a bit, by replacing the INCLUDES with AM_CPPFLAGS, and also merging the Makefile.am for mini-fribidi into the main Makefile.am for Pango.

With blessings, thank you!
Comment 1 Fan, Chun-wei 2014-08-19 12:51:05 UTC
Created attachment 283877 [details] [review]
Makefile.am's: Change all INCLUDES to AM_CPPFLAGS

Hi,

First up is the update to all the Makefile.am's (except the one in pango/mini-fribidi, as the next patch will merge its build process into pango/Makefile.am), so that we don't get warnings for deprecated usage...
Comment 2 Fan, Chun-wei 2014-08-19 12:56:02 UTC
Created attachment 283879 [details] [review]
Build: Do the build of libmini-fribidi within pango/Makefile.am

Hi,

Next up would be to do the build of libmini-fribidi from within pango/Makefile.am (and hence drop the Makefile.am in pango/mini-fribi)-please note that this would need some interim changes to the other build files as well, as this will change how the MSVC projects are generated.  This is done so so that it is easier to transition to using a common autotools modules across projects for generating MSVC projects from their respective templates (which is in a later patch that I will post for this bug)...
Comment 3 Fan, Chun-wei 2014-08-19 13:03:31 UTC
Created attachment 283881 [details] [review]
build: Add common autotools module that can be included by various projects to generate MSVC projects from their respective templates

Hi,

This adds a common autotools module (which AFAICT is the core purpose for this bug, as Behdad suggested) to be used by GNOME projects which support building via MSVC, meaning that this module can be used by various projects, e.g. GLib, GTK+, ...  If it is preferable that this goes to a common package/repo such as gnome-common, any insight/pointer on how that can be achieved would be great.  This is modeled after Makefile.introspection, which is the autotools files that is used by many projects to generate the introspection files for them.

The patch to move the Pango build files for using this module for MSVC project file generation will be coming up next...
Comment 4 Fan, Chun-wei 2014-08-19 13:07:06 UTC
Created attachment 283882 [details] [review]
build: Use the common autotools module for generating the MSVC projects from their respective templates

Hi,

This updates the Pango build files to use the common autotools module (attachment 283881 [details] [review]) to generate the build files and if needed, the listing of headers to install.

Any comments or suggestions on this initiative is highly appreciated.

With blessings, thank you!
Comment 5 Fan, Chun-wei 2014-08-25 06:59:23 UTC
Created attachment 284375 [details] [review]
build: Add common autotools module that can be included by various projects to generate MSVC projects from their respective templates (take ii)

Hi,

It seems that the common module needs some more enhancements so that it can become more generic across projects, so here it is

With blessings, thank you!
Comment 6 Fan, Chun-wei 2015-04-07 10:16:54 UTC
Created attachment 301056 [details] [review]
Restore Visual Studio 2008/2010 Project Generation

Hi,

This patch uses the common autotools module, which was modelled on the one used for building introspection, to generate the complete MSVC 2008/2010 Project file and property sheet set, and is checked with 'make distcheck' and 'make -j8 distcheck'...
Comment 7 Fan, Chun-wei 2015-04-07 10:19:16 UTC
Created attachment 301058 [details] [review]
Fix and Clean Up the Autotools Modules to Generate the Visual Studio 2012/2013 Projects

Hi,

As the description suggests, this cleans up and fixes the autotools module to generate the Visual Studio 2012/2013 Projects from the 2010 projects.  This is also checked with 'make distcheck'/'make -j8 distcheck'...
Comment 8 Fan, Chun-wei 2015-04-07 10:20:46 UTC
Created attachment 301059 [details] [review]
Restore the Generation of Visual Studio 2012/2013 Projects

Hi,

This uses the updated autotools module (attachment 301058 [details] [review]) to generate the Visual Studio 2012/2013 Projects, also checked with 'make distcheck'/'make -j8 distcheck'.

With blessings, thank you!
Comment 9 Fan, Chun-wei 2015-04-08 06:24:37 UTC
Created attachment 301100 [details] [review]
build/Makefile.msvcproj: Don't Use realpath(1)

Hi,

From Behdad's comments in bug 733882 (comments 22 and 25), I went ahead to commit the changes here, as follows:

Attachment 284375 [details] (build: Add common autotools module that can be included by various projects to generate MSVC projects from their respective templates (take ii)): b5519c3

Attachment 301056 [details] (Restore Visual Studio 2008/2010 Project Generation): 8e772f8

Attachment 301058 [details] (Fix and Clean Up the Autotools Modules to Generate the Visual Studio 2012/2013 Projects): dc1d6bb

Attachment 301059 [details] (Restore the Generation of Visual Studio 2012/2013 Projects): 6f4737e

As Behdad mentioned that realpath(1) on Ubuntu 12.04 does not support --relative-to, and it is found that there are different implementations of realpath(1) floating around, the attached patch replaces the call to realpath with a combination of grep, wc and cut, that attempts to retrieve the correct relative subdirectory (from $(top_srcdir)) of $(srcdir).  This is also checked with 'make -j8 distcheck' and 'make distcheck', which passed

With blessings, thank you!
Comment 10 Fan, Chun-wei 2015-04-09 10:47:02 UTC
Created attachment 301198 [details] [review]
build/Makefile.msvcproj: Don't Use realpath(1) (take ii)

Hi Behdad,

I think it's better that I add you to the CC list, for records sake, I hope that you don't mind this... :)

From your previous e-mails, for records:
---
>I don't know what system you are using, but on my Ubuntu 12.04, realpath
>doesn't understand --relative-to.

>It works.  But that also uses a lot of bashism that will probably fail on
>other systems...

>I like the general approach though :)
---

Glad to hear that this is a good approach for you :)

So, this is my updated patch, it seems that the easiest way is to use the subst feature in make, which is done elsewhere here (and in the introspection makefile).

p.s. I do intend to change the MSVC project generation for the other GNOME projects that have them to use things similar to the ones we have here in this bug, to make things cleaner (and probably safer).

With blessings, thank you!
Comment 11 Behdad Esfahbod 2015-04-09 19:06:13 UTC
Looks good.  Thanks.  Not invoking the shell is excellent practice.
Comment 12 Fan, Chun-wei 2015-04-10 02:16:24 UTC
Hello Behdad,

(In reply to Behdad Esfahbod from comment #11)
> Looks good.  Thanks.  Not invoking the shell is excellent practice.

(From your e-mail)
>Curious: why $(empty)?  Why not just leaving it blank?

Thanks for the review and notes on $(empty), pushed the patch with this taken into account as 28df77e.  Will close this bug here.

With blessings, thank you!