[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The explanation of order-only prerequisites is not clear
From: |
ali hagigat |
Subject: |
Re: The explanation of order-only prerequisites is not clear |
Date: |
Sun, 12 Sep 2010 11:16:51 +0430 |
I have copied one line of the make manual:
-----------------------------------------------------------------------------
"Occasionally, however, you have a situation where you want to impose
a specific ordering on the rules to be invoked without forcing the
target to be updated if one of those rules is executed. In that case,
you want to define order-only prerequisites. "
------------------------------------------------------------------------------
Now Lets take a look at the following example:
target1: | di1
@echo "inside target1"
@touch target1
di1:
@echo "inside di1"
If target1 does not exist, even the order-only prerequisite, di1, will
force target1 to be updated!