Re: [AD] Patch for makefile issue when compiling MSVC with Cygwin |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] Patch for makefile issue when compiling MSVC with Cygwin
- From: Michal Molhanec <molhanec@xxxxxxxxxx>
- Date: Fri, 29 Dec 2006 12:01:16 +0100
Milan Mimica napsal(a):
Michal Molhanec wrote:
To make msvcpaths default I see two solutions:
-- build msvchelp.c using MSVC - I have no idea why it isn't already
done this way
I like this one more.
yes, probably the least problematic
in that case, can you test the attached patch ?
--
Regards,
Michal
ICQ# 175762750
--- fix.bat.old Sat May 6 12:04:38 2006
+++ fix.bat Fri Dec 29 01:01:44 2006
@@ -9,18 +9,20 @@
:arg3
rem Test if third arg is ok.
-if [%3] == [--crlf] goto arg2
-if [%3] == [--quick] goto arg2
-if [%3] == [--msvcpaths] goto arg2
-if [%3] == [] goto arg2
+if [%3] == [--crlf] goto arg2
+if [%3] == [--quick] goto arg2
+if [%3] == [--msvcpaths] goto arg2
+if [%3] == [--nomsvcpaths] goto arg2
+if [%3] == [] goto arg2
goto help
:arg2
rem Test if second arg is ok.
-if [%2] == [--crlf] goto arg1
-if [%2] == [--quick] goto arg1
-if [%2] == [--msvcpaths] goto arg1
-if [%2] == [] goto arg1
+if [%2] == [--crlf] goto arg1
+if [%2] == [--quick] goto arg1
+if [%2] == [--msvcpaths] goto arg1
+if [%2] == [--nomsvcpaths] goto arg1
+if [%2] == [] goto arg1
goto help
:arg1
@@ -118,35 +120,34 @@
:help
echo.
-echo Usage: fix platform [--crlf] [--msvcpaths]
+echo Usage: fix platform [--crlf] [--nomsvcpaths]
echo.
echo Where platform is one of:
echo bcc32, djgpp, mingw, msvc6, msvc7, msvc8, icl, or watcom.
echo.
echo The --crlf parameter is used to turn on LF to CR/LF conversion.
-echo.
-echo Use the --msvcpaths parameter if your MSVCDir variable contains
-echo spaces (you can view content of that variable by typing
-echo echo %%MSVCDir%%
-echo on the command line). Remember that this will only work if you
-echo have MinGW gcc in your PATH.
-echo With MSVC 8 and higher the variable name is VCINSTALLDIR instead
-echo of MSVCDir.
+echo The --nomsvcpaths parameter is used to turn off special MS Visual C++
+echo path handling.
echo.
goto end
:convertmsvcdir
+if [%2] == [--nomsvcpaths] goto realtail
+if [%3] == [--nomsvcpaths] goto realtail
echo Converting MSVCDir path...
-gcc -mno-cygwin -s -o msvchelp.exe misc/msvchelp.c
+cl /nologo /w misc/msvchelp.c >NUL
msvchelp MSVCDir
del msvchelp.exe
+del msvchelp.obj
echo include makefile.helper >> makefile
goto realtail
:tail
-if [%3] == [--msvcpaths] goto convertmsvcdir
-if [%2] == [--msvcpaths] goto convertmsvcdir
+REM msvc6 does not need this, msvc is fallback so we should do it anyway
+if [%1] == [msvc] goto convertmsvcdir
+if [%1] == [msvc7] goto convertmsvcdir
+if [%1] == [msvc8] goto convertmsvcdir
:realtail
rem Generate last line of makefile and optionally convert CR/LF.