bug-make
[Top][All Lists]
Advanced

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

Re: Target-specific variable in subdirectory problem


From: Benjamin Cama
Subject: Re: Target-specific variable in subdirectory problem
Date: Thu, 03 Aug 2017 17:27:17 +0200

Le jeudi 03 août 2017 à 15:06 +0000, Edward Welbourne a écrit :
> Benjamin Cama (3 August 2017 17:00)
> > Well, I tried:
> >
> >        SUBDIR = $(dir $@)
> >        $(SUBDIR)/target-%:
> >          …
> >
> > But it doesn't work. But without a slash (which is already present at
> > the end of $(SUBDIR)), it actually works!:
> >
> >        SUBDIR = $(dir $@)
> >        $(SUBDIR)target-%:
> >          …
> >
> > Is this a bug?
> 
> No: thing/target-suffix and thing//target-suffix are different names.
> They may be functionally equivalent, but make just sees different
> strings, one with a doubled-slash, the other with just one slash.

Well, the thing is that passing target names to make with any number of
slashes normalize it to one, so I tended to think that the definition
followed the same normalization. Thanks for the explanation, then.

-- 
Benjamin Cama - Tél : 258




reply via email to

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