When I give GHC an include path with embedded spaces and protected by double
quotes, GHC doesn't reprotect with quotes before passing on to gcc. Example
below.

        - Conal

bash$ ghc -v  -fglasgow-exts -concurrent -recomp -cpp
-i/usr/fptools/src/win32:/usr/fptools/green-card/lib/ghc
-i/usr/fptools/green-card/lib/ghc -I"d:/Program Files/Wintab SDK/include"
-hisuf mr_hi -osuf o -prof -auto-all -H10M -fglasgow-exts -fno-prune-tydecls
-concurrent -optc-freg-struct-return -I../../SpriteLib -I.. -optc-Wp,-lang-c
-c HSpriteLib.hs -o HSpriteLib.mr_o -ohi HSpriteLib.mr_hi
The Glorious Glasgow Haskell Compilation System, version 2.10, patchlevel 0
Found OPTIONS -#include <windows.h> in HSpriteLib.hs
Found OPTIONS -#include "errors.h" in HSpriteLib.hs
Found OPTIONS -#include "SpriteLib.h" in HSpriteLib.hs
Found OPTIONS -#include "VBlankHandler.h" in HSpriteLib.hs
Found OPTIONS -#include "Behavior.h" in HSpriteLib.hs
Found OPTIONS -#include "DXSubst.h" in HSpriteLib.hs
Found OPTIONS -#include "ddhelp.h" in HSpriteLib.hs
Found OPTIONS -#include "Sprite.h" in HSpriteLib.hs
Found OPTIONS -#include "SpriteEngine.h" in HSpriteLib.hs
Found OPTIONS -#include <wintab.h> in HSpriteLib.hs
Found OPTIONS -#include "SimpleTablet.h" in HSpriteLib.hs

Effective command line: -#include <windows.h> -#include "errors.h" -#include
"SpriteLib.h" -#include "VBlankHandler.h" -#include "Behavior.h" -#include
"DXSubst.h" -#include "ddhelp.h" -#include "Sprite.h" -#include
"SpriteEngine.h" -#include <wintab.h> -#include "SimpleTablet.h" -v
-fglasgow-exts -concurrent -recomp -cpp
-i/usr/fptools/src/win32:/usr/fptools/green-card/lib/ghc
-i/usr/fptools/green-card/lib/ghc -Id:/Program Files/Wintab SDK/include
-hisuf mr_hi -osuf o -prof -auto-all -H10M -fglasgow-exts -fno-prune-tydecls
-concurrent -optc-freg-struct-return -I../../SpriteLib -I.. -optc-Wp,-lang-c
-c -o HSpriteLib.mr_o -ohi HSpriteLib.mr_hi

Haskellised C pre-processor:
        echo '{-# LINE 1 "HSpriteLib.hs" -}' > ./ghc1037.cpp &&
/usr/fptools/lib/i386-unknown-cygwin32/ghc-2.10/hscpp -v
'-D__CONCURRENT_HASKELL__' '-DPROFILING' -D__HASKELL1__=4
-D__GLASGOW_HASKELL__=210 -I. -Id:/Program Files/Wintab SDK/include
-I../../SpriteLib -I..
-I/usr/fptools/lib/i386-unknown-cygwin32/ghc-2.10/includes
-I/usr/fptools/lib/i386-unknown-cygwin32/ghc-2.10/includes HSpriteLib.hs >>
./ghc1037.cpp
0.00user 0.00system 0:00.14elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+0minor)pagefaults 0swaps
hscpp:CPP invoked:
C:/gnuwin32/b18/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-97040
4/cpp -traditional -D__CONCURRENT_HASKELL__ -DPROFILING -D__HASKELL1__=4
-D__GLASGOW_HASKELL__=210 -I. -Id:/Program Files/Wintab SDK/include
-I../../SpriteLib -I..
-I/usr/fptools/lib/i386-unknown-cygwin32/ghc-2.10/includes
-I/usr/fptools/lib/i386-unknown-cygwin32/ghc-2.10/includes HSpriteLib.hs
cpp: Usage:
/gnuwin32/b18/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-970404/
cpp [switches] input output
deleting... ./ghc1037.cpp

rm -f ./ghc1037*
bash$

Reply via email to