[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:00:45 +0200 |
Le jeudi 03 août 2017 à 14:59 +0200, Benjamin Cama a écrit :
> To further enhance my understanding of the “right” usage of Makefiles,
> would you advise me to explicitly specify the subdirectory in the
> target
> definition? Because I feel that counting on pattern rules to match in
> subdirectory is kind of hackish, now. Like:
>
> $(SUBDIR)/target-%:
> …
>
> And in my particular case, I actually know the $(SUBDIR), but would it
> be right then to call make with:
>
> make SUBDIR=foo foo/target-1234
>
> ? It looks redundant to me.
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?
--
Benjamin Cama - Tél : 258
- Re: Target-specific variable in subdirectory problem, (continued)
- Re: Target-specific variable in subdirectory problem, Paul Smith, 2017/08/02
- Re: Target-specific variable in subdirectory problem, Sven C. Dack, 2017/08/02
- Re: Target-specific variable in subdirectory problem, Kyle Rose, 2017/08/02
- Re: Target-specific variable in subdirectory problem, Paul Smith, 2017/08/02
- Re: Target-specific variable in subdirectory problem, Sven C. Dack, 2017/08/02
- Re: Target-specific variable in subdirectory problem, Henrik Carlqvist, 2017/08/02
Re: Target-specific variable in subdirectory problem, Paul Smith, 2017/08/02
Re: Target-specific variable in subdirectory problem,
Benjamin Cama <=
Message not availableRe: Target-specific variable in subdirectory problem, Benjamin Cama, 2017/08/03
Targets directory name concatenation strangeness, Benjamin Cama, 2017/08/03
RE: Targets directory name concatenation strangeness, Martin Dorey, 2017/08/03
Re: Targets directory name concatenation strangeness, Benjamin Cama, 2017/08/03
Re: Targets directory name concatenation strangeness, Kyle Rose, 2017/08/03
Fwd: Re: Target-specific variable in subdirectory problem, Sven C. Dack, 2017/08/03