Added structure CONFIGURE to access values from ./configure.
This commit is contained in:
parent
bcf88c05d0
commit
dfa05a0c5c
17
Makefile.in
17
Makefile.in
|
@ -30,6 +30,7 @@ incdir = @includedir@
|
|||
manext = 1
|
||||
mandir = @mandir@/man$(manext)
|
||||
lib_dirs_list = @lib_dirs_list@
|
||||
host = @host@
|
||||
### End of `configure' section###
|
||||
|
||||
htmldir = $(libdir)/scsh/doc/scsh-manual/html
|
||||
|
@ -772,6 +773,7 @@ $(CIG).image: $(IMAGE) $(VM) $(srcdir)/cig/cig.scm $(srcdir)/cig/libcig.scm
|
|||
scsh: scsh/scsh scsh/scsh.image
|
||||
|
||||
SCHEME =scsh/awk.scm \
|
||||
scsh/configure.scm \
|
||||
scsh/defrec.scm \
|
||||
scsh/endian.scm \
|
||||
scsh/enumconst.scm \
|
||||
|
@ -919,4 +921,17 @@ clean-scsh:
|
|||
$(RM) scsh/*.image
|
||||
$(RM) $(LIBSCSHVM) $(LIBSCSH) scsh/scsh$(EXEEXT)
|
||||
|
||||
|
||||
scsh/configure.scm: scsh/configure.scm.in
|
||||
sed -e "s|@scsh_host@|$(host)|g" \
|
||||
-e "s|@scsh_prefix@|$(prefix)|g" \
|
||||
-e "s|@scsh_exec_prefix@|$(exec_prefix)|g" \
|
||||
-e "s|@scsh_bindir@|$(bindir)|g" \
|
||||
-e "s|@scsh_libdir@|$(libdir)|g" \
|
||||
-e "s|@scsh_includedir@|$(incdir)|g" \
|
||||
-e "s|@scsh_mandir@|$(mandir)|g" \
|
||||
-e "s|@scsh_lib_dirs_list@|$(lib_dirs_list)|g" \
|
||||
-e "s|@scsh_LIBS@|$(LIBS)|g" \
|
||||
-e "s|@scsh_DEFS@|$(DEFS)|g" \
|
||||
-e "s|@scsh_CFLAGS@|$(CFLAGS)|g" \
|
||||
-e "s|@scsh_CPPFLAGS@|$(CPPFLAGS)|g" \
|
||||
-e "s|@scsh_LDFLAGS@|$(LDFLAGS)|g" $< > $@
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
(define (host) "@scsh_host@")
|
||||
|
||||
(define (prefix) "@scsh_prefix@")
|
||||
|
||||
(define (exec-prefix) "@scsh_exec_prefix@")
|
||||
|
||||
(define (bin-dir) "@scsh_bindir@")
|
||||
|
||||
(define (lib-dir) "@scsh_libdir@")
|
||||
|
||||
(define (include-dir) "@scsh_includedir@")
|
||||
|
||||
(define (man-dir) "@scsh_mandir@")
|
||||
|
||||
(define (lib-dir-list) (quote @scsh_lib_dirs_list@))
|
||||
|
||||
(define (libs) "@scsh_LIBS@")
|
||||
|
||||
(define (defs) "@scsh_DEFS@")
|
||||
|
||||
(define (cflags) "@scsh_CFLAGS@")
|
||||
|
||||
(define (cppflags) "@scsh_CPPFLAGS@")
|
||||
|
||||
(define (ldflags) "@scsh_LDFLAGS@")
|
||||
|
||||
(define (linker-flags)
|
||||
(string-join (list "-L" (lib-dir) (libs) "-lscsh") " "))
|
||||
|
||||
(define (compiler-flags)
|
||||
(string-join (list "-I" (include-dir) (defs))))
|
|
@ -1188,3 +1188,19 @@
|
|||
md5-digest-for-string
|
||||
md5-digest-for-port))
|
||||
|
||||
(define-interface configure-interface
|
||||
(export host
|
||||
prefix
|
||||
exec-prefix
|
||||
bin-dir
|
||||
lib-dir
|
||||
include-dir
|
||||
man-dir
|
||||
lib-dir-list
|
||||
libs
|
||||
defs
|
||||
cflags
|
||||
cppflags
|
||||
ldflags
|
||||
linker-flags
|
||||
compiler-flags))
|
|
@ -457,6 +457,7 @@
|
|||
char-predicates-interface; Urk -- Some of this is R5RS!
|
||||
dot-locking-interface
|
||||
md5-interface
|
||||
configure-interface
|
||||
)
|
||||
|
||||
(open structure-refs
|
||||
|
@ -472,6 +473,7 @@
|
|||
char-predicates-lib ; Urk -- Some of this is R5RS!
|
||||
dot-locking
|
||||
md5
|
||||
configure
|
||||
scheme)
|
||||
|
||||
(access scsh-top-package)
|
||||
|
@ -584,3 +586,8 @@
|
|||
(files md5))
|
||||
|
||||
(define srfi-19 (make-srfi-19 scheme-with-scsh))
|
||||
|
||||
(define-structure configure configure-interface
|
||||
(open scheme
|
||||
(subset srfi-13 (string-join)))
|
||||
(files configure))
|
Loading…
Reference in New Issue