[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [EXT] Re: suppress "target '*' given more than once in the same rule
From: |
Belliveau, Fran - 0666 - MITLL |
Subject: |
Re: [EXT] Re: suppress "target '*' given more than once in the same rule" |
Date: |
Wed, 26 Jun 2024 13:41:02 +0000 |
Perfect answer.
Thanks
Francis Belliveau
Consultant
Lincoln Laboratory, Massachusetts Institute of Technology
244 Wood Street
Lexington, MA 02421-6426
On 6/26/24, 09:39, "Renaud Pacalet" <renaud.pacalet@telecom-paris.fr> wrote:
On 6/25/24 18:03, Belliveau, Fran - 0666 - MITLL wrote:
> I have a setup where I use include directives to access makefile content
> used by multiple “make” situations throughout a large project.
>
> As I try to replace a bunch of (heavily simplified) things like:
>
> FOO_DIR?=fd
> BAH_DIR?=bd
> ####
> $(FOO_DIR)/foo: $(F_HDRS)
> mkdir -p $(FOO_DIR)
> genF $@
>
> $(BAH_DIR)/foo: $(B_HDRS)
> mkdir -p $(BAH_DIR)
> genB $@
>
> with a something like
>
> ####
> $(FOO_DIR) $(BAH_DIR):
> mkdir -p $@
>
> $(FOO_DIR)/foo: $(HDRS) | $(FOO_DIR)
> gen $@
>
> $(BAH_DIR)/bah: $(B_HDRS) | $(BAH_DIR)
> genB $@
>
> I run into “make complaints” when multiple directory variables actually point
> to the same directory.
> This may just be a warning, but it looks like an error to those who do not
> know what is going on.
>
> I am wondering if there is a way to suppress this with a directive of some
> sort?
> Is there a function call I might be able to make like $(unique $(FOO_DIR)
> $(BAH_DIR)): ?
$(sort $(FOO_DIR) $(BAH_DIR)); it sorts (in your case you don't care) and
removes duplicates.
>
>
> Francis Belliveau
> Consultant
> Lincoln Laboratory, Massachusetts Institute of Technology
> 244 Wood Street
> Lexington, MA 02421-6426
>
>
>
--
Renaud Pacalet
Télécom Paris
Campus SophiaTech
450 Route des Chappes, CS 50193
06904 Biot Sophia Antipolis cedex, FRANCE
Tel : +33 (0) 4 9300 8402
Web : http://www.telecom-paris.fr/ <http://www.telecom-paris.fr/>
smime.p7s
Description: S/MIME cryptographic signature