Removed rash integration again and backported raco call.
This commit is contained in:
+20
-27
@@ -1,37 +1,30 @@
|
||||
#lang racket-makefile
|
||||
#lang racket
|
||||
|
||||
;; Load only:
|
||||
;; racket -t Makefile.rkt
|
||||
;;
|
||||
;; Build the default target:
|
||||
;; racket -t Makefile.rkt -e "(make)"
|
||||
;;
|
||||
;; Clean and rebuild:
|
||||
;; racket -t Makefile.rkt -e "(make clean all)"
|
||||
;;
|
||||
;; In DrRacket, press Run and then enter (make), (make clean), etc.
|
||||
(require racket-makefile)
|
||||
|
||||
;; Functional use: press Run in DrRacket and use (make 'all), (make 'clean),
|
||||
;; or call a generated target procedure directly.
|
||||
|
||||
(define CC 'cc)
|
||||
(define CFLAGS '(-Wall -O2))
|
||||
|
||||
(default-target all)
|
||||
(phony all clean setup test)
|
||||
(makefile hello
|
||||
(default-target all)
|
||||
(phony all clean setup test)
|
||||
|
||||
(target all
|
||||
(deps "hello"))
|
||||
(target all
|
||||
(deps "hello"))
|
||||
|
||||
(target "hello"
|
||||
(deps "hello.c")
|
||||
(run `(,CC ,@CFLAGS -o $target $<)))
|
||||
(target "hello"
|
||||
(deps "hello.c")
|
||||
(run `(,CC ,@CFLAGS -o $target $<)))
|
||||
|
||||
(target clean
|
||||
(rm-f "hello")
|
||||
(rm-rf "compiled")
|
||||
(cleanup "scrbl" '("**.html" "**.js" "**.css")))
|
||||
(target clean
|
||||
(rm-f "hello")
|
||||
(rm-rf "compiled"))
|
||||
|
||||
(target setup
|
||||
(raco '(setup racket-makefile)))
|
||||
|
||||
(target setup
|
||||
(raco '(setup racket-makefile)))
|
||||
|
||||
(target test
|
||||
(raco '(test -p racket-makefile)))
|
||||
(target test
|
||||
(raco '(test -p racket-makefile))))
|
||||
|
||||
+15
-12
@@ -1,15 +1,18 @@
|
||||
#lang racket-makefile
|
||||
#lang racket
|
||||
|
||||
(default-target all)
|
||||
(phony all clean)
|
||||
(require racket-makefile)
|
||||
|
||||
(target all
|
||||
(displayln "use (make clean)"))
|
||||
(makefile cleanup-example
|
||||
(default-target all)
|
||||
(phony all clean)
|
||||
|
||||
(target clean
|
||||
(display "cleaning up...")
|
||||
(apply rm-rf
|
||||
(list-dirs "." #px"compiled$" #:recursive #t))
|
||||
(apply rm-f
|
||||
(list-files "." #px"(?i:([.]bak|~)$)" #:recursive #t))
|
||||
(displayln "done."))
|
||||
(target all
|
||||
(displayln "use (make 'clean)"))
|
||||
|
||||
(target clean
|
||||
(display "cleaning up...")
|
||||
(apply rm-rf
|
||||
(list-dirs "." #px"compiled$" #:recursive #t))
|
||||
(apply rm-f
|
||||
(list-files "." #px"(?i:([.]bak|~)$)" #:recursive #t))
|
||||
(displayln "done.")))
|
||||
|
||||
Reference in New Issue
Block a user