makefile: fix redundant path separators
This commit is contained in:
parent
e607ae09de
commit
2e3b16f77c
|
@ -4,6 +4,7 @@
|
|||
|
||||
(define same-up? #f)
|
||||
(define exec? #f)
|
||||
(define no-trailing-sep? #f)
|
||||
|
||||
(define-values (orig-p extras)
|
||||
(command-line
|
||||
|
@ -12,6 +13,8 @@
|
|||
(set! same-up? #t)]
|
||||
[("--exec") "Find executable path"
|
||||
(set! exec? #t)]
|
||||
[("--no-trailing-sep") "Avoid a trailing \"/\""
|
||||
(set! no-trailing-sep? #t)]
|
||||
#:args
|
||||
(path . extra)
|
||||
(values path extra)))
|
||||
|
@ -30,7 +33,13 @@
|
|||
p))
|
||||
orig-p))
|
||||
|
||||
(display (simplify-path (path->complete-path p)))])
|
||||
(define (fix-trailing p)
|
||||
(if no-trailing-sep?
|
||||
(let-values ([(base name dir?) (split-path p)])
|
||||
(build-path base name))
|
||||
p))
|
||||
|
||||
(display (fix-trailing (simplify-path (path->complete-path p))))])
|
||||
|
||||
;; In case there are extra arguments to an executable, preserve them
|
||||
(for ([e (in-list extras)])
|
||||
|
|
|
@ -57,8 +57,8 @@ SETUP_COMMON_BOOT = -l- setup $(SETUP_BOOT_MODE) $(srcdir)/../../setup-go.rkt $(
|
|||
ABS_BOOT = $(SETUP_COMMON_BOOT) ignored $(builddir)/ignored.d
|
||||
ABS_RACKET = "`$(RACKET) $(ABS_BOOT) $(srcdir)/../absify.rkt --exec $(RACKET)`"
|
||||
ABS_SCHEME_SRC = "`$(RACKET) $(ABS_BOOT) $(srcdir)/../absify.rkt $(SCHEME_SRC)`"
|
||||
ABS_SRCDIR = "`$(RACKET) $(ABS_BOOT) $(srcdir)/../absify.rkt $(srcdir)`"
|
||||
ABS_BUILDDIR = "`$(RACKET) $(ABS_BOOT) $(srcdir)/../absify.rkt $(builddir)`"
|
||||
ABS_SRCDIR = "`$(RACKET) $(ABS_BOOT) $(srcdir)/../absify.rkt --no-trailing-sep $(srcdir)`"
|
||||
ABS_BUILDDIR = "`$(RACKET) $(ABS_BOOT) $(srcdir)/../absify.rkt --no-trailing-sep $(builddir)`"
|
||||
|
||||
SETUP_BOOT = -O 'info@compiler/cm' $(SETUP_COMMON_BOOT)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user