Alejandro
Alejandro

Reputation: 1099

Makefiles. multiple rules match a target

I am using the gnu make and I have the same problem reported in when multiple pattern rules match a target. Basically two rules, a generic one, and a more specific one, match the same target but the more generic one gets executed!!. I would like the more specific one to be executed ONLY. The answer given on the above thread is basically to upgrade to gnu make 3.82. I have version 3.81 and it is the one found very commonly with many Linux distributions.

Is there a fix for this problem that would work with gnu make version 3.81?

Thank you in advance.

Upvotes: 1

Views: 2127

Answers (1)

Beta
Beta

Reputation: 99172

Put the specific rule above the generic one.

Upvotes: 1

Related Questions