Corrected Makefile.rkt
This commit is contained in:
+39
-35
@@ -1,46 +1,50 @@
|
|||||||
#lang racket-makefile
|
#lang racket
|
||||||
|
|
||||||
(require git
|
(require git-cli
|
||||||
|
racket-makefile
|
||||||
package-zipper)
|
package-zipper)
|
||||||
|
|
||||||
(target all
|
|
||||||
(displayln "main branch: use (make clean) or (make package)"))
|
|
||||||
|
|
||||||
(target clean
|
(makefile 'racket-audio-native-libs
|
||||||
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "." #px"([.]bak|~)$" #:recursive #t))
|
|
||||||
(for-each (λ (d) (displayln d) (rm-rf d)) (list-dirs "." #px"(compiled|doc)$" #:recursive #t))
|
|
||||||
(when (directory-exists? "scrbl")
|
|
||||||
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "scrbl" #px"[.](css|js|html)$")))
|
|
||||||
)
|
|
||||||
|
|
||||||
(target package
|
(target 'all
|
||||||
(deps clean)
|
(displayln "main branch: use (make clean) or (make package)"))
|
||||||
(zip-package))
|
|
||||||
|
|
||||||
(target housekeeping
|
(target 'clean
|
||||||
(displayln "Committing changes for:")
|
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "." #px"([.]bak|~)$" #:recursive #t))
|
||||||
(let ((changes (git 'status)))
|
(for-each (λ (d) (displayln d) (rm-rf d)) (list-dirs "." #px"(compiled|doc)$" #:recursive #t))
|
||||||
(when (> (length changes) 0)
|
(when (directory-exists? "scrbl")
|
||||||
(dgit 'status)
|
(for-each (λ (f) (displayln f) (rm-f f)) (list-files "scrbl" #px"[.](css|js|html)$")))
|
||||||
(displayln "Adding...")
|
)
|
||||||
(dgit 'add '-A)
|
|
||||||
(displayln "Committing...")
|
|
||||||
(dgit 'commit (git-prompt))
|
|
||||||
(displayln "Pushing...")
|
|
||||||
(dgit 'push)))
|
|
||||||
)
|
|
||||||
|
|
||||||
(target windows
|
(target 'package
|
||||||
(deps housekeeping)
|
(deps 'clean)
|
||||||
(displayln "Switching to x86_64-win32")
|
(zip-package))
|
||||||
(dgit 'switch "x86_64-win32"))
|
|
||||||
|
|
||||||
(target linux-x86_64
|
(target 'housekeeping
|
||||||
(deps housekeeping)
|
(displayln "Committing changes for:")
|
||||||
(displayln "Switching to x86_64-linux")
|
(let ((changes (git 'status)))
|
||||||
(dgit 'switch "x86_64-linux"))
|
(when (> (length changes) 0)
|
||||||
|
(git 'status)
|
||||||
|
(displayln "Adding...")
|
||||||
|
(git 'add '-A)
|
||||||
|
(displayln "Committing...")
|
||||||
|
(git 'commit)
|
||||||
|
(displayln "Pushing...")
|
||||||
|
(git 'push)))
|
||||||
|
)
|
||||||
|
|
||||||
(target linux
|
(target 'windows
|
||||||
(deps linux-x86_64))
|
(deps 'housekeeping)
|
||||||
|
(displayln "Switching to x86_64-win32")
|
||||||
|
(git 'switch "x86_64-win32"))
|
||||||
|
|
||||||
|
(target 'linux-x86_64
|
||||||
|
(deps 'housekeeping)
|
||||||
|
(displayln "Switching to x86_64-linux")
|
||||||
|
(git 'switch "x86_64-linux"))
|
||||||
|
|
||||||
|
(target 'linux
|
||||||
|
(deps 'linux-x86_64))
|
||||||
|
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user