help-make
[Top][All Lists]
Advanced

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

Re: How to handle ':' in filenames?


From: Peng Yu
Subject: Re: How to handle ':' in filenames?
Date: Thu, 17 Mar 2011 16:42:29 -0500

On Thu, Mar 17, 2011 at 1:08 PM, Lane Schwartz <address@hidden> wrote:
> On Wed, Mar 16, 2011 at 10:29 PM, Peng Yu <address@hidden> wrote:
>>
>> Hi,
>>
>> I'm trying to handle filenames with ':' in it. But neither of the
>> following two ways work. Could anybody let me know if there is a way
>> to hand filenames with ':' using make?
>>
>> .PHONY: all
>>
>> colon:=:
>> foo:=abc_xyz.txt
>> bar:=$(subst _,$(colon),$(foo))
>>
>> all: $(bar)
>>
>> $(bar):
>>        touch $@
>>
>> #Neither the above nor the below works.
>> #all: abc$(colon)xyz.txt
>> #
>> #abc$(colon)xyz.txt:
>> #       touch $@
>
>
> Do you have existing files (which have colons in their names) that you wish
> to list as dependencies?
>
> Or do you wish to create new files which should have colons in their names?

The example that I show is only for creating files with colons. But I
want to handle both cases.

-- 
Regards,
Peng



reply via email to

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