]> Kevux Git Server - fll/commitdiff
Refactor: "if defined" and "if not defined" to be easier to use in fake program.
authorKevin Day <thekevinday@gmail.com>
Sun, 10 Jul 2022 02:52:07 +0000 (21:52 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 10 Jul 2022 03:11:24 +0000 (22:11 -0500)
Using "if not defined parameter work" can be confusing.
Using "if not parameter work" is shorter and easier to understand.

Using "if defined environment PATH" can be very confusing.
Using "if define PATH" is shorter and a lot easier to understand.

Break apart the "if defined" (and "if not defined") logic into two operations:
1) "if define" (and "if not define").
2) "if parameter" (and "if not parameter").

This makes the behavior easier to understand as it directly maps to the "defined" and "parameter" settings.

37 files changed:
level_0/f_account/data/build/testfile
level_0/f_capability/data/build/testfile
level_0/f_color/data/build/testfile
level_0/f_console/data/build/testfile
level_0/f_control_group/data/build/testfile
level_0/f_conversion/data/build/testfile
level_0/f_directory/data/build/testfile
level_0/f_environment/data/build/testfile
level_0/f_execute/data/build/testfile
level_0/f_file/data/build/testfile
level_0/f_fss/data/build/testfile
level_0/f_iki/data/build/testfile
level_0/f_limit/data/build/testfile
level_0/f_memory/data/build/testfile
level_0/f_path/data/build/testfile
level_0/f_pipe/data/build/testfile
level_0/f_print/data/build/testfile
level_0/f_serialize/data/build/testfile
level_0/f_signal/data/build/testfile
level_0/f_socket/data/build/testfile
level_0/f_status/data/build/testfile
level_0/f_status_string/data/build/testfile
level_0/f_string/data/build/testfile
level_0/f_thread/data/build/testfile
level_0/f_type_array/data/build/testfile
level_0/f_utf/data/build/testfile
level_2/fll_status_string/data/build/testfile
level_3/fake/c/private-common.c
level_3/fake/c/private-common.h
level_3/fake/c/private-make-load_fakefile.c
level_3/fake/c/private-make-operate_process.c
level_3/fake/c/private-make-operate_process_type.c
level_3/fake/c/private-make-operate_process_type.h
level_3/fake/c/private-make-operate_validate.c
level_3/fake/data/build/fakefile-example-linux_using_make
level_3/fake/documents/fakefile.txt
level_3/fake/specifications/fakefile.txt

index f7637a6ecde6dedd9f876597b6fa1fa53106645e..4154996a64543059236453665b4baf54603d2c1a 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 3279fc6ed06e337e1d0ffa12dabeb98efcae7014..3d84ad4f5170e616da1648a6e3b3cf1c9f3c8e41 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index cb3442f6e7ca8fbf0092abd23ed0c8cc1c4fcc4d..db886504d9bb5bf0ec8e129505ac59714eb14dea 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 565b1f2291d4e9e4a9074a41d75036534b54a7e5..c1a5d6a8091b62591c61b49db8e9c4f47aa123cd 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 2c81bfc6c4ac8aa21862566c0fa5b1e9792021a4..71ffb1f4cf9d629c6003455d88eabde628550f78 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index d25247ee692c895b79955c3d9cbde2e7f58e0b3a..dad2f5c551989b66ae47e89a333a6ce55b6747bd 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 27a87ee72bc45b6e4624c2856f366f33353baad8..f7fae9166158e83caef7c96776ca53678826f128 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index d0a87d45280535bd1ee177adcec4748a4d85c901..41a761a2849ca26a333ab5e3af22d1eb02921780 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 2999b3414bc4baa1d017344a25cb216a041ac2a3..af6c94caac1ff2c7a6ea3b05fd4a0e4ac290163e 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 43c9ef502c74f3d662cdde5651cf2e2ab763f3c8..3d49e78b3b24e54fbe5dc10adb47ffa3b6538b7b 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index d835ae03e1b00293004ed7061d4541a9d5d04622..b3d5b0ced8f74137d23325ca722c93ec3dc7587f 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 98dc5b514d1a03633e47a109da5036263c1192ca..bd77b03e4b27a9f84283dc76efae59089b51099f 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 9212a7d276c6244d707db870ff9e77ac01993142..c13283be42753e171e9dfbd2b38f85df9cc03b74 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 8532ddbee4ddaf38778719f052f72b0c3bc1ca31..11d0202b831074f31c6de549a8737203e1e68920 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 62e280af9c7fd5c7facf655900e6f61bacbac9a0..ca3728f11c1e782969d6a8244c8d7497e05bfbc1 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index a17a9d8a81eb83b0d26bfd2005992d533c1b4325..15e7aef4bc2a9d1d1886cd5cb9e2d64b988ff846 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 8e2e6428a4d53088c45ef8fd008218d07cc598f8..1918308c30acff409068b9f9f90ee180e9232731 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 9fe8fbef0358f78d209f4478e55b12ecc5b9e557..af055523f7d4919e2ae8a43aead6c971cfa15403 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 6e8fb3e5a3344ef8fae347b906e011f7424cbc23..ae578b7dda4afb52a6f10206b8867f2c02dc8a87 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 3fa4b683276889ad7d70ac37dfc5c3cde828641c..01a248533804ffa0b464d93e802e31536611acc3 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 07ad85b0b81895db98a8318f16cebeffcc2fa2a3..500208479d58675a622d682f88846d4246ff1560 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index cba4a2714ee380b495e55c9e397cbf0159bd1d86..0f4645fddaa63a5ebc077c81d0f3647428855bbf 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 0ccc5994a284b6443db220c5c5d11fc300e96fa1..3953fe8de34eec19711bbfef46c66dfe2c28145c 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 41ed15c6a509000406f854fbc1456300f6c47016..884276df8092f8c2ed5c6d40fbe02676156ffc3f 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 5ed3fd7d23c64d4df318d6286b7f523a56e9c77e..fed675c58b308de181253efb14e78bdfaaec229d 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 8c6f081df4e825efc7c4b73252f2af8d2cc0568a..cd99cd41f95b38b7521eb3d0c19a1e106dacb307 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 5358665f90adf12f40f12f661af22990a492c6fb..422688089aa8ed621de82bf96f02b3d4b56928b8 100644 (file)
@@ -39,16 +39,16 @@ not_created:
   exit failure
 
 ld_library_path:
