[riot-notifications] [RIOT-OS/RIOT] board: remove exporting PORT_LINUX|PORT_DARWIN (#11619)

Gaƫtan Harter notifications at github.com
Mon Jun 3 16:39:43 CEST 2019


### Contribution description

PORT_LINUX and PORT_DARWIN are evaluated by
`makefiles/tools/serial.inc.mk` and some boards Makefile.include.
Their value does not need to be exported.

This also globally removes the line saying that the exports are needed
for flash rule.

Updated the `buildsystem_sanity_check` script to prevent re-exporting these in the future.

### Review procedure

These variables are only used in included makefiles:

```
git grep -e '$(PORT_LINUX)' -e '$(PORT_DARWIN)' -e '${PORT_LINUX}' -e '${PORT_DARWIN}'
boards/common/remote/Makefile.include:    PORT_BSL ?= $(PORT_LINUX)
boards/common/remote/Makefile.include:    PORT_BSL ?= $(PORT_DARWIN)
boards/openmote-b/Makefile.include:    PORT_BSL ?= $(PORT_LINUX)
boards/openmote-b/Makefile.include:    PORT_BSL ?= $(PORT_DARWIN)
makefiles/tools/serial.inc.mk:  PORT ?= $(PORT_LINUX)
makefiles/tools/serial.inc.mk:  PORT ?= $(PORT_DARWIN)
```

When looking in `boards/openmote-b` and `boards/common/remote` we see that it should even use `$(PORT)` there instead, but it is another fix.

### Testing procedure

The `PORT` is still correctly defined for Linux, for `osx` you need to have a board to test it.

The output is the same with this PR and in master.

```
BOARDS="arduino-leonardo feather-m0 sensebox_samd21 sodaq-autonomo sodaq-explorer sodaq-one sodaq-sara-aff arduino-mkr1000 arduino-mkrfox1200 arduino-mkrzero"
for board in ${BOARDS}; do echo ${board}; BOARD=${board} make --no-print-directory -C examples/hello-world/ info-debug-variable-PORT OS=Linux;  done
arduino-leonardo
/dev/ttyUSB0
feather-m0
/dev/ttyACM0
sensebox_samd21
/dev/ttyACM0
sodaq-autonomo
/dev/ttyACM0
sodaq-explorer
/dev/ttyACM0
sodaq-one
/dev/ttyACM0
sodaq-sara-aff
/dev/ttyACM0
arduino-mkr1000
/dev/ttyACM0
arduino-mkrfox1200
/dev/ttyACM0
arduino-mkrzero
/dev/ttyACM0
```

### Issues/PRs references

Removal of exports https://github.com/RIOT-OS/RIOT/issues/10850
Mentioned in https://github.com/RIOT-OS/RIOT/pull/10440
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * board: remove exporting PORT_LINUX|PORT_DARWIN
  * dist/tools/buildsystem_sanity_check/: check no PORT_ exports

-- File Changes --

    M boards/arduino-leonardo/Makefile.include (1)
    M boards/common/arduino-mkr/Makefile.include (5)
    M boards/feather-m0/Makefile.include (5)
    M boards/sensebox_samd21/Makefile.include (5)
    M boards/sodaq-autonomo/Makefile.include (5)
    M boards/sodaq-explorer/Makefile.include (5)
    M boards/sodaq-one/Makefile.include (5)
    M boards/sodaq-sara-aff/Makefile.include (5)
    M dist/tools/buildsystem_sanity_check/check.sh (1)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11619.patch
https://github.com/RIOT-OS/RIOT/pull/11619.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/11619
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190603/4d1dd611/attachment.html>


More information about the notifications mailing list