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/
OpenPGP_0xA55E9B3980CD0D02.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature