Skip to content

board: remove exporting PORT_LINUX|PORT_DARWIN#11619

Merged
cladmi merged 2 commits intoRIOT-OS:masterfrom
cladmi:pr/make/exports/port_linux_darwin
Jun 4, 2019
Merged

board: remove exporting PORT_LINUX|PORT_DARWIN#11619
cladmi merged 2 commits intoRIOT-OS:masterfrom
cladmi:pr/make/exports/port_linux_darwin

Conversation

@cladmi
Copy link
Copy Markdown
Contributor

@cladmi cladmi commented Jun 3, 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 #10850
Mentioned in #10440

cladmi added 2 commits June 3, 2019 16:21
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.
@cladmi cladmi added Area: build system Area: Build system Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation Area: tools Area: Supplementary tools Area: boards Area: Board ports labels Jun 3, 2019
@cladmi cladmi added this to the Release 2019.07 milestone Jun 3, 2019
@cladmi cladmi requested a review from jcarrano June 3, 2019 14:39
@jcarrano jcarrano added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 3, 2019
@cladmi cladmi merged commit eb3398d into RIOT-OS:master Jun 4, 2019
@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented Jun 4, 2019

All green.

@cladmi cladmi deleted the pr/make/exports/port_linux_darwin branch June 4, 2019 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: boards Area: Board ports Area: build system Area: Build system Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants