Yes, thank you, so what you are saying, translated to my situation, is
Goal1 goal2: phony
<recipe for goal2>
This is still inefficient, because, if the user wants to make both goals: goal1
and goal2, the recipe will be attempted twice. I only want one attempt. I
want make to know goal1 will be made as a side effect of goal2.
Basically, we have everything working with goal2. But now, I want to add the
knowledge to make, that there is a file "goal1", which is made as a side effect
of goal2, and that make smoothly incorporate that new goal, without any
inefficiencies.
The simple solution:
goal1: goal2
is exactly perfect, exactly what I need.
Except... other implicit rule of the kind:
goal%: ...
...
mess everything up because they take precedence. I guess I want to complain
that the implicit rules can take precedence over an rule that redirects to
another target. I don't like that.
Is there a way around this?
Like I said, the best I can come up with is to artificially make up a recipe
for goal1, like this:
goal1: phony
$(MAKE) goal2
just so that I can avoid those implicit recipes to kick in. Very ugly.
-----Original Message-----
From: Eli Zaretskii [mailto:[email protected]]
If goal1 and goal2 have something common in their names, you can use
pattern rules. This is from the GNU Make manual:
This pattern rule has two targets:
%.tab.c %.tab.h: %.y
bison -d $<
_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make