In a makefile, can I call a rule from another rule?
Similar to:
rule1: echo \"bye\" rule2: date rule3: @echo \"hello\"
Makefiles are not procedural; "rules" are not like functions. That said, you can specify that one rule is a prerequisite of another:
rule1: @echo "Rule 1" rule2: rule1 @echo "Rule 2"
If you do make rule2, you should see:
make rule2
Rule 1 Rule 2