chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Re: Chicken fails to build on Windows (mingw)


From: Fadi Moukayed
Subject: Re: [Chicken-users] Re: Chicken fails to build on Windows (mingw)
Date: Wed, 26 Aug 2009 20:19:43 +0200

Hi Felix,

> I'm not sure about the change to SEP - I don't really understand
> the nested subst expression.

Sorry about that, I meant to write $(subst /,$(SEP),$(PREFIX)) but I
forgot to change that before uploading. This should not affect any
other platform since it's inside an #ifdef.

The SEP variable in Makefile.mingw should be changed to $(strip \) or
$(subst ,,\) - this is the only way to get a single '\' (since GNU
make interprets it as a line continuation and it can't be escaped)

The following patch fixes these issues, and also adds chicken-setup
and libchickengui.a to the uninstall target. This should completely
fix any remaining problems with the makefiles on mingw.

Regards,
Fadi.


--- old\Makefile.mingw  Wed Aug 26 17:43:45 2009
+++ Makefile.mingw      Wed Aug 26 19:07:13 2009
@@ -25,7 +25,7 @@
 # POSSIBILITY OF SUCH DAMAGE.


-SEP = \\
+SEP = $(strip \)
 SRCDIR =.$(SEP)

 # platform configuration
--- old\defaults.make   Wed Aug 26 17:43:45 2009
+++ defaults.make       Wed Aug 26 18:46:04 2009
@@ -57,7 +57,7 @@
 EGGDIR = $(CHICKENLIBDIR)/$(BINARYVERSION)

 ifdef WINDOWS_SHELL
-SPREFIX = $(subst /,\\,$(PREFIX))
+SPREFIX = $(subst /,$(SEP),$(PREFIX))
 IBINDIR = $(SPREFIX)$(SEP)bin
 ILIBDIR = $(SPREFIX)$(SEP)lib
 ISHAREDIR = $(SPREFIX)$(SEP)share
--- old\rules.make      Wed Aug 26 17:43:46 2009
+++ rules.make  Wed Aug 26 19:13:28 2009
@@ -995,9 +995,11 @@
          $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
          $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_STATUS_PROGRAM)$(EXE) \
          $(DESTDIR)$(IBINDIR)$(SEP)$(CSC_PROGRAM)$(EXE) \
-         $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_BUG_PROGRAM)$(EXE)
+         $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_BUG_PROGRAM)$(EXE) \
+         $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_SETUP_PROGRAM)$(EXE)
        $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS)
$(DESTDIR)$(ILIBDIR)$(SEP)libchicken$(A)
-       $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS)
$(DESTDIR)$(ILIBDIR)$(SEP)libuchicken$(A)
+       $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS)
$(DESTDIR)$(ILIBDIR)$(SEP)libuchicken$(A)
+       $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS)
$(DESTDIR)$(ILIBDIR)$(SEP)libchickengui$(A)
        $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS)
$(DESTDIR)$(ILIBDIR)$(SEP)libchicken$(SO)
        $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS)
$(DESTDIR)$(ILIBDIR)$(SEP)libuchicken$(SO)
 ifdef USES_SONAME



2009/8/26 felix winkelmann <address@hidden>
>
> On Wed, Aug 26, 2009 at 12:34 AM, Fadi Moukayed<address@hidden> wrote:
> >
> > This is probably because Windows' del command doesn't like the duplicated
> > backslash / forward slash in the middle of the path. xcopy seems to be ok
> > with it for some reason though. Fortunately, make install/uninstall work
> > fine after doing some minor modifications to the makefiles - like replacing
> > all the unixish path separators in rules.make with $(SEP) (ugly, I know).
>
> Thanks, Fadi! I've applied most of the patch and could build and install
> it fine. I'm not sure about the change to SEP - I don't really understand
> the nested subst expression. The problem is that any change to defaults.make
> and rules.make has to be tested with all platforms, so I try to be
> careful modifying things there.
>
> > I don't know whether this is useful, but I pastebin'd a diff containing the
> > changes I made to hack(fix) the install/uninstall process here:
> > http://pastebin.com/m51e3001f - I didn't put much effort into it though; I
> > just hacked around the various problems until it worked :d
> >
>
> That's pretty good. Thanks, once again.
>
>
> cheers,
> felix




reply via email to

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