mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] [PATCH] Windows build + check target


From: Volker Grabsch
Subject: Re: [Mingw-cross-env-list] [PATCH] Windows build + check target
Date: Thu, 18 Nov 2010 04:09:29 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

M. Gerhardy <address@hidden> schrieb:
> I had to make some changes on the
> main makefile for getting it to work. I'm sorry that i'm sending a
> full file, and not a patch, but this windows machine does not have
> mercurial, nor diff nor anything else that could have created a patch.
[...]
> And again sorry for not sending a patch file - i hope you will forgive
> me and some parts might be useful for others (if not all - let's
> discuss it)  ;)

I spent half an hour just to distangle your individual changes.
For reference, the resulting patches are attached.

I'm pretty sure that you would have had a lot less work creating
those patches in the first place than me doing that afterwards.

For instance, just take copy of the file after each major change.
Then, simply run diff on successive copies.

> The problem in the makefile was that dead end symlinks aren't working
> on windows. the file a symlink points to must already exist. I also
> had to change the log file target from the symlink to the real file -
> somehow the symlinks aren't working for mingw - but i wanted to make
> sure that the logs are not getting overwritten each time - so i write
> to the timestamped directory and not to the symlink.

I isolated those changes as "1-msys-portability.patch".

However, I implemented a slightly different approach, avoiding
one unnecessary "touch" command and creating still relative
symbolic links rather than absolute symbolic links:

    http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/ec91ef1082ef

I also used the "-f" option of "ln" which makes the "rm" commands
unnecessary:

    http://hg.savannah.gnu.org/hgweb/mingw-cross-env/rev/d140b7d8b96e

It would be great if you could check whether this works under
MSYS as expected.

> Oh. before i forget - i've added a Q variable that can be overridden
> to see the executed commands via "make Q=" it was for debugging
> purposes, but maybe you will find it useful.

I isolated those changes as "3-allow-to-show-all-executed-commands.patch".

I don't think it is a good idea to introduce that generally, as
this distracts when reading though the Makefile, and debugging
that part of the Makefile is a very uncommon activity which might
never needed to be repeated, as this works for any Unix and now
for MSYS, too.

Also note that there's the option "make -n" which serves a similar
purpose, although it just shows all commands (including the ones
marked with "@") without actually executing them.

> This makefile also includes the check target - but not with --help but
> still with which (but feel free to change it to whatever you want,
> it's just one line)

I isolated those changes as "2-check-prog.patch".

I think that "make check" is a good idea, although it should
be named differently, because "make check" has usually another
meaning (compiling an running a full test suite). Maybe
"make check-requirements" or "make check-req" would be better
names.

Also, the implementation should be simplified by

1) using a variable to list all tools, rather than having
   one separate command for each tool, or

   1b) running an explicit command (no macros) for each tool,

and

2) using "--help" or similar where appropriate, instead of "which".

Feel free to propose an improved patch. Or, I'll have
a deeper look myself when I find some time to do that.


Greets,
Volker

-- 
Volker Grabsch
---<<(())>>---

Attachment: 1-msys-portability.patch
Description: Text Data

Attachment: 2-check-prog.patch
Description: Text Data

Attachment: 3-allow-to-show-all-executed-commands.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]