02.05.2013 Views

Description - Mks.com

Description - Mks.com

Description - Mks.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

specified. When .POSIX is specified, the following steps describe the search algorithm for suffix<br />

rules:<br />

1. Extract the suffix from the target. If that target has no suffix, go to step 6.<br />

2. Is it in the .SUFFIXES list? If not, then quit the search.<br />

3. If it is in the .SUFFIXES list, look for a double suffix rule that matches the target suffix.<br />

4. If you find one, then extract the base name of the file, add on the second suffix and see if<br />

the resulting file exists. If it does not, then keep searching the double suffix rules. If it does<br />

exist, then use the recipe for this rule.<br />

5. If no successful match is made, then the inference has failed.<br />

6. If the target did not have a suffix, then check the single suffix rules in the order that the<br />

suffixes are specified in the .SUFFIXES target.<br />

7. For each single suffix rule, add the suffix to the target name and see if the resulting file<br />

name exists.<br />

8. If the file exists, then execute the recipe associated with that suffix rule. If the file does not<br />

exist, continue trying the rest of the single suffix rules.<br />

9. If no successful match is made, then the inference has failed.<br />

When the .POSIX special target is not specified, make handles suffix rules in the same manner as<br />

traditional implementations of make. The following steps describe the search algorithm for suffix<br />

rules in this situation.<br />

1. Extract the suffix from the target. If that target has no suffix, go to step 8.<br />

2. Is it in the .SUFFIXES list? If not, then quit the search.<br />

3. If it is in the .SUFFIXES list, look for a double suffix rule that matches the target suffix.<br />

4. If you find one, then extract the base name of the file, add on the second suffix and see if<br />

the resulting file exists. If it does, go to step 7. If not, continue with step 5.<br />

5. Is there an inference rule for the resulting file? If yes, execute the recipe associated with that<br />

rule (that should describe how to make the file exist) and go to step 7.<br />

6. Search for the next double suffix rule that matches the target suffix and return to step 4. If<br />

the double suffix rules are exhausted then the inference has failed.<br />

7. Use the recipe for the target rule.<br />

8. If the target did not have a suffix, then check the single suffix rules in the order that the<br />

suffixes are specified in the .SUFFIXES target.<br />

9. For each single suffix rule, add the suffix to the target name and see if the resulting file<br />

name exists.<br />

10. If the file exists, then execute the recipe associated with that suffix rule. If the file does not<br />

exist, continue trying the rest of the single suffix rules.<br />

11. If no successful match is made, then the inference has failed.<br />

MKS Make also provides a special feature in the suffix rule mechanism for archive library handling,<br />

useful mainly for <strong>com</strong>patibility with System V Make. If you specify a suffix rule of the form<br />

.suf.a:<br />

419 of 457

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!