[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem Creating Directories
From: |
Paul Smith |
Subject: |
Re: Problem Creating Directories |
Date: |
Sun, 07 Oct 2018 09:07:43 -0400 |
On Sun, 2018-10-07 at 09:01 -0400, Paul Smith wrote:
> $(MAKE_DIR)/$$(MODULE): ; mkdir -p $@
>
> (note the extra "$" when referencing the MODULE variable)
Actually I'm mistaken here: there's no secondary expansion for targets.
You might be able to write this as:
$(MAKE_DIR)/%.mk: $(SRC_DIR)/%.m4 | $(MAKE_DIR)/$$(MODULE)/.; m4 $< $@
$(MAKE_DIR)/%/. : ; mkdir -p $@
but I'm not sure (untested).
Another option, obviously, is to simply put the mkdir inside the recipe
(that's how I'd personally do it):
$(MAKE_DIR)/%.mk: $(SRC_DIR)/%.m4
mkdir -p $(MAKE_DIR)/$(MODULE)
m4 $< $@
It may run extra instances of mkdir but I doubt it will be noticeable.