diff --git a/.github/workflows/tools-buildtest.yml b/.github/workflows/tools-buildtest.yml index edc6062493..694cc6d0a7 100644 --- a/.github/workflows/tools-buildtest.yml +++ b/.github/workflows/tools-buildtest.yml @@ -23,6 +23,38 @@ jobs: uses: aabadie/riot-action@v1 with: cmd: make -C dist/tools/mosquitto_rsmb + - name: Build bossa-1.8 standalone + uses: aabadie/riot-action@v1 + with: + cmd: make -C dist/tools/bossa-1.8 + - name: Build bossa-1.9 standalone + uses: aabadie/riot-action@v1 + with: + cmd: make -C dist/tools/bossa-1.9 + - name: Build bossa-nrf52 standalone + uses: aabadie/riot-action@v1 + with: + cmd: make -C dist/tools/bossa-nrf52 + - name: Build edbg standalone + uses: aabadie/riot-action@v1 + with: + cmd: make -C dist/tools/edbg + - name: Build pic32prog standalone + uses: aabadie/riot-action@v1 + with: + cmd: make -C dist/tools/pic32prog + - name: Build setsid standalone + uses: aabadie/riot-action@v1 + with: + cmd: make -C dist/tools/setsid + - name: Build ethos + uses: aabadie/riot-action@v1 + with: + cmd: make -C dist/tools/ethos + - name: Build uhcpd + uses: aabadie/riot-action@v1 + with: + cmd: make -C dist/tools/uhcpd - name: Build stm32 spi_divtable uses: aabadie/riot-action@v1 with: diff --git a/dist/tools/bossa-1.8/Makefile b/dist/tools/bossa-1.8/Makefile index a2b4c42dfb..f5ab6b65c5 100644 --- a/dist/tools/bossa-1.8/Makefile +++ b/dist/tools/bossa-1.8/Makefile @@ -3,4 +3,9 @@ PKG_URL = https://github.com/shumatech/BOSSA PKG_VERSION = 26154375695f345491bba158d57177aa231d6765 PKG_LICENSE = BSD-3-Clause +# manually set some RIOT env vars, so this Makefile can be called stand-alone +RIOTBASE ?= $(CURDIR)/../../.. +RIOTTOOLS ?= $(CURDIR)/.. +RIOTMAKE ?= $(RIOTBASE)/makefiles + include $(RIOTMAKE)/tools/bossa-build.inc.mk diff --git a/dist/tools/bossa-1.9/Makefile b/dist/tools/bossa-1.9/Makefile index a63be38675..cfff2a3c4b 100644 --- a/dist/tools/bossa-1.9/Makefile +++ b/dist/tools/bossa-1.9/Makefile @@ -3,4 +3,9 @@ PKG_URL = https://github.com/shumatech/BOSSA PKG_VERSION = 1.9.1 PKG_LICENSE = BSD-3-Clause +# manually set some RIOT env vars, so this Makefile can be called stand-alone +RIOTBASE ?= $(CURDIR)/../../.. +RIOTTOOLS ?= $(CURDIR)/.. +RIOTMAKE ?= $(RIOTBASE)/makefiles + include $(RIOTMAKE)/tools/bossa-build.inc.mk diff --git a/dist/tools/bossa-nrf52/Makefile b/dist/tools/bossa-nrf52/Makefile index 02ef5469e9..effbe5c495 100644 --- a/dist/tools/bossa-nrf52/Makefile +++ b/dist/tools/bossa-nrf52/Makefile @@ -3,4 +3,9 @@ PKG_URL = https://github.com/arduino/BOSSA PKG_VERSION = 52e0a4a28721296e64083de7780b30580e0fad16 PKG_LICENSE = BSD-3-Clause +# manually set some RIOT env vars, so this Makefile can be called stand-alone +RIOTBASE ?= $(CURDIR)/../../.. +RIOTTOOLS ?= $(CURDIR)/.. +RIOTMAKE ?= $(RIOTBASE)/makefiles + include $(RIOTMAKE)/tools/bossa-build.inc.mk diff --git a/dist/tools/edbg/Makefile b/dist/tools/edbg/Makefile index 2615814891..a5e15e48fe 100644 --- a/dist/tools/edbg/Makefile +++ b/dist/tools/edbg/Makefile @@ -3,14 +3,23 @@ PKG_URL=https://github.com/ataradov/edbg PKG_VERSION=99d15460fcff723f73b16c29c8ca14bff4b33b20 PKG_LICENSE=BSD-3-Clause +# manually set some RIOT env vars, so this Makefile can be called stand-alone +RIOTBASE ?= $(CURDIR)/../../.. +RIOTTOOLS ?= $(CURDIR)/.. + PKG_SOURCE_DIR = $(CURDIR)/bin PKG_BUILD_OUT_OF_SOURCE = 0 include $(RIOTBASE)/pkg/pkg.mk -all: +all: $(CURDIR)/edbg + +$(CURDIR)/edbg: # Start edbg build in a clean environment, so variables set by RIOT's build process # for cross compiling a specific target platform are reset and edbg can # be built cleanly for the native platform. env -i PATH="$(PATH)" TERM="$(TERM)" "$(MAKE)" -C "$(PKG_BUILD_DIR)" mv $(PKG_BUILD_DIR)/edbg . + +clean:: + rm -f $(CURDIR)/edbg diff --git a/dist/tools/pic32prog/Makefile b/dist/tools/pic32prog/Makefile index a4ada7dd2d..45673fb712 100644 --- a/dist/tools/pic32prog/Makefile +++ b/dist/tools/pic32prog/Makefile @@ -2,7 +2,10 @@ PKG_NAME = pic32prog PKG_URL = https://github.com/sergev/pic32prog PKG_VERSION = b9f8db3b352804392b02b42475fc42874ac8bf04 PKG_LICENSE = GPL-2 -PKG_BUILDDIR = bin + +# manually set some RIOT env vars, so this Makefile can be called stand-alone +RIOTBASE ?= $(CURDIR)/../../.. +RIOTTOOLS ?= $(CURDIR)/.. PKG_SOURCE_DIR = $(CURDIR)/bin PKG_BUILD_OUT_OF_SOURCE = 0 @@ -12,10 +15,12 @@ include $(RIOTBASE)/pkg/pkg.mk # # sudo apt-get install libusb-dev libusb-1.0-0-dev libudev-dev -all: +all: $(CURDIR)/pic32prog + +$(CURDIR)/pic32prog: @echo "[INFO] compiling pic32prog from source now" @env -i PATH=$(PATH) TERM=$(TERM) $(MAKE) -C $(PKG_BUILD_DIR) - @mv $(PKG_BUILD_DIR)/pic32prog pic32prog + @mv $(PKG_BUILD_DIR)/pic32prog $(CURDIR)/pic32prog -distclean:: - @rm -f pic32prog +clean:: + rm -f $(CURDIR)/pic32prog diff --git a/dist/tools/setsid/Makefile b/dist/tools/setsid/Makefile index ef40543033..8b7e126c7d 100644 --- a/dist/tools/setsid/Makefile +++ b/dist/tools/setsid/Makefile @@ -2,16 +2,21 @@ PKG_NAME = setsid PKG_URL = https://github.com/tzvetkoff/setsid-macosx PKG_VERSION = e5b851df41591021baf5cf88d4e41572baf8e08b PKG_LICENSE = BSD-2-Clause -PKG_BUILDDIR = $(CURDIR)/bin + +# manually set some RIOT env vars, so this Makefile can be called stand-alone +RIOTBASE ?= $(CURDIR)/../../.. +RIOTTOOLS ?= $(CURDIR)/.. PKG_SOURCE_DIR = $(CURDIR)/bin PKG_BUILD_OUT_OF_SOURCE = 0 include $(RIOTBASE)/pkg/pkg.mk -all: +all: $(CURDIR)/setsid + +$(CURDIR)/setsid: @echo "[INFO] compiling setsid from source now" - $(MAKE) BINDIR=$(PKG_BUILDDIR) -C $(PKG_SOURCE_DIR) + $(MAKE) BINDIR=$(PKG_BUILD_DIR) -C $(PKG_SOURCE_DIR) @mv $(PKG_SOURCE_DIR)/setsid $(CURDIR)/setsid -distclean:: - @rm -f $(CURDIR)/setsid +clean:: + rm -f $(CURDIR)/setsid diff --git a/pkg/pkg.mk b/pkg/pkg.mk index a97a39dc3d..da306c76ce 100644 --- a/pkg/pkg.mk +++ b/pkg/pkg.mk @@ -126,17 +126,14 @@ ifeq ($(PKG_SOURCE_DIR),$(PKG_BUILD_DIR)) # This is the case for packages that are built within their source directory # e.g. micropython and openthread clean:: - @-test -d $(PKG_SOURCE_DIR) && $(GIT_IN_PKG) clean $(GIT_QUIET) -xdff - -distclean:: - rm -rf $(PKG_SOURCE_DIR) + @-test -d $(PKG_SOURCE_DIR) && $(GIT_IN_PKG) clean -xdff '**' -e $(PKG_STATE:$(PKG_SOURCE_DIR)/%='%*') else clean:: rm -rf $(PKG_BUILD_DIR) +endif distclean:: clean rm -rf $(PKG_SOURCE_DIR) -endif # Dependencies to 'patches' -include $(PKG_PATCHED).d