[riot-notifications] [RIOT-OS/RIOT] makefiles: remove exports so that PORT is not evaluated if it's not needed. (#10440)

Gaƫtan Harter notifications at github.com
Tue Jun 4 15:05:06 CEST 2019


cladmi requested changes on this pull request.



>      endif
 
-    # Fallback PORT if no serial was specified or if the specified serial was not found
-    ifeq ($(PORT),)
-        ifeq ($(OS),Linux)
-          PORT := $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh))
-        else ifeq ($(OS),Darwin)
-          PORT := $(shell ls -1 /dev/tty.SLAB_USBtoUART* | head -n 1)
-        endif
-    endif
+    PORT_LINUX_EXACT = $(if $(PROGRAMMER_SERIAL),$(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh "^$(PROGRAMMER_SERIAL)$$")),)

This changes more than removing `exports`. Only remove the mention to `export` here I would say.

When changing this one, the files using the pattern will also need to be updated, and even put in common which was somehow done in https://github.com/RIOT-OS/RIOT/pull/7695 (with other issues)

```
git grep 'usb-serial/find-tty.sh'
boards/cc2538dk/Makefile.include:PORT_LINUX ?= $(word 2,$(shell $(RIOTTOOLS)/usb-serial/find-tty.sh '^$(PROGRAMMER_SERIAL)'))
boards/mulle/Makefile.include:      PORT := $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh '^$(DEBUG_ADAPTER_ID)$$'))
boards/mulle/Makefile.include:      PORT := $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh))
boards/pba-d-01-kw2x/Makefile.include:  SERIAL_TTY = $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh $(SERIAL)))
dist/tools/usb-serial/README.md:          PORT := $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh "^$(PROGRAMMER_SERIAL)$$"))
dist/tools/usb-serial/README.md:          PORT := $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh))
makefiles/boards/sam0.inc.mk:  SERIAL_TTY = $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh $(SERIAL)))
```

-- 
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/10440#pullrequestreview-245430744
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190604/b5e5af1a/attachment.html>


More information about the notifications mailing list