greatscottgadgets / apollo

microcontroller-based FPGA / JTAG programmer
BSD 3-Clause "New" or "Revised" License
61 stars 29 forks source link

apollo: Fix clean makefile target #2

Closed gregdavill closed 3 years ago

gregdavill commented 3 years ago

A hopefully simple fix for #1

We can update BOARD after rules.mk is parsed to adjust the build directory to be removed when executing the clean target. Because other variables all use immediate assignment := they're not effected when we make this change to BOARD.

But due to the way make works, when it goes to actually execute the clean target on the second pass BOARD is now set to _build like we want.

ktemkin commented 3 years ago

Awesome; thanks!