[riot-notifications] [RIOT-OS/RIOT] makefiles/utils/variables: add functions to help managing variables (#11664)

Sebastian Meiling notifications at github.com
Tue Jun 11 09:16:13 CEST 2019


smlng requested changes on this pull request.

First, to me `memoized` sounds odd, but that's subjective and non-blocking - I would use `stored` or `memorized` instead.

Second, I get the following errors when building in docker:

```
Building application "tests_build_system_utils" for "native" with MCU "native".

"make" -C /data/riotbuild/riotbase/boards/native
"make" -C /data/riotbuild/riotbase/boards/native/drivers
"make" -C /data/riotbuild/riotbase/core
"make" -C /data/riotbuild/riotbase/cpu/native
"make" -C /data/riotbuild/riotbase/cpu/native/periph
"make" -C /data/riotbuild/riotbase/cpu/native/vfs
"make" -C /data/riotbuild/riotbase/drivers
"make" -C /data/riotbuild/riotbase/drivers/periph_common
"make" -C /data/riotbuild/riotbase/sys
"make" -C /data/riotbuild/riotbase/sys/auto_init
   text	   data	    bss	    dec	    hex	filename
  22770	    568	  47652	  70990	  1154e	/data/riotbuild/riotbase/tests/build_system_utils/bin/native/tests_build_system_utils.elf
bash: line 0: test: 1560237203N: integer expression expected
ERROR: 1560237203N >= 1560237203N
make[1]: *** [test-exported-variables] Error 1
Command '/Library/Developer/CommandLineTools/usr/bin/make -C /Volumes/devel/github/smlng/RIOT/makefiles/utils -f test-variables.mk test-exported-variables' failed
bash: line 0: test: 1560237203N: integer expression expected
ERROR: 1560237203N >= 1560237203N
make[1]: *** [test-exported-variables] Error 1
make: *** [test-exported-variables] Error 1
```

Third: see comments.

> @@ -0,0 +1,33 @@
+# Utilities to set variables and environment for targets
+# These functions should help replacing immediate evaluation and global 'export'
+
+
+# Evaluate a deferred variable only on once on its first usage

typo: double `on`, remove before `once`

> @@ -0,0 +1,33 @@
+# Utilities to set variables and environment for targets
+# These functions should help replacing immediate evaluation and global 'export'
+
+
+# Evaluate a deferred variable only on once on its first usage
+# Uses after will be as if it was an immediate evaluation
+# This can replace using `:=` by default
+#
+# The goal is to use it for `shell` commands
+#
+# variable = $(call memoized,<variable>,<value>)
+#
+# Parameters
+#  variable: name on the variable you set

typo: /on/of/

> @@ -0,0 +1,33 @@
+# Utilities to set variables and environment for targets
+# These functions should help replacing immediate evaluation and global 'export'
+
+
+# Evaluate a deferred variable only on once on its first usage
+# Uses after will be as if it was an immediate evaluation

wording: better to read: `# Uses after [that] will be as ...` 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11664#pullrequestreview-247983356
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190611/456f9a37/attachment-0001.html>


More information about the notifications mailing list