Re: [AD] Patch for makefile issue when compiling MSVC with Cygwin

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 19/12/06, Andrei Ellman <ae-a-alleg@xxxxxxxxxx> wrote:

+ifdef ALLEGRO_USE_CYGWIN
+
+# Note: Using ':=' instead of '=' to improve performance of parsing makefile.
+# ?: Is there a more elegant way of setting MSVCDIR_S? MSVCDIR_S := $(shell cygpath $(MSVCDIR_MSVCDIR)) does not seem to work.
+ifdef MSVCDIR
+   MSVCDIR_S := $(shell cygpath $$MSVCDIR)
+else
+ifdef MSVCDir
+   MSVCDIR_S := $(shell cygpath $$MSVCDir)
+endif
+endif
+
+   MSVCDIR_U = $(subst \,/,$(MSVCDIR_S))
+   MSVCDIR_D = $(subst /,\,$(MSVCDIR_S))
+else
+  MSVCDIR_U = $(subst \,/,$(MSVCDIR_MSVCDIR))
+   MSVCDIR_D = $(subst /,\,$(MSVCDIR_MSVCDIR))
+endif  # ALLEGRO_USE_CYGWIN

First, there is also VCINSTALLDIR to check.
Second, this isn't working for me. The following works, can you also try it out?

ifdef ALLEGRO_USE_CYGWIN

# Note: Using ':=' instead of '=' to improve performance of parsing
makefile.
# ?: Is there a more elegant way of setting MSVCDIR_S? MSVCDIR_S :=
$(shell cygpath $(MSVCDIR_MSVCDIR)) does not seem to work.
ifdef MSVCDIR
  MSVCDIR_S := $(shell cygpath -s -w "$(MSVCDIR)")
endif
ifdef MSVCDir
  MSVCDIR_S := $(shell cygpath -s -w "$(MSVCDir)")
endif
ifdef VCINSTALLDIR
  MSVCDIR_S := $(shell cygpath -s -w "$(VCINSTALLDIR)")
endif
  MSVCDIR_U = $(subst \,/,$(MSVCDIR_S))
  MSVCDIR_D = $(subst /,\,$(MSVCDIR_D))
else
  MSVCDIR_U = $(subst \,/,$(MSVCDIR_MSVCDIR))
  MSVCDIR_D = $(subst /,\,$(MSVCDIR_MSVCDIR))
endif  # ALLEGRO_USE_CYGWIN


But it would be really nice if we could pass a makefile variable there.


--
Milan Mimica
http://sparklet.sf.net




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/