makefile from cygwin to build with piper.exe chc08.exe command line?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

makefile from cygwin to build with piper.exe chc08.exe command line?

ソリューションへジャンプ
3,350件の閲覧回数
LTR
Contributor I
It has been a while for UNIX scripting but does anyone know how to correctly pass the double quote string from /bin/sh makefile to piper.exe chc08 correctly from with CYGWIN?
 
I want to be able to have a makefile like:
tools_dir = C:\Program Files\Freescale\CodeWarrior for HC08 V5.1
tools_mcu_header = $(tools_dir)\lib\hc08c\include
tools_mcu_device = $(tools_dir)\lib\hc08c\device\include
 
CC_flags = -F2 -Cs08 -Ms
 
code.o : code.c
    piper.exe chc08.exe -I"$(tools_mcu_header)" $(CC_flags)  ./../source/code.c
 
but when the make runs the quotes get stripped.
 
$make
piper.exe chc08.exe -I"C:\Program Files\Freescale\CodeWarrior for HC08 V5.1\lib\
hc08c\include\lib\hc08c\include" -F2 -Cs08 -Ms  ./../source/code.c
FATAL C50: Input file '-IC:\Program Files\Freescale\CodeWarrior for HC08 V5.1\li
b\hc08c\include\lib\hc08c\include' not found
*** command line: '"-IC:\Program Files\Freescale\CodeWarrior for HC08 V5.1\lib\h
c08c\include\lib\hc08c\include" -F2 -Cs08 -Ms ./../source/code.c' ***
HC08 Compiler: *** Error occurred while processing! ***
make: *** [fifo.o] Error 1
 
I have tried the escape \" before the quotes without success.  Anyone know how to pass this correctly?
 
Regards,
 
LR
 
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,565件の閲覧回数
LTR
Contributor I
Well... Yes and no...  I got it working by forcing the 8.3 DOS format for now...
Something like:
tools_dir = C:\Progra~1\Freesc~1\CodeWa~1.1  This does work but is not too pretty but there are no spaces. 
 
I need to get a tool chain going pretty quick so I am overlooking elegance at this point.  Cygwin does have a CYGPATH converter to 8.3 format which I will try so that later...
 
I did try the quotes in the assignment but the behavior did not change.
 
Regards,
 
LR

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,565件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
There has been this thread

http://forums.freescale.com/freescale/board/message?board.id=CW816COMM&message.id=2764&query.id=1861...


about this topic in the past.
The problemetic part is the sh.exe which does reformat the quotes around the complete option.

Apart from this I don't have the real solution to this issue :smileysad:.
One possible workaround could be to use environment variables set by the make (does gnu's make support this?) and use them in the compiler. That would bypass sh.exe.

Daniel
1,565件の閲覧回数
J2MEJediMaster
Specialist I
Have you tried embeddeing the quotes within your definition? That is:

tools_dir = "C:\Program Files\Freescale\CodeWarrior for HC08 V5.1"

That's just a scientific wild guess on my part.

Make has big issues with directories with blanks, which is why you're doing this. I finally had to resort to just writing DOS batch files, because it was so hard to control make's behavior. If you do get this to work, please let me know what you did.

---Tom
1,566件の閲覧回数
LTR
Contributor I
Well... Yes and no...  I got it working by forcing the 8.3 DOS format for now...
Something like:
tools_dir = C:\Progra~1\Freesc~1\CodeWa~1.1  This does work but is not too pretty but there are no spaces. 
 
I need to get a tool chain going pretty quick so I am overlooking elegance at this point.  Cygwin does have a CYGPATH converter to 8.3 format which I will try so that later...
 
I did try the quotes in the assignment but the behavior did not change.
 
Regards,
 
LR
0 件の賞賛
返信