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 644643 - build: make Makefile.plain work with Msys
build: make Makefile.plain work with Msys
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Windows
: Normal enhancement
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2011-03-13 14:33 UTC by Damien Lespiau
Modified: 2012-11-25 11:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make Makefile.plain work with Msys (2.15 KB, patch)
2011-03-13 14:33 UTC, Damien Lespiau
needs-work Details | Review
Alternative fix (1.12 KB, patch)
2011-12-31 13:12 UTC, Sam Thursfield
needs-work Details | Review
Use pwd -W on MSYS (1006 bytes, patch)
2011-12-31 13:43 UTC, Sam Thursfield
needs-work Details | Review
add Makefile.windows (4.31 KB, patch)
2012-10-04 00:09 UTC, Matthew Waters (ystreet00)
needs-work Details | Review
add Makefile.windows (3.27 KB, patch)
2012-11-06 13:37 UTC, Matthew Waters (ystreet00)
needs-work Details | Review
add Makefile.window (3.36 KB, patch)
2012-11-19 23:47 UTC, Matthew Waters (ystreet00)
committed Details | Review

Description Damien Lespiau 2011-03-13 14:33:37 UTC
Created attachment 183276 [details] [review]
make Makefile.plain work with Msys

Makefile.plain is not far from working on Windows with Msys and python
installed from python.org. It just needs:

- To provide python the "Windows version" of the path ie the one starting like
  "c:/", which just takes an extra argument to pwd,
- install-check.c can't be compiled without some work on windows, just provide
  a passthrough install-check script.
Comment 1 Damien Lespiau 2011-03-13 14:38:52 UTC
As with #644639, CC ssssam@gmail.com, he may have some more insight on this Windows/Msys patch (which is solved in his branch by having a separate Makefile).
Comment 2 Craig Keogh 2011-09-13 07:29:04 UTC
Comment on attachment 183276 [details] [review]
make Makefile.plain work with Msys

I do like the seperate Makefile for Windows idea. Keep an eye on bug 654555 which is proposing JHBuild always installed the same way no matter what software is installed (or what system you're on):
./autogen.sh
make
make install
Comment 3 Frederic Peters 2011-10-08 18:59:26 UTC
Damien, an unification of the build system has landed with bug 654555, could you check how it works with msys?
Comment 4 Fabio Durán Verdugo 2011-12-07 21:08:18 UTC
any news?
Comment 5 Sam Thursfield 2011-12-31 13:12:42 UTC
Created attachment 204379 [details] [review]
Alternative fix

This is tested with the new build system. It's basically the same. The pwd magic doesn't seem to be necessary any more.
Comment 6 Sam Thursfield 2011-12-31 13:43:33 UTC
Created attachment 204384 [details] [review]
Use pwd -W on MSYS

So the PWD fix definitely is still necessary
Comment 7 Craig Keogh 2012-01-02 21:56:19 UTC
I want a seperate Makefile for Windows.

Then to install JHBuild user does:
./autogen.sh
make
make install
Comment 8 Matthew Waters (ystreet00) 2012-10-04 00:09:02 UTC
Created attachment 225733 [details] [review]
add Makefile.windows

Here is a patch that creates a Makefile.windows to use for building on windows
Comment 9 Craig Keogh 2012-10-15 04:02:40 UTC
Review of attachment 225733 [details] [review]:

Thank you for the patch.

::: Makefile.windows
@@ +18,3 @@
+install-check: install-check.sh
+	@cp install-check.sh install-check
+	@chmod +x install-check 

This is installing install-check into the source tree. It should install to bindir

@@ +32,3 @@
+
+
+	@[ -f "$(HOME)/.jhbuildrc" ]||echo "Don't forget to create ~/.jhbuildrc"

This line should be removed. ~/.jhbuildrc is now ~/.config/jhbuildrc, and JHBuild works without a config file now.

@@ +36,3 @@
+#	 if ~/bin/jbuild exists, it is most likely an old version, and it will
+#	 not work; so rename it and copy the new version instead (symlinks aka
+#	 'ln -s' perform a copy on windows)

'perform a copy on windows' comment doesn't make sense. I don't see a copy here.

::: autogen.sh
@@ +148,3 @@
+# configure JHBuild to build and install without autotools on windows via a plain
+# Makefile. Sets up a Makefile.inc and copies Makefile.windows to Makefile
+configure_without_autotools_windows()

This function is very similar to configure_without_autotools (~45 lines in common, 2 lines different). Can design in a way to avoid copy-and-paste the 45 common lines?
Comment 10 Matthew Waters (ystreet00) 2012-11-06 13:37:20 UTC
Created attachment 228245 [details] [review]
add Makefile.windows

Here is an updated patch that fixes all of the mentioned issues

> @@ +36,3 @@
> +#     if ~/bin/jbuild exists, it is most likely an old version, and it will
> +#     not work; so rename it and copy the new version instead (symlinks aka
> +#     'ln -s' perform a copy on windows)
> 
> 'perform a copy on windows' comment doesn't make sense. I don't see a copy
> here.

well, Windows XP doesn't support symlinks, although Vista and up do.  I reverted the comment to the one found in Makefile.plain
Comment 11 Craig Keogh 2012-11-15 02:26:59 UTC
Review of attachment 228245 [details] [review]:

Thank you for the updated patch Matthew. Some very good work.

::: autogen.sh
@@ +140,2 @@
   if [ ! -f $srcdir/Makefile.plain ]; then
+    eval_gettext "Unable to read file \$makefile"; echo

The line:
  if [ ! -f $srcdir/Makefile.plain ]; then
should be:
  if [ ! -f $makefile ]; then
Comment 12 Matthew Waters (ystreet00) 2012-11-19 23:47:16 UTC
Created attachment 229422 [details] [review]
add Makefile.window

> ::: autogen.sh
> @@ +140,2 @@
>    if [ ! -f $srcdir/Makefile.plain ]; then
> +    eval_gettext "Unable to read file \$makefile"; echo
> 
> The line:
>   if [ ! -f $srcdir/Makefile.plain ]; then
> should be:
>   if [ ! -f $makefile ]; then

fixed
Comment 13 Craig Keogh 2012-11-25 11:13:39 UTC
Comment on attachment 229422 [details] [review]
add Makefile.window

Thank you for your work on this. Committed.
http://git.gnome.org/browse/jhbuild/commit/?id=65a9bb3340a31b312598e6aafff61a082fc7791d