make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

\ or / in make file


From: ma
Subject: \ or / in make file
Date: Mon, 10 Jul 2006 23:51:56 +0100

Hello,

    I have a system that built makefiles for some generated code 
automatically. The makefiles are generated automatically but I have some 
control over how they can be built.

In the generated makefile  there is a variable that tells where is the 
target directory for generating lib and obj files. I have a very short 
sample make file here that shows the structure of generated makefile:



BLD=c:\test\


obj= $(BLD)a.obj $(BLD)b.obj $(BLD)c.obj



out: $(obj) main.obj
 @echo linking
 $(LD) $(obj) main.obj




%.obj : %.c
 @echo compiling 1 : $< target= $@
 $(CC)  $(CFLAGS) $<




$(BLD)%.obj : a/%.c
 @echo compiling 2: $< target= $@
 $(CC)  $(CFLAGS) $<
 copy $(@F) $(@D)



$(BLD)%.obj : b/%.c
 @echo compiling 3: $< target= $@
 $(CC)  $(CFLAGS) $<
 copy $(@F) $(@D)



$(BLD)%.obj : c/%.c
 @echo compiling 4: $< target= $@
#$(CC)  $(CFLAGS) $< -fr=$






I don't have any control on the value of BLD. If the BLD has path using \ as 
the path separator such as (c:\test\)the system doesn't work but if this 
variable was created using / as path separator such as (c:/test/), make file 
works well.

As I mentioned I don't have any control on how BLD is set but I have fairly 
control on some other items. How can change the make file that it works well 
with \ as path separator?



Kind regards







reply via email to

[Prev in Thread] Current Thread [Next in Thread]