-  if defined environment PATH LD_LIBRARY_PATH
-  and defined parameter work
+  if define LD_LIBRARY_PATH
+  and parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined environment PATH LD_LIBRARY_PATH
+  if define LD_LIBRARY_PATH
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
 
   else
-  if defined parameter work
+  if parameter work
     define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
 
   else
index 47fc0a49b85145328279b0eae0bdac4aef0a0407..ee3045636aa4e7349841e2d6986cb79ad0baddac 100644 (file)
@@ -225,7 +225,7 @@ extern "C" {
   const f_string_static_t fake_make_operation_argument_target_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_target_s, 0, FAKE_make_operation_argument_target_s_length);
   const f_string_static_t fake_make_operation_argument_warn_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_warn_s, 0, FAKE_make_operation_argument_warn_s_length);
 
-  const f_string_static_t fake_make_operation_argument_if_defined_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_defined_s, 0, FAKE_make_operation_argument_if_defined_s_length);
+  const f_string_static_t fake_make_operation_argument_if_define_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_define_s, 0, FAKE_make_operation_argument_if_define_s_length);
   const f_string_static_t fake_make_operation_argument_if_equal_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_equal_s, 0, FAKE_make_operation_argument_if_equal_s_length);
   const f_string_static_t fake_make_operation_argument_if_equal_not_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_equal_not_s, 0, FAKE_make_operation_argument_if_equal_not_s_length);
   const f_string_static_t fake_make_operation_argument_if_exists_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_exists_s, 0, FAKE_make_operation_argument_if_exists_s_length);
@@ -240,6 +240,7 @@ extern "C" {
   const f_string_static_t fake_make_operation_argument_if_mode_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_mode_s, 0, FAKE_make_operation_argument_if_mode_s_length);
   const f_string_static_t fake_make_operation_argument_if_not_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_not_s, 0, FAKE_make_operation_argument_if_not_s_length);
   const f_string_static_t fake_make_operation_argument_if_owner_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_owner_s, 0, FAKE_make_operation_argument_if_owner_s_length);
+  const f_string_static_t fake_make_operation_argument_if_parameter_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_parameter_s, 0, FAKE_make_operation_argument_if_parameter_s_length);
   const f_string_static_t fake_make_operation_argument_if_success_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_success_s, 0, FAKE_make_operation_argument_if_success_s_length);
 #endif // _di_fake_make_operation_
 
