I cannot force make use a more specific rule. I am working with version 3.81, which should use the first rule to which it applies , but this does not seem to work when a more specific rule has a dependency that needs to be built with another rule. Here is the main picture:
#rule for the dependency of the more specific rule %.bbl: %.tex *.bib <build the .bbl file> #more specific rule some_prefix%.pdf: some_prefix%.tex some_prefix%.bbl <build the .pdf> #general rule %.pdf: %.tex <build the .pdf>
So, I want make create a pdf file with a .bbl file if it matches some_prefix , otherwise use a more general rule. Unfortunately, if I do not remove the dependency on the .bbl file, the second rule will never be invoked.
It seems I can make it work by adding a hack to the general rule:
%.pdf: %.tex %.hack <make the pdf with a more general rule> %.hack: %.tex touch $@
This seems to work and the .hack files are deleted automatically, but as the name suggests, this is a terrible hack. There seems to be some better way to get a specific rule to be used.
How to force to use a more specific rule? Assuming this at first does not seem to help.
source share