]> git.earman.xyz Git - sensor-watch.git/commitdiff
Update Makefile to conditionally require BOARD and DISPLAY only for non-clean targets
authorDaniel Bergman <danber@gmail.com>
Thu, 26 Jun 2025 18:48:03 +0000 (20:48 +0200)
committerDaniel Bergman <danber@gmail.com>
Thu, 26 Jun 2025 18:48:03 +0000 (20:48 +0200)
Makefile

index c4a9c20ec3d069f6553bb25e02524973b317fe43..94b4c129bc7c3d7a2fa95b9630e8cbabac4210f4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,8 @@ define n
 
 endef
 
+# Only require BOARD and DISPLAY for non-clean targets
+ifeq (,$(filter clean,$(MAKECMDGOALS)))
 ifndef BOARD
   $(error Build failed: BOARD not defined. Use one of the four options below, depending on your hardware:$n$n    make BOARD=sensorwatch_red DISPLAY=display_type$n    make BOARD=sensorwatch_blue DISPLAY=display_type$n    make BOARD=sensorwatch_pro DISPLAY=display_type$n$n)
 endif
@@ -41,6 +43,7 @@ else
     $(error Build failed: invalid DISPLAY type. Use one of the options below, depending on your hardware:$n$n    make BOARD=board_type DISPLAY=classic$n    make BOARD=board_type DISPLAY=custom$n$n)
   endif
 endif
+endif
 
 ifdef NOSLEEP
     DEFINES += -DMOVEMENT_LOW_ENERGY_MODE_FORBIDDEN