code for loading libscshyp.so

This commit is contained in:
eknauel 2003-11-25 22:09:52 +00:00
parent b1a13abc2e
commit 828c0c183a
2 changed files with 28 additions and 0 deletions

17
scheme/Makefile.am Normal file
View File

@ -0,0 +1,17 @@
scheme_SCRIPTS=load-yp.scm
nobase_scheme_SCRIPTS= \
yp.scm yp-interfaces.scm yp-packages.scm
EXTRA_DIST= $(scheme_SCRIPTS) $(nobase_scheme_SCRIPTS)
CLEANFILES= load-yp.scm
load-yp.scm: $(srcdir)/load-yp.scm.in
sed -e "s|@ypschemedir@|`pwd`/$(srcdir)|g" \
-e "s|@yplibsysdir@|`pwd`/../c/.libs|g" $< > $@
install-data-hook:
sed -e "s|@ypschemedir@|$(schemedir)|g" \
-e "s|@yplibsysdir@|$(libsysdir)|g" \
$(srcdir)/load-yp.scm.in \
> $(DESTDIR)/$(schemedir)/load-yp.scm

11
scheme/load-yp.scm.in Normal file
View File

@ -0,0 +1,11 @@
(user)
(load-package 'dynamic-externals)
(open 'dynamic-externals)
(open 'external-calls)
(run '(let ((initializer-name "scsh_yp_main")
(module-file "@yplibsysdir@/libscshyp.so"))
(dynamic-load module-file)
(call-external (get-external initializer-name))))
(config)
(load "@ypschemedir@/yp-interfaces.scm")
(load "@ypschemedir@/yp-packages.scm")