[riot-notifications] [RIOT-OS/RIOT] makefile/util: Add a function for checking that a string is not empty. (#10439)

Juan I Carrano notifications at github.com
Tue Nov 20 12:36:56 CET 2018


### Contribution description

A call to `$(call ensure_value,x,y)` will fail with message y if x is empty, and otherwise return x. This can be useto write more compact makefiles, while still producing friendly error messages.

### Testing procedure

I should provide an automated test for this, in the meantime:

```
$ cd makefiles/util
$ make -f test-checks.mk test-ensure_value
test-ensure_value
$ make -f test-checks.mk test-ensure_value-negative
test-checks.mk:7: *** "This should fail".  Stop.
```

### Issues/PRs references

Split from #10342.

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/10439

-- Commit Summary --

  * makefile/util: Add a function for checking that a string is not empty.

-- File Changes --

    A makefiles/util/checks.mk (11)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/10439.patch
https://github.com/RIOT-OS/RIOT/pull/10439.diff

-- 
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/10439
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20181120/7147182d/attachment-0001.html>


More information about the notifications mailing list