I stand to be corrected however, no.
Not a direct answer to your question but in my experience, the best way
is to approach such situations is to let Make figure out what depends
on what, should it make a particular target or not and to avoid `if'
and `define' as much as possible.
--
Bahman
On
The problem is that $(eval SUPPLIER_A2l := $(sort $(shell find
$(DIR_A2LGEN_SUPPLIER) -type f -name "*.a2l"))) runs before the directory was
created and the a2l files were copied to the directory. Since this ran before
the directory creation and copy of the a2l file SUPPLIER_A2L is always null
OK, it took me a while but I think I may have something relatively more
readable.
The idea is to let Make handle the prerequisites and the order of build
for you by using well laid out targets.
The challenge I was facing trying to understand your code was that
you'd condensed the original hierarc
On Sun, 2023-09-24 at 17:23 +, Ed L Wolf wrote:
>
> ifneq ($(wildcard $(DIR_SUPPLIER)),)
> ...
> > $(eval SUPPLIER_A2l := $(sort $(shell find $(DIR_A2LGEN_SUPPLIER) -
> > type f -name "*.a2l")))
> ...
> ifeq ($(SUPPLIER_A2l),"*.a2l")
>
Quickly skimming through your co
Here is the strip down version
$(DIR_A2LGEN_SETUP)/McData-setup.a2l:
@echo "A2L$@"
@find $(DIR_BSWPROJECT) -type f -name "*.a2l" | xargs -i cp {}
$(DIR_A2LGEN_SETUP)
ifneq ($(wildcard $(DIR_SUPPLIER)),)
@find $(DIR_SUPP