- Oct 11, 1999
- 7,804
- 1
- 0
I'm trying to perform operations based on specific files within a rule.
So essentially if '$<' = file1.c, I want to do something to it. It is only for a small set of files within the overall set that gets compiled by that rule.
I was reading the GNU Make docs and found the following:
http://www.gnu.org/software/au...Reading-Makefiles.html
So how would I go about using "shell conditional syntax" within the rule? Any examples?
$(if .....) didn't work for me.
Thanks
So essentially if '$<' = file1.c, I want to do something to it. It is only for a small set of files within the overall set that gets compiled by that rule.
I was reading the GNU Make docs and found the following:
http://www.gnu.org/software/au...Reading-Makefiles.html
Of course this means that automatic variables cannot be used in conditional statements, as automatic variables are not set until the command script for that rule is invoked. If you need to use automatic variables in a conditional you must use shell conditional syntax, in your command script proper, for these tests, not make conditionals.
So how would I go about using "shell conditional syntax" within the rule? Any examples?
$(if .....) didn't work for me.
Thanks