help-make
[Top][All Lists]
Advanced

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

colon in prerequisites?!


From: Warlich, Christof
Subject: colon in prerequisites?!
Date: Fri, 19 Aug 2011 10:50:04 +0200

Hi,

i have to port a build to CygWin, and I need to use a few windows tools in my 
reciepes that don't
understand absolute Cygwin paths (i.e. something like /cygdrive/d/myifle or 
/home/christof/myfile).
Fortunately, CygWin offers the cygpath tool, which converts pathes into a more 
windowish style:

$ cygpath -m /cygdrive/d/myifle
D:/myfile
$ cygpath -m /home/christof/myfile
C:/cygwin/home/christof/myfile

My windows tools work well with these converted paths, but when I try something 
like this in my
Makefile:

# assuming we already have a file called "source"
target: $(shell cygpath -m $(abspath source))
    echo $<

I get the following error message:

Makefile:2: *** target pattern contains no `%'.  Stop.

Obviously, the problem comes from the colon that "cygpath -m" puts into the 
prerequisite. Is there
any way to make this work? The obvious solution:

# assuming we already have a file called "source"
target: $(abspath source)
    echo $(shell cygpath -m $<)

is not an option, as my Makefile is a generic build framework, where the 
reciepes are configuration
input from my users, and I don't want to force them to do the conversion for 
each reciepe that they
may want to use.

Thanks for any ideas,

Chris





reply via email to

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