Dennis Jensen
Dabbler
- Joined
- May 26, 2016
- Messages
- 37
Okay been digging through the various documentation for FreeNAS, FreeBSD, and GNU Make and I cannot find specific documentation that fully covers the ".if" statement especially in conjunction with the "&&" operator. This .if appears to be either an addition to "make" by FreeBSD and/or FreeNAS as there seems to be no reference to this in GNU Make whatsoever and I have found minimal references to it in both FreeBSD and FreeNAS -- the key word here being "minimal" -- My current question (which could probably be answered by full documentation covering this ".if" statement but that I have not found and I am not sure it even exists -- so the specific question is as follows:
In the FreeNAS 9.10 Build (and presumably earlier versions as well) there is the following line:
.if !make(remote) && !make(sync) && !make(bootstrap-pkgs)
In most of the programming languages that I have dealt with (which are based mostly off of C to one degree or another) would execute this from left to right and sometimes quit executing if one of the conditions proved to be false (but not always). However -- in examining the components of this if -- it does not seem to make any sense unless I execute this from right to left -- as make(remote) is dependent on make(sync) and make(sync) is dependent on make(bootstrap-pkgs) thus strongly implying that for this if to work properly and efficiently the order of operations would be:
1) make(bootstrap-pkgs)
2) if (1) is successful then make(sync)
3) if (2) is successful then make(remote)
4) if (3) is successful then this if is successful
So does this .if && statement combination execute from right to left as it seems or is there something else going on here that I am not fully understanding??
Or even better is there full documentation on how the .if statement works??
In the FreeNAS 9.10 Build (and presumably earlier versions as well) there is the following line:
.if !make(remote) && !make(sync) && !make(bootstrap-pkgs)
In most of the programming languages that I have dealt with (which are based mostly off of C to one degree or another) would execute this from left to right and sometimes quit executing if one of the conditions proved to be false (but not always). However -- in examining the components of this if -- it does not seem to make any sense unless I execute this from right to left -- as make(remote) is dependent on make(sync) and make(sync) is dependent on make(bootstrap-pkgs) thus strongly implying that for this if to work properly and efficiently the order of operations would be:
1) make(bootstrap-pkgs)
2) if (1) is successful then make(sync)
3) if (2) is successful then make(remote)
4) if (3) is successful then this if is successful
So does this .if && statement combination execute from right to left as it seems or is there something else going on here that I am not fully understanding??
Or even better is there full documentation on how the .if statement works??