index 46103435d15432e9c9b01fb720621ca3539d182a..0b5191bd7d4cb75daba141b61af05771ec527303 100644 (file)
@@ -1370,7 +1370,7 @@ extern "C" {
   extern const f_string_static_t fake_make_operation_argument_target_s;
   extern const f_string_static_t fake_make_operation_argument_warn_s;
 
-  #define FAKE_make_operation_argument_if_defined_s       "defined"
+  #define FAKE_make_operation_argument_if_define_s        "define"
   #define FAKE_make_operation_argument_if_equal_s         "=="
   #define FAKE_make_operation_argument_if_equal_not_s     "<>"
   #define FAKE_make_operation_argument_if_exists_s        "exists"
@@ -1385,9 +1385,10 @@ extern "C" {
   #define FAKE_make_operation_argument_if_mode_s          "mode"
   #define FAKE_make_operation_argument_if_not_s           "not"
   #define FAKE_make_operation_argument_if_owner_s         "owner"
+  #define FAKE_make_operation_argument_if_parameter_s     "parameter"
   #define FAKE_make_operation_argument_if_success_s       "success"
 
-  #define FAKE_make_operation_argument_if_defined_s_length       7
+  #define FAKE_make_operation_argument_if_define_s_length        6
   #define FAKE_make_operation_argument_if_equal_s_length         2
   #define FAKE_make_operation_argument_if_equal_not_s_length     2
   #define FAKE_make_operation_argument_if_exists_s_length        6
@@ -1402,9 +1403,10 @@ extern "C" {
   #define FAKE_make_operation_argument_if_mode_s_length          4
   #define FAKE_make_operation_argument_if_not_s_length           3
   #define FAKE_make_operation_argument_if_owner_s_length         5
+  #define FAKE_make_operation_argument_if_parameter_s_length     9
   #define FAKE_make_operation_argument_if_success_s_length       7
 
-  extern const f_string_static_t fake_make_operation_argument_if_defined_s;
+  extern const f_string_static_t fake_make_operation_argument_if_define_s;
   extern const f_string_static_t fake_make_operation_argument_if_equal_s;
   extern const f_string_static_t fake_make_operation_argument_if_equal_not_s;
   extern const f_string_static_t fake_make_operation_argument_if_exists_s;
@@ -1419,12 +1421,13 @@ extern "C" {
   extern const f_string_static_t fake_make_operation_argument_if_mode_s;
   extern const f_string_static_t fake_make_operation_argument_if_not_s;
   extern const f_string_static_t fake_make_operation_argument_if_owner_s;
+  extern const f_string_static_t fake_make_operation_argument_if_parameter_s;
   extern const f_string_static_t fake_make_operation_argument_if_success_s;
 
   enum {
     fake_make_operation_if_type_else_e = 1,
     fake_make_operation_if_type_if_e,
-    fake_make_operation_if_type_if_defined_e,
+    fake_make_operation_if_type_if_define_e,
     fake_make_operation_if_type_if_equal_e,
     fake_make_operation_if_type_if_equal_not_e,
     fake_make_operation_if_type_if_exists_e,
@@ -1437,12 +1440,14 @@ extern "C" {
     fake_make_operation_if_type_if_less_equal_e,
     fake_make_operation_if_type_if_mode_e,
     fake_make_operation_if_type_if_not_e,
-    fake_make_operation_if_type_if_not_defined_e,
+    fake_make_operation_if_type_if_not_define_e,
     fake_make_operation_if_type_if_not_exists_e,
     fake_make_operation_if_type_if_not_group_e,
     fake_make_operation_if_type_if_not_is_e,
     fake_make_operation_if_type_if_not_mode_e,
     fake_make_operation_if_type_if_not_owner_e,
+    fake_make_operation_if_type_if_not_parameter_e,
+    fake_make_operation_if_type_if_parameter_e,
     fake_make_operation_if_type_if_owner_e,
     fake_make_operation_if_type_if_success_e,
   };
index 632f7c1d0a4fcf4134dc56d9e90ea8f0801961d4..4ae12b37900ddceacc905c175a24daab1f9b8215 100644 (file)
@@ -384,7 +384,6 @@ extern "C" {
         fake_make_setting_parameter_s,
       };
 
-
       f_string_map_multis_t *settings_value[] = {
         &define,
         &data_make->setting_make.parameter,
index 91da8ad06e6afa45e02f00b9542e99fa45594778..c00f8cc114e3524443f9ce0d491e267f56f15871 100644 (file)
@@ -193,39 +193,8 @@ extern "C" {
     }
 
     if (state_process->operation == fake_make_operation_type_if_e || state_process->operation == fake_make_operation_type_and_e || state_process->operation == fake_make_operation_type_or_e) {
-      if (state_process->condition == fake_make_operation_if_type_if_success_e) {
-        if (state_process->success) {
-          state_process->condition_result = fake_condition_result_true_e;
-        }
-        else {
-          state_process->condition_result = fake_condition_result_false_e;
-        }
-      }
-      else if (state_process->condition == fake_make_operation_if_type_if_defined_e) {
-        fake_make_operate_process_type_if_defined(data_make, arguments, F_false, state_process);
-      }
-      else if (state_process->condition == fake_make_operation_if_type_if_exists_e) {
-        *status = fake_make_operate_process_type_if_exists(data_make, arguments, F_false, state_process);
-      }
-      else if (state_process->condition == fake_make_operation_if_type_if_failure_e) {
-        if (state_process->success) {
-          state_process->condition_result = fake_condition_result_false_e;
-        }
-        else {
-          state_process->condition_result = fake_condition_result_true_e;
-        }
-      }
-      else if (state_process->condition == fake_make_operation_if_type_if_group_e) {
-        *status = fake_make_operate_process_type_if_group(data_make, arguments, F_false, state_process);
-      }
-      else if (state_process->condition == fake_make_operation_if_type_if_is_e) {
-        *status = fake_make_operate_process_type_if_is(data_make, arguments, F_false, state_process);
-      }
-      else if (state_process->condition == fake_make_operation_if_type_if_mode_e) {
-        *status = fake_make_operate_process_type_if_mode(data_make, arguments, F_false, state_process);
-      }
-      else if (state_process->condition == fake_make_operation_if_type_if_not_defined_e) {
-        fake_make_operate_process_type_if_defined(data_make, arguments, F_true, state_process);
+      if (state_process->condition == fake_make_operation_if_type_if_define_e) {
+        fake_make_operate_process_type_if_define(data_make, arguments, F_false, state_process);
       }
       else if (state_process->condition == fake_make_operation_if_type_if_equal_e) {
         state_process->condition_result = fake_condition_result_true_e;
@@ -258,9 +227,35 @@ extern "C" {
           } // for
         } // for
       }
+      else if (state_process->condition == fake_make_operation_if_type_if_exists_e) {
+        *status = fake_make_operate_process_type_if_exists(data_make, arguments, F_false, state_process);
+      }
+      else if (state_process->condition == fake_make_operation_if_type_if_failure_e) {
+        if (state_process->success) {
+          state_process->condition_result = fake_condition_result_false_e;
+        }
+        else {
+          state_process->condition_result = fake_condition_result_true_e;
+        }
+      }
       else if (state_process->condition == fake_make_operation_if_type_if_greater_e || state_process->condition == fake_make_operation_if_type_if_greater_equal_e || state_process->condition == fake_make_operation_if_type_if_less_e || state_process->condition == fake_make_operation_if_type_if_less_equal_e) {
         *status = fake_make_operate_process_type_if_greater_if_lesser(data_make, arguments, state_process);
       }
+      else if (state_process->condition == fake_make_operation_if_type_if_group_e) {
+        *status = fake_make_operate_process_type_if_group(data_make, arguments, F_false, state_process);
+      }
+      else if (state_process->condition == fake_make_operation_if_type_if_is_e) {
+        *status = fake_make_operate_process_type_if_is(data_make, arguments, F_false, state_process);
+      }
+      else if (state_process->condition == fake_make_operation_if_type_if_mode_e) {
+        *status = fake_make_operate_process_type_if_mode(data_make, arguments, F_false, state_process);
+      }
+      else if (state_process->condition == fake_make_operation_if_type_if_not_define_e) {
+        fake_make_operate_process_type_if_define(data_make, arguments, F_true, state_process);
+      }
+      else if (state_process->condition == fake_make_operation_if_type_if_not_parameter_e) {
+        fake_make_operate_process_type_if_parameter(data_make, arguments, F_true, state_process);
+      }
       else if (state_process->condition == fake_make_operation_if_type_if_not_exists_e) {
         *status = fake_make_operate_process_type_if_exists(data_make, arguments, F_true, state_process);
       }
@@ -279,6 +274,17 @@ extern "C" {
       else if (state_process->condition == fake_make_operation_if_type_if_owner_e) {
         *status = fake_make_operate_process_type_if_owner(data_make, arguments, F_false, state_process);
       }
+      else if (state_process->condition == fake_make_operation_if_type_if_parameter_e) {
+        fake_make_operate_process_type_if_parameter(data_make, arguments, F_false, state_process);
+      }
+      else if (state_process->condition == fake_make_operation_if_type_if_success_e) {
+        if (state_process->success) {
+          state_process->condition_result = fake_condition_result_true_e;
+        }
+        else {
+          state_process->condition_result = fake_condition_result_false_e;
+        }
+      }
 
       if (state_process->block) {
         if (state_process->operation == fake_make_operation_type_and_e) {
index 09f30053899888327a8a20be623ef020682201d2..16a8589692897d6aeda7225c708f59a5184678c5 100644 (file)
@@ -325,165 +325,34 @@ extern "C" {
   }
 #endif // _di_fake_make_operate_process_type_groups_
 
-#ifndef _di_fake_make_operate_process_type_if_defined_
-  void fake_make_operate_process_type_if_defined(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) {
-
-    const f_string_static_t argument = if_not ? arguments.array[2] : arguments.array[1];
-
-    const f_string_static_t reserved_name[] = {
-      fake_make_parameter_variable_build_s,
-      fake_make_parameter_variable_color_s,
-      fake_make_parameter_variable_data_s,
-      fake_make_parameter_variable_define_s,
-      fake_make_parameter_variable_fakefile_s,
-      fake_make_parameter_variable_mode_s,
-      fake_make_parameter_variable_process_s,
-      fake_make_parameter_variable_settings_s,
-      fake_make_parameter_variable_sources_s,
-      fake_make_parameter_variable_verbosity_s,
-      fake_make_parameter_variable_work_s,
-      fake_make_parameter_variable_option_build_s,
-      fake_make_parameter_variable_option_color_s,
-      fake_make_parameter_variable_option_data_s,
-      fake_make_parameter_variable_option_define_s,
-      fake_make_parameter_variable_option_fakefile_s,
-      fake_make_parameter_variable_option_mode_s,
-      fake_make_parameter_variable_option_process_s,
-      fake_make_parameter_variable_option_settings_s,
-      fake_make_parameter_variable_option_sources_s,
-      fake_make_parameter_variable_option_verbosity_s,
-      fake_make_parameter_variable_option_work_s,
-      fake_make_parameter_variable_value_build_s,
-      fake_make_parameter_variable_value_color_s,
-      fake_make_parameter_variable_value_data_s,
-      fake_make_parameter_variable_value_define_s,
-      fake_make_parameter_variable_value_fakefile_s,
-      fake_make_parameter_variable_value_mode_s,
-      fake_make_parameter_variable_value_process_s,
-      fake_make_parameter_variable_value_settings_s,
-      fake_make_parameter_variable_value_sources_s,
-      fake_make_parameter_variable_value_verbosity_s,
-      fake_make_parameter_variable_value_work_s,
-    };
-
-    const bool reserved_defined[] = {
-      data_make->data->path_build.used,
-      F_true,
-      data_make->data->path_data.used,
-      data_make->data->define.used,
-      data_make->data->fakefile.used,
-      data_make->data->mode.used,
-      data_make->data->process.used,
-      data_make->data->settings.used,
-      data_make->data->path_sources.used,
-      F_true,
-      data_make->data->path_work.used,
-      data_make->main->parameters.array[fake_parameter_path_build_e].result == f_console_result_additional_e,
-      data_make->main->parameters.array[fake_parameter_light_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_dark_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_no_color_e].result == f_console_result_found_e,
-      data_make->main->parameters.array[fake_parameter_path_data_e].result == f_console_result_additional_e,
-      data_make->main->parameters.array[fake_parameter_define_e].result == f_console_result_additional_e,
-      data_make->main->parameters.array[fake_parameter_fakefile_e].result == f_console_result_additional_e,
-      data_make->main->parameters.array[fake_parameter_mode_e].result == f_console_result_additional_e,
-      data_make->main->parameters.array[fake_parameter_process_e].result == f_console_result_additional_e,
-      data_make->main->parameters.array[fake_parameter_settings_e].result == f_console_result_additional_e,
-      data_make->main->parameters.array[fake_parameter_path_sources_e].result == f_console_result_additional_e,
-      data_make->main->parameters.array[fake_parameter_verbosity_quiet_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_verbosity_normal_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_verbosity_debug_e].result == f_console_result_found_e,
-      data_make->main->parameters.array[fake_parameter_path_work_e].result == f_console_result_additional_e,
-      data_make->parameter_value.build.used,
-      data_make->parameter_value.color.used,
-      data_make->parameter_value.data.used,
-      data_make->parameter_value.define.used,
-      data_make->parameter_value.fakefile.used,
-      data_make->parameter_value.mode.used,
-      data_make->parameter_value.process.used,
-      data_make->parameter_value.settings.used,
-      data_make->parameter_value.sources.used,
-      data_make->parameter_value.verbosity.used,
-      data_make->parameter_value.work.used,
-    };
-
-    if (fl_string_dynamic_compare(fake_make_operation_argument_environment_s, argument) == F_equal_to) {
-      state_process->condition_result = fake_condition_result_true_e;
-
-      if (if_not) {
-        for (f_array_length_t i = 3; i < arguments.used; ++i) {
-
-          if (f_environment_exists(arguments.array[i]) == F_true) {
-            state_process->condition_result = fake_condition_result_false_e;
-
-            break;
-          }
-        } // for
-      }
-      else {
-        for (f_array_length_t i = 2; i < arguments.used; ++i) {
-
-          if (f_environment_exists(arguments.array[i]) != F_true) {
-            state_process->condition_result = fake_condition_result_false_e;
-
-            break;
-          }
-        } // for
-      }
-
-      return;
-    }
-
-    f_array_length_t i = if_not ? 3 : 2;
-    f_array_length_t j = 0;
-
-    // 0 = unknown, 1 = fail, 2 = pass.
-    uint8_t result = 0;
+#ifndef _di_fake_make_operate_process_type_if_define_
+  void fake_make_operate_process_type_if_define(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) {
 
     state_process->condition_result = fake_condition_result_true_e;
 
     // Multiple properties may pass and so if any of them fail, then they all fail.
-    for (; i < arguments.used; ++i) {
-
-      for (j = 0; j < 33; ++j) {
+    if (if_not) {
+      for (f_array_length_t i = 2; i < arguments.used; ++i) {
 
-        if (fl_string_dynamic_compare(reserved_name[j], arguments.array[i]) == F_equal_to) {
-          result = reserved_defined[j] ? 2 : 1;
+        if (f_environment_exists(arguments.array[i]) == F_true) {
+          state_process->condition_result = fake_condition_result_false_e;
 
           break;
         }
       } // for
+    }
+    else {
+      for (f_array_length_t i = 1; i < arguments.used; ++i) {
 
-      if (!result) {
-        for (j = 0; j < data_make->setting_make.parameter.used; ++j) {
-
-          if (fl_string_dynamic_compare(arguments.array[i], data_make->setting_make.parameter.array[j].name) == F_equal_to) {
-            result = 2;
-
-            break;
-          }
-        } // for
-      }
-
-      if (result < 2) {
-        result = 1;
-
-        break;
-      }
-
-      if (i + 1 < arguments.used) {
-        result = 0;
-      }
-    } // for
+        if (f_environment_exists(arguments.array[i]) != F_true) {
+          state_process->condition_result = fake_condition_result_false_e;
 
-    if (if_not) {
-      if (result < 2) {
-        state_process->condition_result = fake_condition_result_true_e;
-      }
-      else {
-        state_process->condition_result = fake_condition_result_false_e;
-      }
-    }
-    else if (result < 2) {
-      state_process->condition_result = fake_condition_result_false_e;
+          break;
+        }
+      } // for
     }
   }
-#endif // _di_fake_make_operate_process_type_if_defined_
+#endif // _di_fake_make_operate_process_type_if_define_
 
 #ifndef _di_fake_make_operate_process_type_if_exists_
   f_status_t fake_make_operate_process_type_if_exists(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) {
@@ -992,6 +861,138 @@ extern "C" {
   }
 #endif // _di_fake_make_operate_process_type_if_owner_
 
+#ifndef _di_fake_make_operate_process_type_if_parameter_
+  void fake_make_operate_process_type_if_parameter(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) {
+
+    const f_string_static_t reserved_name[] = {
+      fake_make_parameter_variable_build_s,
+      fake_make_parameter_variable_color_s,
+      fake_make_parameter_variable_data_s,
+      fake_make_parameter_variable_define_s,
+      fake_make_parameter_variable_fakefile_s,
+      fake_make_parameter_variable_mode_s,
+      fake_make_parameter_variable_process_s,
+      fake_make_parameter_variable_settings_s,
+      fake_make_parameter_variable_sources_s,
+      fake_make_parameter_variable_verbosity_s,
+      fake_make_parameter_variable_work_s,
+      fake_make_parameter_variable_option_build_s,
+      fake_make_parameter_variable_option_color_s,
+      fake_make_parameter_variable_option_data_s,
+      fake_make_parameter_variable_option_define_s,
+      fake_make_parameter_variable_option_fakefile_s,
+      fake_make_parameter_variable_option_mode_s,
+      fake_make_parameter_variable_option_process_s,
+      fake_make_parameter_variable_option_settings_s,
+      fake_make_parameter_variable_option_sources_s,
+      fake_make_parameter_variable_option_verbosity_s,
+      fake_make_parameter_variable_option_work_s,
+      fake_make_parameter_variable_value_build_s,
+      fake_make_parameter_variable_value_color_s,
+      fake_make_parameter_variable_value_data_s,
+      fake_make_parameter_variable_value_define_s,
+      fake_make_parameter_variable_value_fakefile_s,
+      fake_make_parameter_variable_value_mode_s,
+      fake_make_parameter_variable_value_process_s,
+      fake_make_parameter_variable_value_settings_s,
+      fake_make_parameter_variable_value_sources_s,
+      fake_make_parameter_variable_value_verbosity_s,
+      fake_make_parameter_variable_value_work_s,
+    };
+
+    const bool reserved_parameter[] = {
+      data_make->data->path_build.used,
+      F_true,
+      data_make->data->path_data.used,
+      data_make->data->define.used,
+      data_make->data->fakefile.used,
+      data_make->data->mode.used,
+      data_make->data->process.used,
+      data_make->data->settings.used,
+      data_make->data->path_sources.used,
+      F_true,
+      data_make->data->path_work.used,
+      data_make->main->parameters.array[fake_parameter_path_build_e].result == f_console_result_additional_e,
+      data_make->main->parameters.array[fake_parameter_light_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_dark_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_no_color_e].result == f_console_result_found_e,
+      data_make->main->parameters.array[fake_parameter_path_data_e].result == f_console_result_additional_e,
+      data_make->main->parameters.array[fake_parameter_define_e].result == f_console_result_additional_e,
+      data_make->main->parameters.array[fake_parameter_fakefile_e].result == f_console_result_additional_e,
+      data_make->main->parameters.array[fake_parameter_mode_e].result == f_console_result_additional_e,
+      data_make->main->parameters.array[fake_parameter_process_e].result == f_console_result_additional_e,
+      data_make->main->parameters.array[fake_parameter_settings_e].result == f_console_result_additional_e,
+      data_make->main->parameters.array[fake_parameter_path_sources_e].result == f_console_result_additional_e,
+      data_make->main->parameters.array[fake_parameter_verbosity_quiet_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_verbosity_normal_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_verbosity_debug_e].result == f_console_result_found_e,
+      data_make->main->parameters.array[fake_parameter_path_work_e].result == f_console_result_additional_e,
+      data_make->parameter_value.build.used,
+      data_make->parameter_value.color.used,
+      data_make->parameter_value.data.used,
+      data_make->parameter_value.define.used,
+      data_make->parameter_value.fakefile.used,
+      data_make->parameter_value.mode.used,
+      data_make->parameter_value.process.used,
+      data_make->parameter_value.settings.used,
+      data_make->parameter_value.sources.used,
+      data_make->parameter_value.verbosity.used,
+      data_make->parameter_value.work.used,
+    };
+
+    f_array_length_t i = if_not ? 2 : 1;
+    f_array_length_t j = 0;
+
+    // 0 = unknown, 1 = fail, 2 = pass.
+    uint8_t result = 0;
+
+    state_process->condition_result = fake_condition_result_true_e;
+
+    // Multiple properties may pass and so if any of them fail, then they all fail.
+    for (; i < arguments.used && !result; ++i) {
+
+      for (j = 0; j < 33; ++j) {
+
+        if (fl_string_dynamic_compare(reserved_name[j], arguments.array[i]) == F_equal_to) {
+          result = reserved_parameter[j] ? 2 : 1;
+
+          break;
+        }
+      } // for
+
+      if (!result) {
+        for (j = 0; j < data_make->setting_make.parameter.used; ++j) {
+
+          if (fl_string_dynamic_compare(arguments.array[i], data_make->setting_make.parameter.array[j].name) == F_equal_to) {
+            result = 2;
+
+            break;
+          }
+        } // for
+
+        if (j == data_make->setting_make.parameter.used) {
+          result = 1;
+        }
+      }
+
+      if (result == 2 && i + 1 < arguments.used) {
+        result = 0;
+      }
+    } // for
+
+    if (if_not) {
+      if (result == 2) {
+        state_process->condition_result = fake_condition_result_false_e;
+      }
+      else {
+        state_process->condition_result = fake_condition_result_true_e;
+      }
+    }
+    else if (result == 2) {
+      state_process->condition_result = fake_condition_result_true_e;
+    }
+    else {
+      state_process->condition_result = fake_condition_result_false_e;
+    }
+  }
+#endif // _di_fake_make_operate_process_type_if_parameter_
+
 #ifndef _di_fake_make_operate_process_type_modes_
   f_status_t fake_make_operate_process_type_modes(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool all) {
 
index f766ddae77002db236be544d87161ced1ea1849c..b1161fc03df4eb6049e032ff68eebcfccf94a787 100644 (file)
@@ -113,7 +113,7 @@ extern "C" {
 #endif // _di_fake_make_operate_process_type_groups_
 
 /**
- * Perform the if defined operation process.
+ * Perform the if define operation process.
  *
  * @param data_make
  *   All make related setting data, including data from the fakefile and the build settings file.
@@ -125,9 +125,9 @@ extern "C" {
  * @param state_process
  *   The operation process state.
  */
-#ifndef _di_fake_make_operate_process_type_if_defined_
-  extern void fake_make_operate_process_type_if_defined(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d;
-#endif // _di_fake_make_operate_process_type_if_defined_
+#ifndef _di_fake_make_operate_process_type_if_define_
+  extern void fake_make_operate_process_type_if_define(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d;
+#endif // _di_fake_make_operate_process_type_if_define_
 
 /**
  * Perform the if exists operation process.
@@ -285,6 +285,23 @@ extern "C" {
 #endif // _di_fake_make_operate_process_type_if_owner_
 
 /**
+ * Perform the if parameter operation process.
+ *
+ * @param data_make
+ *   All make related setting data, including data from the fakefile and the build settings file.
+ * @param arguments
+ *   The arguments for the run or shell operation.
+ * @param if_not
+ *   When TRUE, perform the if not is.
+ *   When FALSE, perform the if is.
+ * @param state_process
+ *   The operation process state.
+ */
+#ifndef _di_fake_make_operate_process_type_if_parameter_
+  extern void fake_make_operate_process_type_if_parameter(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d;
+#endif // _di_fake_make_operate_process_type_if_parameter_
+
+/**
  * Perform the mode and modes operation processes.
  *
  * @param data_make
index f52ecba7771c2f715f4223f676b4777e0e0bd485..55230ca6848f028c12ab490e40a442b88d6b2f46 100644 (file)
@@ -615,7 +615,7 @@ extern "C" {
 
       if (arguments.used) {
         const f_string_static_t if_type_strings[] = {
-          fake_make_operation_argument_if_defined_s,
+          fake_make_operation_argument_if_define_s,
           fake_make_operation_argument_if_equal_s,
           fake_make_operation_argument_if_equal_not_s,
           fake_make_operation_argument_if_exists_s,
@@ -628,18 +628,20 @@ extern "C" {
           fake_make_operation_argument_if_less_equal_s,
           fake_make_operation_argument_if_mode_s,
           fake_make_operation_argument_if_not_s,
-          fake_make_operation_argument_if_defined_s, // If not defined, represented by just "defined".
-          fake_make_operation_argument_if_exists_s,  // If not exists, represented by just "exists".
-          fake_make_operation_argument_if_group_s,   // If not group, represented by just "group".
-          fake_make_operation_argument_if_is_s,      // If not is, represented by just "is".
-          fake_make_operation_argument_if_mode_s,    // If not mode, represented by just "mode".
-          fake_make_operation_argument_if_owner_s,   // If not owner, represented by just "owner".
+          fake_make_operation_argument_if_define_s,    // If not define, represented by just "define".
+          fake_make_operation_argument_if_exists_s,    // If not exists, represented by just "exists".
+          fake_make_operation_argument_if_group_s,     // If not group, represented by just "group".
+          fake_make_operation_argument_if_is_s,        // If not is, represented by just "is".
+          fake_make_operation_argument_if_mode_s,      // If not mode, represented by just "mode".
+          fake_make_operation_argument_if_owner_s,     // If not owner, represented by just "owner".
+          fake_make_operation_argument_if_parameter_s, // If not parameter, represented by just "parameter".
           fake_make_operation_argument_if_owner_s,
+          fake_make_operation_argument_if_parameter_s,
           fake_make_operation_argument_if_success_s,
         };
 
         const uint8_t if_type_codes[] = {
-          fake_make_operation_if_type_if_defined_e,
+          fake_make_operation_if_type_if_define_e,
           fake_make_operation_if_type_if_equal_e,
           fake_make_operation_if_type_if_equal_not_e,
           fake_make_operation_if_type_if_exists_e,
@@ -652,32 +654,36 @@ extern "C" {
           fake_make_operation_if_type_if_less_equal_e,
           fake_make_operation_if_type_if_mode_e,
           fake_make_operation_if_type_if_not_e,
-          fake_make_operation_if_type_if_not_defined_e,
+          fake_make_operation_if_type_if_not_define_e,
           fake_make_operation_if_type_if_not_exists_e,
           fake_make_operation_if_type_if_not_group_e,
           fake_make_operation_if_type_if_not_is_e,
           fake_make_operation_if_type_if_not_mode_e,
           fake_make_operation_if_type_if_not_owner_e,
+          fake_make_operation_if_type_if_not_parameter_e,
           fake_make_operation_if_type_if_owner_e,
+          fake_make_operation_if_type_if_parameter_e,
           fake_make_operation_if_type_if_success_e,
         };
 
         const f_string_static_t if_not_type_strings[] = {
-          fake_make_operation_argument_if_defined_s,
+          fake_make_operation_argument_if_define_s,
           fake_make_operation_argument_if_exists_s,
           fake_make_operation_argument_if_group_s,
           fake_make_operation_argument_if_is_s,
           fake_make_operation_argument_if_mode_s,
           fake_make_operation_argument_if_owner_s,
+          fake_make_operation_argument_if_parameter_s,
         };
 
         const uint8_t if_not_type_codes[] = {
-          fake_make_operation_if_type_if_not_defined_e,
+          fake_make_operation_if_type_if_not_define_e,
           fake_make_operation_if_type_if_not_exists_e,
           fake_make_operation_if_type_if_not_group_e,
           fake_make_operation_if_type_if_not_is_e,
           fake_make_operation_if_type_if_not_mode_e,
           fake_make_operation_if_type_if_not_owner_e,
+          fake_make_operation_if_type_if_not_parameter_e,
         };
 
         f_array_length_t i = 0;
@@ -702,7 +708,7 @@ extern "C" {
         }
 
         const uint8_t if_type_minimum[] = {
-          dereference ? 3 : 4, // If defined.
+          dereference ? 3 : 4, // If define.
           dereference ? 2 : 3, // If equal (==).
           dereference ? 2 : 3, // If equal not (<>).
           dereference ? 2 : 3, // If exists.
@@ -715,29 +721,32 @@ extern "C" {
           dereference ? 2 : 3, // If less equal (<=).
           dereference ? 4 : 5, // If mode.
           dereference ? 3 : 4, // If not.
-          dereference ? 5 : 6, // If not defined.
+          dereference ? 5 : 6, // If not define.
           dereference ? 3 : 4, // If not exists.
           dereference ? 4 : 5, // If not group.
           dereference ? 4 : 5, // If not is.
           dereference ? 5 : 6, // If not mode.
           dereference ? 4 : 5, // If not owner.
+          dereference ? 5 : 6, // If not parameter.
+          dereference ? 3 : 4, // If parameter.
           dereference ? 3 : 4, // If owner.
           dereference ? 1 : 2, // If success.
         };
 
         const uint8_t if_not_type_minimum[] = {
-          dereference ? 4 : 5, // If not defined.
+          dereference ? 4 : 5, // If not define.
           dereference ? 3 : 4, // If not exists.
           dereference ? 4 : 5, // If not group.
           dereference ? 4 : 5, // If not is.
           dereference ? 5 : 6, // If not mode.
           dereference ? 4 : 5, // If not owner.
+          dereference ? 4 : 5, // If not parameter.
         };
 
-        for (; i < 21; ++i) {
+        for (; i < 23; ++i) {
 
           // Skip the "if not XXX" types as they are determined later on.
-          if (i > 12 && i < 19) continue;
+          if (i > 12 && i < 21) continue;
 
           if (fl_string_dynamic_compare(if_type_strings[i], arguments.array[k]) == F_equal_to) {
             state_process->condition = if_type_codes[i];
@@ -746,7 +755,7 @@ extern "C" {
           }
         } // for
 
-        if (i == 21) {
+        if (i == 23) {
           if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) {
             flockfile(data_make->error.to.stream);
 
@@ -778,7 +787,7 @@ extern "C" {
             return;
           }
 
-          for (; j < 6; ++j) {
+          for (; j < 7; ++j) {
 
             if (fl_string_dynamic_compare(if_not_type_strings[j], arguments.array[k]) == F_equal_to) {
               state_process->condition = if_not_type_codes[j];
@@ -787,7 +796,7 @@ extern "C" {
             }
           } // for
 
-          if (j == 6) {
+          if (j == 7) {
             if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) {
               flockfile(data_make->error.to.stream);
 
@@ -806,10 +815,10 @@ extern "C" {
           }
         }
         else {
-          j = 6;
+          j = 7;
         }
 
-        if (j == 6 && arguments.used >= if_type_minimum[i] || arguments.used >= if_not_type_minimum[j]) {
+        if (j == 7 && arguments.used >= if_type_minimum[i] || arguments.used >= if_not_type_minimum[j]) {
           if (state_process->condition == fake_make_operation_if_type_if_success_e || state_process->condition == fake_make_operation_if_type_if_failure_e) {
 
             // The success and failure operations minimum is also the maximum.
@@ -822,26 +831,6 @@ extern "C" {
             return;
           }
 
-          if (state_process->condition == fake_make_operation_if_type_if_defined_e || state_process->condition == fake_make_operation_if_type_if_not_defined_e) {
-            if (fl_string_dynamic_compare(fake_make_operation_argument_environment_s, arguments.array[k]) == F_equal_to_not) {
-              if (fl_string_dynamic_compare(fake_make_operation_argument_parameter_s, arguments.array[k]) == F_equal_to_not) {
-                if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) {
-                  flockfile(data_make->error.to.stream);
-
-                  fl_print_format("%r%[%QUnsupported define type '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context);
-                  fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[k], data_make->error.notable);
-                  fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s);
-
-                  funlockfile(data_make->error.to.stream);
-                }
-
-                *status = F_status_set_error(F_failure);
-              }
-            }
-
-            return;
-          }
-
           if (state_process->condition == fake_make_operation_if_type_if_equal_e || state_process->condition == fake_make_operation_if_type_if_equal_not_e) {
             if (arguments.used < 2 + k) {
               fake_print_error_requires_more_arguments(data_make);
@@ -857,7 +846,6 @@ extern "C" {
           }
 
           if (state_process->condition == fake_make_operation_if_type_if_group_e || state_process->condition == fake_make_operation_if_type_if_is_e || state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition > fake_make_operation_if_type_if_not_exists_e && state_process->condition < fake_make_operation_if_type_if_success_e) {
-
             if (state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition == fake_make_operation_if_type_if_not_mode_e) {
               if (fl_string_dynamic_compare(fake_make_operation_argument_is_s, arguments.array[k]) == F_equal_to_not) {
                 if (fl_string_dynamic_compare(fake_make_operation_argument_has_s, arguments.array[k]) == F_equal_to_not) {
index 76ca62a91c4f8ef95f2718fed4cec835803f0311..f5cc9cbc5e2b04f8c634371ce67458c17af8a677 100644 (file)
@@ -14,10 +14,10 @@ settings:
   load_build no
   fail exit
 
-  # add any desired environment variables here to expose to the run/shell environment.
+  # Add any desired environment variables here to expose to the run/shell environment.
   environment PATH
 
-  # config can be set to any valid config option, such as: menuconfig, nconfig, xconfig, gconfig, oldconfig, olddefconfig, defconfig, etc...
+  # "config" can be set to any valid config option, such as: menuconfig, nconfig, xconfig, gconfig, oldconfig, olddefconfig, defconfig, etc...
   parameter config defconfig
 
 main:
index 88ab1ffdede4b573abcdb12f3f28627523da8ce9..7f926197b28eba6841c3f7acc4a058c078cacfcb 100644 (file)
@@ -192,12 +192,12 @@ Fakefile Documentation:
       This is mostly relevant when "if" operation is followed by an "and" or an "or" operation.
 
       Consider the following\:
-        if defined parameter xxx
-        or defined parameter yyy
-        and defined parameter zzz
+        if parameter xxx
+        or parameter yyy
+        and parameter zzz
           print first
         else
-        if defined parameter www
+        if parameter www
           print second
         else
           print third
@@ -249,35 +249,9 @@ Fakefile Documentation:
           For example, "if <> 'a' 'b' 'c'" would test: 'a' <> 'b' && 'b' <> 'c' && 'a' <> 'c'.
           This performs only string-based comparisons.
 
-        - defined parameter/environment "some define name"\:
-          Test if one or more names are defined as a "parameter" or an "environment" variable.
-          For example, "if defined parameter verbose silent" would test if both the "verbose" and the "silent" variables are defined via the "parameter" setting.
-          For example, "if defined environment PWD SHELL" would test if both the "PWD" and the "SHELL" variables are defined via the "environment" variables.
-
-          Reserved parameters that represent program arguments, three forms are available.
-          For example, the program argument -w/--work has the reserved word "work" and has three forms:
-          1) "work".
-          2) "work:option".
-          3) "work:value".
-
-          In the case of form 1, the "if defined parameter work" would be true if the argument is passed to the program or a default is provided.
-          In the case of form 2, the "if defined parameter work:option" would be true if the argument is passed to the program.
-          In the case of form 3, the "if defined parameter work:value" would be true if the argument is passed to the program and has a non-zero value.
-
-          Some reserved parameters, such as the "verbosity", has no "value" and in this case would always return false for "if defined parameter verbosity:value".
-
-          The following are reserved parameters:
-          - build: Associated with -b/--build parameter.
-          - color: Associated with +d/++dark, +l/++light, and +n/++no_color parameters.
-          - data: Associated with -D/--data parameter.
-          - define: Associated with -d/--define parameter.
-          - fakefile: Associated with -f/--fakefile parameter.
-          - mode: Associated with -m/--mode parameter and possibly with the build settings default mode "modes_default".
-          - process: Associated with -p/--process parameter.
-          - settings: Associated with -s/--settings parameter.
-          - sources: Associated with -S/--sources parameter.
-          - verbosity: Associated with +q/++quiet, +N/++normal, +V/++verbose, and +D/++debug parameters.
-          - work: Associated with -w/--work parameter.
+        - define "some define name"\:
+          Test if one or more names are defined as an environment variable.
+          For example, "if define PWD SHELL" would test if both the "PWD" and the "SHELL" variables are defined via the environment variables.
 
         - exists "file path"\:
           Test if file exists.
@@ -304,21 +278,51 @@ Fakefile Documentation:
           This is to be immediately followed by a valid if condition as well as all appropriate valid content associated with that if condition.
 
           Only the following if conditions are supported\:
-          - defined.
+          - define.
           - exists.
           - group.
           - is.
           - mode.
           - owner.
+          - parameter.
 
           Examples\:
-          - "if not defined parameter work"
+          - "if not parameter work"
           - "if not exists documentation.txt"
 
         - owner "some mode" "some file"\:
           Test if one or more files has the given owner.
           For example, "if owner me a.txt b.txt" would test if both file a.txt and b.txt have an owner named "me".
 
+        - parameter "some parameter name"\:
+          Test if one or more names are defined as a "parameter" variable.
+          For example, "if parameter verbose silent" would test if both the "verbose" and the "silent" variables are defined via the "parameter" setting.
+
+          Reserved parameters that represent program arguments, three forms are available.
+          For example, the program argument -w/--work has the reserved word "work" and has three forms:
+          1) "work".
+          2) "work:option".
+          3) "work:value".
+
+          In the case of form 1, the "if parameter work" would be true if the argument is passed to the program or a default is provided.
+          In the case of form 2, the "if parameter work:option" would be true if the argument is passed to the program.
+          In the case of form 3, the "if parameter work:value" would be true if the argument is passed to the program and has a non-zero value.
+
+          Some reserved parameters, such as the "verbosity", has no "value" and in this case would always return false for "if parameter verbosity:value".
+
+          The following are reserved parameters:
+          - build: Associated with -b/--build parameter.
+          - color: Associated with +d/++dark, +l/++light, and +n/++no_color parameters.
+          - data: Associated with -D/--data parameter.
+          - define: Associated with -d/--define parameter.
+          - fakefile: Associated with -f/--fakefile parameter.
+          - mode: Associated with -m/--mode parameter and possibly with the build settings default mode "modes_default".
+          - process: Associated with -p/--process parameter.
+          - settings: Associated with -s/--settings parameter.
+          - sources: Associated with -S/--sources parameter.
+          - verbosity: Associated with +q/++quiet, +N/++normal, +V/++verbose, and +D/++debug parameters.
+          - work: Associated with -w/--work parameter.
+
         - succeed\:
           Test if the previous section operation succeeded.
 
index edd73479ef23863ec24b322c207508ec112d7446..71e7c44c1b1df7ee5889b6ee9b8bc47d8c64f3c0 100644 (file)
@@ -84,15 +84,16 @@ Fakefile Specification:
   - >=: Two or more Content.
   - <=: Two or more Content.
   - <>: Two or more Content.
-  - defined: First Content is either "parameter" or "environment". Second or more Content are valid names, such that for "parameter" it is a valid IKI name and for "environment" it is a valid environment variable name.
+  - define: One or more Content are valid environment variable name.
   - exists: One or more Content representing the files to check the existence of.
   - failure: has no other Content.
   - group: First Content is the name of a group. Second or more Content are paths to files.
   - is: First Content is a list of "block", "character", "no_dereference", "directory", "fifo", "link", "regular" , or "socket" followed by "for" and then the Remaining Content that are paths to files.
   - mode: First Content is either "has", "is", or "no_dereference". Second Content is a valid file mode. Third or more Content are paths to files.
   - no_dereference: A non-condition inserted before any of "exists", "is", and "mode" (then the second Content is the actual condition followed by any Content associated with that condition).
-  - not: First Content is one of "defined", "exists", "group", "is", "mode", "no_dereference", or "owner" and all remaining Content are based on the First Content's "if" Section Operation Content rules.
+  - not: First Content is one of "define", "exists", "group", "is", "mode", "no_dereference", "owner", or "parameter" and all remaining Content are based on the First Content's "if" Section Operation Content rules.
   - owner: First Content is the name of an owner. Second or more Content are paths to files.
+  - parameter: One or more Content are valid IKI names.
   - success: has no other Content.
 
   The "if" Section Operation conditions and numbers\:
@@ -113,6 +114,6 @@ Fakefile Specification:
     - >=
     - <=
 
-  The "if" Section Operation condition "defined"\:
+  The "if" Section Operation condition "parameter"\:
     The following reserved words are available for parameter names: build, color, data, define, fakefile, mode, process, settings, sources, verbosity, and work.
     Each of the reserved words supports having ":option" and ":value" appended, such as: "work:value".