I am attempting to have a conditional part of my makefile that is
performed UNLESS one of 2 conditions is occuring. It used to be one
condition, and the code was :
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILES)
endif
But now I have a second make goal for which I do not want to include
(and force generation of) dependency files. I could find no
documentation of an OR function, but the online make manual showed a
complex condition of :
conditional-directive
text-if-one-is-true
else conditional-directive
text-if-true
else
text-if-false
endif
Now, I figured I could use 2 neqs with null entry for the do not do, but
I cannot get make to accept the syntax. When I do
ifeq ($(MAKECMDGOALS),clean)
else ifeq ($(MAKECMDGOALS),IDL)
else
-include $(DEPFILES)
endif
However, when I try this I get a 2 complaints. The first being
extraneous text after an else directive (the first else). The second is
only once else per conditional (the second else).
I am running make 3.80. Is the manual in error ?
I did get a variant to work by breaking the line after the first else
and adding a second endif (in effect, nesting a second conditional in
the else clause of the first conditional), but I would still prefer to
be able to do complex conditionals as implied by the manual.
Thanks,
Dale Pennington
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make