[riot-notifications] [RIOT-OS/RIOT] build system: add fallback for RIOT_VERSION_CODE (#16895)

Martine Lenders notifications at github.com
Mon Sep 27 14:26:31 CEST 2021


@miri64 commented on this pull request.

Please squash.

> @@ -487,7 +488,7 @@ endif
 ifeq ($(RIOT_CI_BUILD),1)
     RIOT_VERSION ?= buildtest
     # set a dummy version number
-    RIOT_VERSION_CODE ?= RIOT_VERSION_NUM\(2042,5,23,0\)
+    RIOT_VERSION_CODE ?= ${RIOT_VERSION_DUMMY_CODE}

I don't know what exactly, but I think there is a syntactic difference between `${var}` and `$(var)` in Make. In other places we use `$(var)` (see `$(RIOT_CI_BUILD)` above e.g.) so even if there is no difference, this should be 

```suggestion
    RIOT_VERSION_CODE ?= $(RIOT_VERSION_DUMMY_CODE)
```

> @@ -530,7 +531,8 @@ endif
 
 # Generate machine readable RIOT VERSION macro
 RIOT_VERSION_CODE ?= $(shell echo ${RIOT_VERSION} | \
-                      sed -E 's/([0-9]+).([0-9]+).?([0-9]+)?.*/RIOT_VERSION_NUM\\\(\1,\2,0\3,${RIOT_EXTRAVERSION}\\\)/')
+                      sed -E 's/([0-9]+)\.([0-9]+)\.?([0-9]+)?.*/RIOT_VERSION_NUM\\\(\1,\2,0\3,${RIOT_EXTRAVERSION}\\\)/' | \
+                      grep RIOT_VERSION_NUM || echo "${RIOT_VERSION_DUMMY_CODE}")

```suggestion
                      grep RIOT_VERSION_NUM || echo "$(RIOT_VERSION_DUMMY_CODE)")
```

-- 
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/16895#pullrequestreview-764205092
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210927/5c098fc7/attachment-0001.htm>


More information about the notifications mailing list