[Pixman] [PATCH] Allow building on Windows with cmd.exe

Andrea Canciani ranma42 at gmail.com
Wed Dec 23 03:05:25 PST 2015


On Tue, Dec 22, 2015 at 2:19 PM, Oded Gabbay <oded.gabbay at gmail.com> wrote:

> On Thu, Jun 4, 2015 at 12:02 PM, Andrea Canciani <ranma42 at gmail.com>
> wrote:
> > The patch does not regress the mingw-based build (basically that used in
> > http://cairographics.org/end_to_end_build_for_win32/ )
> > I did not manage to get the build working on the cmd.exe shell. Do you
> have
> > any instructions (or possibly indications about what is the correct
> > environment) for that?
> >
> > AFAICT the change still relies on a Unix-like make command.
> > A bigger (but possibly even more interesting) change would be an
> NMAKE-based
> > build, so that the command-line tools available in Visual Studio are
> > sufficient for building the whole project.
> >
> > Andrea
> >
>
> Hi Andrea,
>
> I know it has been almost 6 months since you last looked at this
> patch, but I would like to ask if you can give it an r-b and then I
> will push it to master.
>

Actually, this is a good time for me to work on pixman, as I have some more
free time :)


> If not, what needs to be done to give it an r-b ?
>

The main thing blocking me from an r-b tag originally was that I had been
unable to get it working.
I set up an environment to test it and found that it mostly behaves as
intended, with the main glitch being that the "clean" target can spit out
undesired error logs.

I pushed a branch which is based on Simon's patch here:
http://cgit.freedesktop.org/~ranma42/pixman/log/?h=win32-build

The commits include:
 - cleanup of the win32 build system (mostly unrelated to the original
patch)
   ea8a070 build: Remove use of BUILT_SOURCES from Makefile.win32
   8989759 build: Avoid phony `pixman` target in test/Makefile.win32
 - shell-generic compatibility
   db72f26 build: Do not use `mkdir -p` on Windows
 - cmd.exe compatibility
   6223be5 build: Use `del` instead of `rm` on `cmd.exe` shells

The last commit is based on the original patch, with some minor differences
to avoid path separator handling (instead I changed the current directory)
and to avoid error messages from `del` (when it finds no file to delete, it
logs a warning that apparently cannot be silenced by any of the flags).

While doing this I discovered that on Win32 fence-image-self-test and
cover-test are currently failing (regardless of these patches and
apparently also with any combination of MMX, SSE2, SSSE3).
I will try to investigate ASAP.

I believe that the first two commits should be "obviously" ok, while the
other two are not as trivial.
The whole patchset has been tested on Win32, both in an MSYS environment
and on cmd.exe (in both cases, using GNU make).

Andrea

PS: it looks like pixman has adopted Reviewed-by, Signed-off-by, etc.
I assume that the first three patches should be marked signed off by me,
while I am unsure about the tagging for the last patch (I guess it should
be credited to Simon).


Unfortunately, I don't have a Windows machine to check this.
>
> Thanks,
>
>         Oded
>
> >
> > On Mon, Jun 1, 2015 at 8:44 AM, Andrea Canciani <ranma42 at gmail.com>
> wrote:
> >>
> >> The ping was good and the changes make sense. Currently I am replying
> from
> >> the phone and I will not have access to my computer until the 3rd, but
> I am
> >> flagging this mail so that I will test and review the patch asap.
> >>
> >> Sorry for the delay
> >> Andrea
> >>
> >> On Jun 1, 2015 8:09 AM, "Siarhei Siamashka" <
> siarhei.siamashka at gmail.com>
> >> wrote:
> >>>
> >>> On Wed, 22 Apr 2015 04:01:31 +0200
> >>> Simon Richter <Simon.Richter at hogyros.de> wrote:
> >>>
> >>> > This finds out whether the standard shell for make is cmd.exe, and
> >>> > adjusts
> >>> > the build process accordingly.
> >>> > ---
> >>> >  Makefile.win32.common | 14 ++++++++++++--
> >>> >  1 file changed, 12 insertions(+), 2 deletions(-)
> >>>
> >>> Thanks for the patch.
> >>>
> >>> But it is a bit difficult for non-Windows folks to see if
> >>> it makes any sense or not. So it would be best if some other
> >>> Windows user could review and confirm that it works.
> >>>
> >>> I have added Andrea Canciani (the author of the win32 makefiles)
> >>> to CC.
> >>>
> >>> > diff --git a/Makefile.win32.common b/Makefile.win32.common
> >>> > index 777f94c..335886f 100644
> >>> > --- a/Makefile.win32.common
> >>> > +++ b/Makefile.win32.common
> >>> > @@ -1,5 +1,15 @@
> >>> >  LIBRARY = pixman-1
> >>> >
> >>> > +ifeq ($(shell echo ""),)
> >>> > +# POSIX style shell
> >>> > +mkdir_p = mkdir -p $1
> >>> > +rm = $(RM) $1
> >>> > +else
> >>> > +# DOS/Windows style shell
> >>> > +mkdir_p = if not exist $(subst /,\,$1) md $(subst /,\,$1)
> >>> > +rm = del $(subst /,\,$1)
> >>> > +endif
> >>> > +
> >>> >  CC = cl
> >>> >  LD = link
> >>> >  AR = lib
> >>> > @@ -47,10 +57,10 @@ endif
> >>> >
> >>> >
> >>> >  $(CFG_VAR)/%.obj: %.c $(libpixman_headers)
> >>> > -     @mkdir -p $(CFG_VAR)
> >>> > +     @$(call mkdir_p,$(@D))
> >>> >       @$(CC) -c $(PIXMAN_CFLAGS) -Fo"$@" $<
> >>> >
> >>> >  clean: inform
> >>> > -     @$(RM) $(CFG_VAR)/*.{exe,ilk,lib,obj,pdb} $(BUILT_SOURCES) ||
> >>> > exit 0
> >>> > +     @-$(call rm,$(CFG_VAR)/*.exe $(CFG_VAR)/*.ilk $(CFG_VAR)/*.lib
> >>> > $(CFG_VAR)/*.obj $(CFG_VAR)/*.pdb} $(BUILT_SOURCES))
> >>> >
> >>> >  .PHONY: inform clean
> >>>
> >>>
> >>>
> >>> --
> >>> Best regards,
> >>> Siarhei Siamashka
> >
> >
> >
> > _______________________________________________
> > Pixman mailing list
> > Pixman at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/pixman
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pixman/attachments/20151223/1ccbacc3/attachment-0001.html>


More information about the Pixman mailing list