Commits

Moritz Heidkamp  committed 482bd76

chicken-build: run `make spotless' before each build and after building boot chicken; add -n/--no-spotless to disable the initial `make spotless' run.

  • Participants
  • Parent commits 91d86dc

Comments (0)

Files changed (1)

File chicken-build.scm

   -c, --chicken CHICKEN_NAME
     use $CHICKENS/CHICKEN_NAME/bin/chicken for compiling
 
+  -n, --no-spotless
+    don't run make spotless before building
+
   -d, --debug
     make a debug build
 
 (define debug-build? #f)
 (define chicken-name #f)
 (define chicken-bin #f)
+(define spotless? #t)
 
 (when (null? (command-line-arguments))
   (usage fail))
     (((or "-d" "--debug") rest ...)
      (set! debug-build? #t)
      (loop rest))
+    (((or "-n" "--no-spotless") rest ...)
+     (set! spotless? #f)
+     (loop rest))
     (((or "-c" "--chicken") rest ...)
      (when (null? rest)
        (printf-error "Missing argument for -c~%")
       (set! purge? #t)
       (exit)))
 
+(when spotless?
+  (run "make" "spotless"))
+
 (when build-boot-chicken?
   (run "make" "boot-chicken")
-  (setenv "CHICKEN" "./chicken-boot"))
+  (setenv "CHICKEN" "./chicken-boot")
+  (run "make" "spotless"))
 
 (when chicken-bin
   (setenv "CHICKEN" chicken-bin))