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

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


Milan Mimica napsal(a):
Michal Molhanec wrote:
And somebody with working Cygwin should check the part about fix.sh (for me Cygwin make always stops with
makefile.vc:308: *** target pattern contains no `%'.  Stop. )

export ALLEGRO_USE_CYGWIN=1
That's what the thread was about originally :)

:-) ok, now it works
I'm attaching small fix.bat patch fixing some problems
I'm also attaching patch to makefile.vc which fixes some problem for MSVC 8 + automatically detects Cygwin and sets ALLEGRO_USE_CYGWIN

Btw something produces message
Invalid switch - "msvc".
(already the unpatched 4.2.1 so it's not fault of my patch)

Oh, we should mention that in the build docs.

other thing is that fix.sh no longer works. does it mean that cygwin users will have to use fix.bat?

Also Andrei Ellman wrote:
We might also want to remove the 'msvc' target from from fix.sh while we're at it.

--
Regards,
    Michal

ICQ# 175762750
--- fix.bat.old	2006-12-29 14:43:30.000000000 +0100
+++ fix.bat	2006-12-30 02:22:32.000000000 +0100
@@ -144,14 +144,15 @@
 goto realtail
 
 :skipconvert
-echo MSVCDir = %MSVCDir% >> makefile
+REM Don't put space before >> !
+echo MSVCDir = %MSVCDir%>> makefile
 goto realtail
 
 :tail
 
 REM msvc6 does not need this, msvc is fallback so we should do it anyway
 if [%1] == [msvc]    goto includemsvcdir
-if [%1] == [msvc6]   goto skipmsvcdir
+if [%1] == [msvc6]   goto skipconvert
 if [%1] == [msvc7]   goto includemsvcdir
 if [%1] == [msvc8]   goto includemsvcdir
 
--- makefile.vc.old	2006-12-29 14:43:30.000000000 +0100
+++ makefile.vc	2006-12-30 03:14:02.000000000 +0100
@@ -32,7 +32,8 @@
 
 PLATFORM_DIR = obj/msvc
 
-ifdef ALLEGRO_USE_CYGWIN
+ifeq ($(TERM), cygwin)
+   ALLEGRO_USE_CYGWIN=1
    UNIX_TOOLS = 1
    GCCFLAGS = -mno-cygwin
 endif
@@ -388,9 +389,14 @@
 # -------- link as a DLL --------
 
 ifdef EMBED_MANIFEST
+ifdef ALLEGRO_USE_CYGWIN
+   EMBEDMAN_BAT = misc/embedman.bat
+else
+   EMBEDMAN_BAT = misc\embedman.bat
+endif
 define MAKE_LIB
    $(RUNNER) $(MSVC_LINK) @ -nologo $(LFLAGS) -dll -def:lib/msvc/allegro.def -out:$(DLL_NAME) -implib:$(IMPLIB_NAME) $(OBJECTS) $(LIBRARIES)
-   misc\embedman.bat $(DLL_NAME) 2
+   $(EMBEDMAN_BAT) $(DLL_NAME) 2
 endef
 else
 define MAKE_LIB


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