File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343; ; and dynamically load on-the-fly.
4444
4545; ; Extra cppflags needed when running in a build tree (not installed).
46- ; ; The headers are next to libgauche, so we derive the include path from it.
4746(define dyncomp-extra-cppflags
4847 (cond-expand
4948 [gauche.in-place
50- (let1 in-place-path
51- (sys-dirname ((with-module gauche.internal %gauche-libgauche-path)))
52- #" -I~|in-place-path|" )]
49+ (let1 top-srcdir-file
50+ (sys-normalize-pathname
51+ (build-path (sys-dirname (current-load-path)) " .." " .." " .."
52+ " top_srcdir" )
53+ :canonicalize #t )
54+ (unless (file-exists? top-srcdir-file)
55+ [error " Can't find top_srcdir file at:" top-srcdir-file])
56+ (let1 top-src-path
57+ (regexp-replace #/\s*$/ (file->string top-srcdir-file) " " )
58+ (unless (file-exists? (build-path top-src-path " src" " gauche.h" ))
59+ (error " Can't get path of gauche.h for in-place execution at:"
60+ top-src-path))
61+ #" -I~(build-path top-src-path \" src\" )" ))]
5362 [else #f ]))
5463
5564; ; Entry point
You can’t perform that action at this time.
0 commit comments