elk (3.0-10) unstable; urgency=low

* Updated debhelper build dependency to >>3.0.0.
  * Shared library handling:
    + Extended load.c:General_Load() to open shared libraries.
    + Makefiles now build shared libraries.
    + Stopped distributing .o files and replaced them with the .so shared
      libraries; built the Unix, X11, Xaw and Motif extensions.
    + The interpreter is no longer linked with -lgdbm, gdbm.so is instead.
  * Replaced standalone.o and module.o with their .a equivalents.
  * Made the 'debian/arch-config' sourcing errors non-fatal so that make
    distclean works in the src/ directory.
  * Changed SCM_DIR again, from /usr/share/elk/scm to /usr/share/elk, and
    ditto with OBJ_DIR, from /usr/lib/elk/obj to /usr/lib/elk.
  * Defaulted "garbage-collect-notify?" and "autoload-notify?" to #f.
 -- Samuel Hocevar <sam@zoy.org>  Tue,  1 Apr 2003 23:34:26 +0200


git-svn-id: svn://svn.zoy.org/elk/trunk@4 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
sam 2003-08-19 19:25:03 +00:00
parent d51c970c8d
commit 141bca2769
86 changed files with 509 additions and 209 deletions

View File

@ -59,7 +59,7 @@ Sun-4, SunOS 5.2 (Solaris 2.2)
A bug in Solaris 2.1 causes dlopen() to fail if more than A bug in Solaris 2.1 causes dlopen() to fail if more than
8 shared objects are loaded (which in turn causes the "load" 8 shared objects are loaded (which in turn causes the "load"
primitive of Elk to signal an error). This restriction doesn't primitive of Elk to signal an error). This restriction doesn't
exit in newer versions of Solaris 2. exist in newer versions of Solaris 2.
You can use the -v option of Elk to see the actual linker options You can use the -v option of Elk to see the actual linker options
when an object file is loaded. when an object file is loaded.

View File

@ -318,7 +318,7 @@ obj_ldflags=
# The linker flags used to link the interpreter. # The linker flags used to link the interpreter.
ldflags='-rdynamic -lm -ldl -lelf -lgdbm' ldflags='-rdynamic -lm -ldl -lelf'
# The lint flags. # The lint flags.

View File

@ -18,11 +18,11 @@ $install_dir/bin/scheme /usr/bin/scheme
$install_dir/include/ /usr/include/elk/ $install_dir/include/ /usr/include/elk/
$install_dir/runtime/scm/ /usr/share/elk/scm/ $install_dir/runtime/scm/ /usr/share/elk/
$install_dir/runtime/obj/ /usr/lib/elk/obj/ $install_dir/runtime/obj/ /usr/lib/elk/
$install_dir/lib/*.o /usr/lib/elk/*.o $install_dir/lib/*.o /usr/lib/elk/*.{o,so}
$install_dir/lib/{linkscheme,makedl} /usr/bin/{linkscheme,makedl} $install_dir/lib/{linkscheme,makedl} /usr/bin/{linkscheme,makedl}

18
debian/changelog vendored
View File

@ -1,3 +1,21 @@
elk (3.0-10) unstable; urgency=low
* Updated debhelper build dependency to >>3.0.0.
* Shared library handling:
+ Extended load.c:General_Load() to open shared libraries.
+ Makefiles now build shared libraries.
+ Stopped distributing .o files and replaced them with the .so shared
libraries; built the Unix, X11, Xaw and Motif extensions.
+ The interpreter is no longer linked with -lgdbm, gdbm.so is instead.
* Replaced standalone.o and module.o with their .a equivalents.
* Made the 'debian/arch-config' sourcing errors non-fatal so that make
distclean works in the src/ directory.
* Changed SCM_DIR again, from /usr/share/elk/scm to /usr/share/elk, and
ditto with OBJ_DIR, from /usr/lib/elk/obj to /usr/lib/elk.
* Defaulted "garbage-collect-notify?" and "autoload-notify?" to #f.
-- Samuel Hocevar <sam@zoy.org> Tue, 1 Apr 2003 23:34:26 +0200
elk (3.0-9) unstable; urgency=low elk (3.0-9) unstable; urgency=low
* New maintainer. * New maintainer.

7
debian/control vendored
View File

@ -2,7 +2,7 @@ Source: elk
Section: devel Section: devel
Priority: optional Priority: optional
Maintainer: Samuel Hocevar <sam@zoy.org> Maintainer: Samuel Hocevar <sam@zoy.org>
Build-Depends: debhelper (>> 2.0.0), libelfg0-dev, xlibs-dev, lesstif-dev, libgdbmg1-dev, libxaw7-dev Build-Depends: debhelper (>> 3.0.0), libelfg0-dev, xlibs-dev, lesstif-dev, libgdbmg1-dev, libxaw7-dev
Standards-Version: 3.5.9.0 Standards-Version: 3.5.9.0
Package: elk Package: elk
@ -17,6 +17,11 @@ Description: the Extension Language Kit, a Scheme implementation
language subsystem for applications written in C or C++. language subsystem for applications written in C or C++.
. .
Elk is also useful as a stand-alone Scheme implementation. Elk is also useful as a stand-alone Scheme implementation.
.
This package also contains several plugins shipped with Elk. They provide
hooks for Unix system calls, the X Window System, as well as the X Athena
Widgets and the Motif toolkits. Example scripts on how to use these plugins
are provided in the elkdoc package.
Package: elkdoc Package: elkdoc
Architecture: all Architecture: all

2
debian/elk.ini vendored
View File

@ -47,7 +47,7 @@
;;; the directory where any auxillary files to your Scheme ;;; the directory where any auxillary files to your Scheme
;;; implementation reside. ;;; implementation reside.
(define (implementation-vicinity) "/usr/share/elk/scm") (define (implementation-vicinity) "/usr/share/elk")
;;; (library-vicinity) should be defined to be the pathname of the ;;; (library-vicinity) should be defined to be the pathname of the
;;; directory where files of Scheme library functions reside. ;;; directory where files of Scheme library functions reside.

3
debian/rules vendored
View File

@ -54,7 +54,8 @@ install: build
mv $(CURDIR)/debian/elk/usr/bin/scheme \ mv $(CURDIR)/debian/elk/usr/bin/scheme \
$(CURDIR)/debian/elk/usr/bin/scheme-elk $(CURDIR)/debian/elk/usr/bin/scheme-elk
install -m 755 debian/scheme-warning-elk $(CURDIR)/debian/elk/usr/bin/ install -m 755 debian/scheme-warning-elk $(CURDIR)/debian/elk/usr/bin/
install -m 644 debian/elk.ini $(CURDIR)/debian/elk/usr/share/elk/scm install -m 644 debian/elk.ini $(CURDIR)/debian/elk/usr/share/elk
# dh_movefiles # dh_movefiles
# Build architecture-independent files here. # Build architecture-independent files here.

View File

@ -8,6 +8,6 @@ To do so, run (as root) the following command:
update-alternatives --install /usr/bin/scheme scheme /usr/bin/scheme-elk 20 \ update-alternatives --install /usr/bin/scheme scheme /usr/bin/scheme-elk 20 \
--slave /usr/share/man/man1/scheme.1.gz scheme.1.gz /usr/share/man/man1/elk.1.gz --slave /usr/share/man/man1/scheme.1.gz scheme.1.gz /usr/share/man/man1/elk.1.gz
Press any key to continue." Press ENTER to continue."
read foo read foo

View File

@ -3,7 +3,7 @@ MAKE=make
all: default all: default
Makefile.local: ../config/system ../config/site Makefile.local: build ../config/system ../config/site
$(SHELL) ./build $(SHELL) ./build
default: Makefile.local default: Makefile.local

View File

@ -55,6 +55,7 @@ def_cachectl_h=undef
def_syms_begin_with=undef def_syms_begin_with=undef
def_ansi_cpp=undef def_ansi_cpp=undef
def_can_load_obj=undef def_can_load_obj=undef
def_can_load_lib=undef
def_sigsegv_siginfo=undef def_sigsegv_siginfo=undef
def_sigsegv_sigcontext=undef def_sigsegv_sigcontext=undef
def_sigsegv_arg4=undef def_sigsegv_arg4=undef
@ -168,7 +169,8 @@ case _$load_obj in
_ld) def_use_ld=define; def_can_load_obj=define;; _ld) def_use_ld=define; def_can_load_obj=define;;
_rld) def_use_rld=define; def_can_load_obj=define;; _rld) def_use_rld=define; def_can_load_obj=define;;
_shl) def_use_shl=define; def_can_load_obj=define;; _shl) def_use_shl=define; def_can_load_obj=define;;
_dl) def_use_dlopen=define; def_can_load_obj=define;; _dl) def_use_dlopen=define; def_can_load_obj=define
def_can_load_lib=define;;
_) ;; _) ;;
*) echo Error in config file: *) echo Error in config file:
echo Invalid value for symbol load_obj: $load_obj; exit 1;; echo Invalid value for symbol load_obj: $load_obj; exit 1;;
@ -283,6 +285,7 @@ cat <<EOT >config.h
#$def_hp_shared_libs HPSHLIB #$def_hp_shared_libs HPSHLIB
#$def_debug_dump DEBUG_DUMP #$def_debug_dump DEBUG_DUMP
#$def_can_load_obj CAN_LOAD_OBJ #$def_can_load_obj CAN_LOAD_OBJ
#$def_can_load_lib CAN_LOAD_LIB
#$def_use_ld USE_LD #$def_use_ld USE_LD
#$def_use_rld USE_RLD #$def_use_rld USE_RLD
#$def_use_shl USE_SHL #$def_use_shl USE_SHL
@ -321,8 +324,8 @@ $def_bcopy
$def_bzero $def_bzero
$def_bcmp $def_bcmp
#define AOUT_H $aout_h #define AOUT_H $aout_h
#define SCM_DIR "$final_dir/share/elk/scm" #define SCM_DIR "$final_dir/share/elk"
#define OBJ_DIR "$final_dir/lib/elk/obj" #define OBJ_DIR "$final_dir/lib/elk"
#define HEAP_SIZE $default_heap_size #define HEAP_SIZE $default_heap_size
#define FIND_AOUT defined(USE_LD) || defined(CAN_DUMP)\\ #define FIND_AOUT defined(USE_LD) || defined(CAN_DUMP)\\
|| defined(INIT_OBJECTS) || defined(INIT_OBJECTS)

View File

@ -3,7 +3,7 @@
*/ */
typedef struct { typedef struct {
unsigned long data; unsigned long int data;
int tag; int tag;
} Object; } Object;
@ -22,8 +22,8 @@ typedef struct {
#define CHAR(x) ((int)(x).data) #define CHAR(x) ((int)(x).data)
#define POINTER(x) ((x).data) #define POINTER(x) ((x).data)
#define SETPOINTER(x,p) ((x).data = (unsigned long)(p)) #define SETPOINTER(x,p) ((x).data = (unsigned long int)(p))
#define SET(x,t,p) ((x).tag = (int)t << 1, (x).data = (unsigned long)(p)) #define SET(x,t,p) ((x).tag = (int)t << 1, (x).data = (unsigned long int)(p))
#define ISCONST(x) ((x).tag & CONSTBIT) #define ISCONST(x) ((x).tag & CONSTBIT)
#define SETCONST(x) ((x).tag |= CONSTBIT) #define SETCONST(x) ((x).tag |= CONSTBIT)
@ -37,10 +37,10 @@ typedef struct {
#ifdef GENERATIONAL_GC #ifdef GENERATIONAL_GC
typedef int gcspace_t; /* type used for space and type arrays */ typedef int gcspace_t; /* type for space and type arrays */
typedef unsigned long gcptr_t; /* type used for pointers */ typedef unsigned long int gcptr_t; /* type for pointers */
typedef unsigned long pageno_t; /* type used for page numbers */ typedef unsigned long int pageno_t; /* type for page numbers */
typedef unsigned long addrarith_t; /* type used for address arithmetic */ typedef unsigned long int addrarith_t; /* type for address arithmetic */
extern gcspace_t *space; extern gcspace_t *space;
extern gcspace_t current_space; extern gcspace_t current_space;
@ -118,8 +118,8 @@ typedef unsigned short gran_t; /* Granularity of bignums */
struct S_Bignum { struct S_Bignum {
Object minusp; Object minusp;
unsigned size; /* Number of ushorts allocated */ unsigned int size; /* Number of ushorts allocated */
unsigned usize; /* Number of ushorts actually used */ unsigned int usize; /* Number of ushorts actually used */
gran_t data[1]; /* Data, lsw first */ gran_t data[1]; /* Data, lsw first */
}; };
@ -189,8 +189,8 @@ typedef struct gcnode {
typedef struct mem_node { typedef struct mem_node {
struct mem_node *next; struct mem_node *next;
unsigned len; unsigned int len;
unsigned long refcnt; unsigned long int refcnt;
} MEM_NODE; } MEM_NODE;
#if defined(vax) || defined(__vax__) #if defined(vax) || defined(__vax__)
@ -207,13 +207,13 @@ struct S_Control {
Object gcsave; /* vector */ Object gcsave; /* vector */
WIND *firstwind, *lastwind; WIND *firstwind, *lastwind;
int tailcall; int tailcall;
unsigned delta; unsigned int delta;
#ifdef GENERATIONAL_GC #ifdef GENERATIONAL_GC
int reloc; int reloc;
#endif #endif
jmp_buf j; jmp_buf j;
int size; int size;
unsigned long intrlevel; unsigned long int intrlevel;
char stack[1]; /* must be word aligned */ char stack[1]; /* must be word aligned */
}; };
@ -229,7 +229,7 @@ struct S_Port {
char unread; char unread;
int ptr; int ptr;
FILE *file; FILE *file;
unsigned lno; unsigned int lno;
int (*closefun) P_((FILE*)); int (*closefun) P_((FILE*));
}; };
#define P_OPEN 1 /* flags */ #define P_OPEN 1 /* flags */
@ -285,7 +285,7 @@ typedef struct {
typedef struct sym { typedef struct sym {
struct sym *next; struct sym *next;
char *name; char *name;
unsigned long value; unsigned long int value;
} SYM; } SYM;
typedef struct { typedef struct {
@ -322,7 +322,7 @@ typedef struct weak_node {
typedef struct { typedef struct {
char *name; char *name;
unsigned long val; unsigned long int val;
} SYMDESCR; } SYMDESCR;

View File

@ -3,7 +3,7 @@ MAKE=make
all: default all: default
Makefile.local: ../../config/system ../../config/site Makefile.local: build ../../config/system ../../config/site
$(SHELL) ./build $(SHELL) ./build
default: Makefile.local default: Makefile.local

View File

@ -522,5 +522,6 @@ elk_init_lib_bitstring() {
Def_Prim(P_Bitstring_Andnot, "bitstring-andnot!", 2, 2, EVAL); Def_Prim(P_Bitstring_Andnot, "bitstring-andnot!", 2, 2, EVAL);
Def_Prim(P_Bitstring_Xor, "bitstring-xor!", 2, 2, EVAL); Def_Prim(P_Bitstring_Xor, "bitstring-xor!", 2, 2, EVAL);
Def_Prim(P_Substring_Move, "bitstring-substring-move!", 5, 5, EVAL); Def_Prim(P_Substring_Move, "bitstring-substring-move!", 5, 5, EVAL);
P_Provide (Intern ("bitstring.so"));
P_Provide (Intern ("bitstring.o")); P_Provide (Intern ("bitstring.o"));
} }

View File

@ -4,7 +4,7 @@
if [ _$gdbm = _yes ]; then if [ _$gdbm = _yes ]; then
gdbm_c="gdbm.c" gdbm_c="gdbm.c"
gdbm_o="gdbm.o" gdbm_o="gdbm.o"
gdbm_rule="gdbm.o: \$(H) gdbm.c" gdbm_so="gdbm.so"
else else
gdbm_incl= gdbm_incl=
fi fi
@ -54,11 +54,21 @@ O= bitstring.o\\
regexp.o\\ regexp.o\\
struct.o $gdbm_o struct.o $gdbm_o
SO= bitstring.so\\
debug.so\\
elk-eval.so\\
hack.so\\
monitor.so\\
newhandler.so\\
record.so\\
regexp.so\\
struct.so $gdbm_so
.c.o: .c.o:
\$(CC) \$(CFLAGS) -I\$(INC) $gdbm_incl -c \$< \$(CC) \$(CFLAGS) -I\$(INC) $gdbm_incl -c \$<
../../scripts/makedl \$@ \$@ ../../scripts/makedl \$@ \$@
all: \$(O) all: \$(SO)
bitstring.o: \$(H) bitstring.c bitstring.o: \$(H) bitstring.c
debug.o: \$(H) debug.c debug.o: \$(H) debug.c
@ -69,9 +79,39 @@ newhandler.o: \$(H) newhandler.c
record.o: \$(H) record.c record.o: \$(H) record.c
regexp.o: \$(H) regexp.c regexp.o: \$(H) regexp.c
struct.o: \$(H) struct.c struct.o: \$(H) struct.c
$gdbm_rule gdbm.o: \$(H) gdbm.c
install: \$(O) bitstring.so: bitstring.o
ld -shared -o \$@ \$< -lc
debug.so: debug.o
ld -shared -o \$@ \$< -lc
elk-eval.so: elk-eval.o
ld -shared -o \$@ \$< -lc
hack.so: hack.o
ld -shared -o \$@ \$< -lc
monitor.so: monitor.o
ld -shared -o \$@ \$< -lc
newhandler.so: newhandler.o
ld -shared -o \$@ \$< -lc
record.so: record.o
ld -shared -o \$@ \$< -lc
regexp.so: regexp.o
ld -shared -o \$@ \$< -lc
struct.so: struct.o
ld -shared -o \$@ \$< -lc
gdbm.so: gdbm.o
ld -shared -o \$@ \$< -lgdbm -lc
install: \$(SO)
-@if [ ! -d $install_dir/lib ]; then \\ -@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\ echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\ mkdir $install_dir/lib; \\
@ -80,22 +120,18 @@ install: \$(O)
echo mkdir $install_dir/lib/elk; \\ echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\ mkdir $install_dir/lib/elk; \\
fi fi
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\ @for i in \$(SO) ;\\
echo mkdir $install_dir/lib/elk/obj; \\
mkdir $install_dir/lib/elk/obj; \\
fi
@for i in \$(O) ;\\
do \\ do \\
echo cp \$\$i $install_dir/lib/elk/obj; \\ echo cp \$\$i $install_dir/lib/elk; \\
cp \$\$i $install_dir/lib/elk/obj; \\ cp \$\$i $install_dir/lib/elk; \\
done done
lint: lint:
lint \$(LINTFLAGS) -I\$(INC) $gdbm_incl \$(C) lint \$(LINTFLAGS) -I\$(INC) $gdbm_incl \$(C)
clean: clean:
rm -f *.o core rm -f *.so *.o core
distclean: distclean:
rm -f *.o core lint.out Makefile.local rm -f *.so *.o core lint.out Makefile.local
EOT EOT

View File

@ -258,5 +258,6 @@ elk_init_lib_gdbm () {
T_Gdbm_fh = Define_Type (0, "gdbm-file", NOFUNC, T_Gdbm_fh = Define_Type (0, "gdbm-file", NOFUNC,
sizeof (struct S_gdbm_fh), Gdbm_fh_Equal, Gdbm_fh_Equal, sizeof (struct S_gdbm_fh), Gdbm_fh_Equal, Gdbm_fh_Equal,
Gdbm_fh_Print, NOFUNC); Gdbm_fh_Print, NOFUNC);
P_Provide (Intern ("gdbm.so"));
P_Provide (Intern ("gdbm.o")); P_Provide (Intern ("gdbm.o"));
} }

View File

@ -10,5 +10,6 @@ static Object P_Hack_Procedure_Environment (p, e) Object p, e; {
elk_init_lib_hack () { elk_init_lib_hack () {
Define_Primitive (P_Hack_Procedure_Environment, Define_Primitive (P_Hack_Procedure_Environment,
"hack-procedure-environment!", 2, 2, EVAL); "hack-procedure-environment!", 2, 2, EVAL);
P_Provide (Intern ("hack.so"));
P_Provide (Intern ("hack.o")); P_Provide (Intern ("hack.o"));
} }

View File

@ -131,5 +131,6 @@ elk_init_lib_record () {
Def_Prim (P_Record_Type, "record-type-descriptor", 1, 1, EVAL); Def_Prim (P_Record_Type, "record-type-descriptor", 1, 1, EVAL);
Def_Prim (P_Record_Values, "record-values", 1, 1, EVAL); Def_Prim (P_Record_Values, "record-values", 1, 1, EVAL);
Def_Prim (P_Make_Record, "make-record", 2, 2, EVAL); Def_Prim (P_Make_Record, "make-record", 2, 2, EVAL);
P_Provide (Intern ("record.so"));
P_Provide (Intern ("record.o")); P_Provide (Intern ("record.o"));
} }

View File

@ -218,5 +218,6 @@ elk_init_lib_regexp() {
Def_Prim(P_Match_End, "regexp-match-end", 2, 2, EVAL); Def_Prim(P_Match_End, "regexp-match-end", 2, 2, EVAL);
P_Provide(Intern(":regular-expressions")); P_Provide(Intern(":regular-expressions"));
#endif #endif
P_Provide(Intern ("regexp.so"));
P_Provide(Intern ("regexp.o")); P_Provide(Intern ("regexp.o"));
} }

View File

@ -106,5 +106,6 @@ elk_init_lib_struct () {
Define_Primitive (P_Structure_Ref, "structure-ref", 3, 3, EVAL); Define_Primitive (P_Structure_Ref, "structure-ref", 3, 3, EVAL);
Define_Primitive (P_Structure_Set, "structure-set!", 4, 4, EVAL); Define_Primitive (P_Structure_Set, "structure-set!", 4, 4, EVAL);
Define_Primitive (P_Make_Structure, "make-structure", 2, 2, EVAL); Define_Primitive (P_Make_Structure, "make-structure", 2, 2, EVAL);
P_Provide (Intern ("struct.so"));
P_Provide (Intern ("struct.o")); P_Provide (Intern ("struct.o"));
} }

View File

@ -3,7 +3,7 @@ MAKE=make
all: default all: default
Makefile.local: ../../config/system ../../config/site Makefile.local: build ../../config/system ../../config/site
$(SHELL) ./build $(SHELL) ./build
default: Makefile.local default: Makefile.local

View File

@ -55,7 +55,7 @@ O= error.o\\
unix.o\\ unix.o\\
wait.o wait.o
all: \$(O) unix.pre all: \$(O) unix.so
.c.o: .c.o:
\$(CC) \$(CFLAGS) -I\$(INC) -c \$< \$(CC) \$(CFLAGS) -I\$(INC) -c \$<
@ -77,7 +77,10 @@ wait.o: \$(H) wait.c
unix.pre: \$(O) unix.pre: \$(O)
../../scripts/makedl \$@ \$(O) ../../scripts/makedl \$@ \$(O)
install: unix.pre unix.so: \$(O)
ld -shared -o \$@ \$(O) -lc
install: unix.so
-@if [ ! -d $install_dir/lib ]; then \\ -@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\ echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\ mkdir $install_dir/lib; \\
@ -86,11 +89,7 @@ install: unix.pre
echo mkdir $install_dir/lib/elk; \\ echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\ mkdir $install_dir/lib/elk; \\
fi fi
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\ cp unix.so $install_dir/lib/elk
echo mkdir $install_dir/lib/elk/obj; \\
mkdir $install_dir/lib/elk/obj; \\
fi
cp unix.pre $install_dir/lib/elk/obj/unix.o
-@if [ ! -d $install_dir/include ]; then \\ -@if [ ! -d $install_dir/include ]; then \\
echo mkdir $install_dir/include; \\ echo mkdir $install_dir/include; \\
mkdir $install_dir/include; \\ mkdir $install_dir/include; \\
@ -109,8 +108,8 @@ lint:
lint \$(LINTFLAGS) -I\$(INC) \$(C) lint \$(LINTFLAGS) -I\$(INC) \$(C)
clean: clean:
rm -f *.o unix.pre core rm -f *.so *.o unix.pre core
distclean: distclean:
rm -f *.o unix.pre core lint.out Makefile.local rm -f *.so *.o unix.pre core lint.out Makefile.local
EOT EOT

View File

@ -34,5 +34,6 @@ void Check_Result_Vector(x, len) Object x; {
} }
elk_init_unix_unix() { elk_init_unix_unix() {
P_Provide(Intern("unix.so"));
P_Provide(Intern("unix.o")); P_Provide(Intern("unix.o"));
} }

View File

@ -3,7 +3,7 @@ MAKE=make
all: default all: default
Makefile.local: ../../config/system ../../config/site Makefile.local: build ../../config/system ../../config/site
$(SHELL) ./build $(SHELL) ./build
default: Makefile.local default: Makefile.local

View File

@ -53,6 +53,30 @@ O= ascii.o\\
tree.o\\ tree.o\\
viewport.o viewport.o
SO= ascii.so\\
box.so\\
command.so\\
dialog.so\\
form.so\\
grip.so\\
label.so\\
list.so\\
menubutton.so\\
paned.so\\
panner.so\\
porthole.so\\
repeater.so\\
scrollbar.so\\
shell.so\\
simplemenu.so\\
sme.so\\
smebsb.so\\
smeline.so\\
stripchart.so\\
toggle.so\\
tree.so\\
viewport.so
WIDGET_SET= xaw WIDGET_SET= xaw
.SUFFIXES: .d .c .o .SUFFIXES: .d .c .o
@ -69,7 +93,7 @@ WIDGET_SET= xaw
\$(CC) \$(CFLAGS) -I\$(INC) -I../xlib $x11_incl -c \$*.c \$(CC) \$(CFLAGS) -I\$(INC) -I../xlib $x11_incl -c \$*.c
../../scripts/makedl \$@ \$@ ../../scripts/makedl \$@ \$@
all: \$(O) all: \$(SO)
ascii.o: \$(H) ascii.d ascii.o: \$(H) ascii.d
box.o: \$(H) box.d box.o: \$(H) box.d
@ -95,7 +119,77 @@ toggle.o: \$(H) toggle.d
tree.o: \$(H) tree.d tree.o: \$(H) tree.d
viewport.o: \$(H) viewport.d viewport.o: \$(H) viewport.d
install: \$(O) ascii.so: ascii.o
ld -shared -o \$@ \$< $libxaw -lc
box.so: box.o
ld -shared -o \$@ \$< $libxaw -lc
command.so: command.o
ld -shared -o \$@ \$< $libxaw -lc
dialog.so: dialog.o
ld -shared -o \$@ \$< $libxaw -lc
form.so: form.o
ld -shared -o \$@ \$< $libxaw -lc
grip.so: grip.o
ld -shared -o \$@ \$< $libxaw -lc
label.so: label.o
ld -shared -o \$@ \$< $libxaw -lc
list.so: list.o
ld -shared -o \$@ \$< $libxaw -lc
menubutton.so: menubutton.o
ld -shared -o \$@ \$< $libxaw -lc
paned.so: paned.o
ld -shared -o \$@ \$< $libxaw -lc
panner.so: panner.o
ld -shared -o \$@ \$< $libxaw -lc
porthole.so: porthole.o
ld -shared -o \$@ \$< $libxaw -lc
repeater.so: repeater.o
ld -shared -o \$@ \$< $libxaw -lc
scrollbar.so: scrollbar.o
ld -shared -o \$@ \$< $libxaw -lc
shell.so: shell.o
ld -shared -o \$@ \$< $libxaw -lc
simplemenu.so: simplemenu.o
ld -shared -o \$@ \$< $libxaw -lc
sme.so: sme.o
ld -shared -o \$@ \$< $libxaw -lc
smebsb.so: smebsb.o
ld -shared -o \$@ \$< $libxaw -lc
smeline.so: smeline.o
ld -shared -o \$@ \$< $libxaw -lc
stripchart.so: stripchart.o
ld -shared -o \$@ \$< $libxaw -lc
toggle.so: toggle.o
ld -shared -o \$@ \$< $libxaw -lc
tree.so: tree.o
ld -shared -o \$@ \$< $libxaw -lc
viewport.so: viewport.o
ld -shared -o \$@ \$< $libxaw -lc
install: \$(SO)
-@if [ ! -d $install_dir/lib ]; then \\ -@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\ echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\ mkdir $install_dir/lib; \\
@ -104,26 +198,22 @@ install: \$(O)
echo mkdir $install_dir/lib/elk; \\ echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\ mkdir $install_dir/lib/elk; \\
fi fi
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\ -@if [ ! -d $install_dir/lib/elk/xaw ]; then \\
echo mkdir $install_dir/lib/elk/obj; \\ echo mkdir $install_dir/lib/elk/xaw; \\
mkdir $install_dir/lib/elk/obj; \\ mkdir $install_dir/lib/elk/xaw; \\
fi fi
-@if [ ! -d $install_dir/lib/elk/obj/xaw ]; then \\ @for i in \$(SO) ALIASES ;\\
echo mkdir $install_dir/lib/elk/obj/xaw; \\
mkdir $install_dir/lib/elk/obj/xaw; \\
fi
@for i in \$(O) ALIASES ;\\
do \\ do \\
echo cp \$\$i $install_dir/lib/elk/obj/xaw; \\ echo cp \$\$i $install_dir/lib/elk/xaw; \\
cp \$\$i $install_dir/lib/elk/obj/xaw; \\ cp \$\$i $install_dir/lib/elk/xaw; \\
done done
lint: lint:
lint \$(LINTFLAGS) -I\$(INC) -I../xlib $x11_incl *.c lint \$(LINTFLAGS) -I\$(INC) -I../xlib $x11_incl *.c
clean: clean:
rm -f *.o *.c core rm -f *.so *.o *.c core
distclean: distclean:
rm -f *.o *.c core lint.out Makefile.local rm -f *.so *.o *.c core lint.out Makefile.local
EOT EOT

View File

@ -3,7 +3,7 @@ MAKE=make
all: default all: default
Makefile.local: ../../config/system ../../config/site Makefile.local: build ../../config/system ../../config/site
$(SHELL) ./build $(SHELL) ./build
default: Makefile.local default: Makefile.local

View File

@ -75,7 +75,7 @@ O= client.o\\
window.o\\ window.o\\
wm.o wm.o
all: \$(O) xlib.pre all: \$(O) xlib.so
.c.o: .c.o:
\$(CC) \$(CFLAGS) -I\$(INC) $x11_incl -c \$< \$(CC) \$(CFLAGS) -I\$(INC) $x11_incl -c \$<
@ -107,7 +107,10 @@ wm.o: \$(H) wm.c
xlib.pre: \$(O) xlib.pre: \$(O)
../../scripts/makedl \$@ \$(O) ../../scripts/makedl \$@ \$(O)
install: xlib.pre xlib.so: \$(O)
ld -shared -o \$@ \$(O) $libxlib -lc
install: xlib.so
-@if [ ! -d $install_dir/lib ]; then \\ -@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\ echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\ mkdir $install_dir/lib; \\
@ -116,11 +119,7 @@ install: xlib.pre
echo mkdir $install_dir/lib/elk; \\ echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\ mkdir $install_dir/lib/elk; \\
fi fi
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\ cp xlib.so $install_dir/lib/elk
echo mkdir $install_dir/lib/elk/obj; \\
mkdir $install_dir/lib/elk/obj; \\
fi
cp xlib.pre $install_dir/lib/elk/obj/xlib.o
-@if [ ! -d $install_dir/include ]; then \\ -@if [ ! -d $install_dir/include ]; then \\
echo mkdir $install_dir/include; \\ echo mkdir $install_dir/include; \\
mkdir $install_dir/include; \\ mkdir $install_dir/include; \\
@ -139,8 +138,8 @@ lint:
lint \$(LINTFLAGS) -I\$(INC) $x11_incl \$(C) lint \$(LINTFLAGS) -I\$(INC) $x11_incl \$(C)
clean: clean:
rm -f *.o xlib.pre core rm -f *.so *.o xlib.pre core
distclean: distclean:
rm -f *.o xlib.pre core lint.out Makefile.local rm -f *.so *.o xlib.pre core lint.out Makefile.local
EOT EOT

View File

@ -27,6 +27,7 @@ elk_init_xlib_init () {
"xlib-release-5-or-later?", 0, 0, EVAL); "xlib-release-5-or-later?", 0, 0, EVAL);
Define_Primitive (P_Xlib_Release_6_Or_Laterp, Define_Primitive (P_Xlib_Release_6_Or_Laterp,
"xlib-release-6-or-later?", 0, 0, EVAL); "xlib-release-6-or-later?", 0, 0, EVAL);
P_Provide (Intern ("xlib.so"));
P_Provide (Intern ("xlib.o")); P_Provide (Intern ("xlib.o"));
} }

View File

@ -3,7 +3,7 @@ MAKE=make
all: default all: default
Makefile.local: ../../config/system ../../config/site Makefile.local: build ../../config/system ../../config/site
$(SHELL) ./build $(SHELL) ./build
default: Makefile.local default: Makefile.local

View File

@ -57,6 +57,32 @@ O= arrow-button.o\\
text.o\\ text.o\\
toggle-btn.o toggle-btn.o
SO= arrow-button.so\\
bulletin-brd.so\\
cascade-btn.so\\
command.so\\
drawing-area.so\\
drawn-button.so\\
file-selectn.so\\
form.so\\
frame.so\\
label.so\\
list.so\\
main-window.so\\
message-box.so\\
paned-window.so\\
push-button.so\\
row-column.so\\
scale.so\\
scroll-bar.so\\
scrolled-win.so\\
selectn-box.so\\
separator.so\\
shell.so\\
support.so\\
text.so\\
toggle-btn.so
WIDGET_SET= xm WIDGET_SET= xm
.SUFFIXES: .d .c .o .SUFFIXES: .d .c .o
@ -73,7 +99,7 @@ WIDGET_SET= xm
\$(CC) \$(CFLAGS) -I\$(INC) -I../xlib $sys_incl -c \$*.c \$(CC) \$(CFLAGS) -I\$(INC) -I../xlib $sys_incl -c \$*.c
../../scripts/makedl \$@ \$@ ../../scripts/makedl \$@ \$@
all: \$(O) all: \$(SO)
arrow-button.o: \$(H) arrow-button.d arrow-button.o: \$(H) arrow-button.d
bulletin-brd.o: \$(H) bulletin-brd.d bulletin-brd.o: \$(H) bulletin-brd.d
@ -101,7 +127,83 @@ support.o: \$(H) support.d
text.o: \$(H) text.d text.o: \$(H) text.d
toggle-btn.o: \$(H) toggle-btn.d toggle-btn.o: \$(H) toggle-btn.d
install: \$(O) arrow-button.so: arrow-button.o
ld -shared -o \$@ \$< $libxmotif -lc
bulletin-brd.so: bulletin-brd.o
ld -shared -o \$@ \$< $libxmotif -lc
cascade-btn.so: cascade-btn.o
ld -shared -o \$@ \$< $libxmotif -lc
command.so: command.o
ld -shared -o \$@ \$< $libxmotif -lc
drawing-area.so: drawing-area.o
ld -shared -o \$@ \$< $libxmotif -lc
drawn-button.so: drawn-button.o
ld -shared -o \$@ \$< $libxmotif -lc
file-selectn.so: file-selectn.o
ld -shared -o \$@ \$< $libxmotif -lc
form.so: form.o
ld -shared -o \$@ \$< $libxmotif -lc
frame.so: frame.o
ld -shared -o \$@ \$< $libxmotif -lc
label.so: label.o
ld -shared -o \$@ \$< $libxmotif -lc
list.so: list.o
ld -shared -o \$@ \$< $libxmotif -lc
main-window.so: main-window.o
ld -shared -o \$@ \$< $libxmotif -lc
message-box.so: message-box.o
ld -shared -o \$@ \$< $libxmotif -lc
paned-window.so: paned-window.o
ld -shared -o \$@ \$< $libxmotif -lc
push-button.so: push-button.o
ld -shared -o \$@ \$< $libxmotif -lc
row-column.so: row-column.o
ld -shared -o \$@ \$< $libxmotif -lc
scale.so: scale.o
ld -shared -o \$@ \$< $libxmotif -lc
scroll-bar.so: scroll-bar.o
ld -shared -o \$@ \$< $libxmotif -lc
scrolled-win.so: scrolled-win.o
ld -shared -o \$@ \$< $libxmotif -lc
selectn-box.so: selectn-box.o
ld -shared -o \$@ \$< $libxmotif -lc
separator.so: separator.o
ld -shared -o \$@ \$< $libxmotif -lc
shell.so: shell.o
ld -shared -o \$@ \$< $libxmotif -lc
support.so: support.o
ld -shared -o \$@ \$< $libxmotif -lc
text.so: text.o
ld -shared -o \$@ \$< $libxmotif -lc
toggle-btn.so: toggle-btn.o
ld -shared -o \$@ \$< $libxmotif -lc
install: \$(SO)
-@if [ ! -d $install_dir/lib ]; then \\ -@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\ echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\ mkdir $install_dir/lib; \\
@ -110,26 +212,22 @@ install: \$(O)
echo mkdir $install_dir/lib/elk; \\ echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\ mkdir $install_dir/lib/elk; \\
fi fi
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\ -@if [ ! -d $install_dir/lib/elk/xm ]; then \\
echo mkdir $install_dir/lib/elk/obj; \\ echo mkdir $install_dir/lib/elk/xm; \\
mkdir $install_dir/lib/elk/obj; \\ mkdir $install_dir/lib/elk/xm; \\
fi fi
-@if [ ! -d $install_dir/lib/elk/obj/xm ]; then \\ @for i in \$(SO) ALIASES ;\\
echo mkdir $install_dir/lib/elk/obj/xm; \\
mkdir $install_dir/lib/elk/obj/xm; \\
fi
@for i in \$(O) ALIASES ;\\
do \\ do \\
echo cp \$\$i $install_dir/lib/elk/obj/xm; \\ echo cp \$\$i $install_dir/lib/elk/xm; \\
cp \$\$i $install_dir/lib/elk/obj/xm; \\ cp \$\$i $install_dir/lib/elk/xm; \\
done done
lint: lint:
lint \$(LINTFLAGS) -I\$(INC) -I../xlib $sys_incl *.c lint \$(LINTFLAGS) -I\$(INC) -I../xlib $sys_incl *.c
clean: clean:
rm -f *.o *.c core rm -f *.so *.o *.c core
distclean: distclean:
rm -f *.o *.c core lint.out Makefile.local rm -f *.so *.o *.c core lint.out Makefile.local
EOT EOT

View File

@ -3,7 +3,7 @@ MAKE=make
all: default all: default
Makefile.local: ../../../config/system ../../../config/site Makefile.local: build ../../../config/system ../../../config/site
$(SHELL) ./build $(SHELL) ./build
default: Makefile.local default: Makefile.local

View File

@ -1,6 +1,10 @@
. ../../../config/system . ../../../config/system
. ../../../config/site . ../../../config/site
if [ _$load_obj = _ld -o _$load_obj = _dl ]; then
force_load_xm="-u ${syms_begin_with}XmIsMotifWMRunning"
fi
# In HP-UX, the Motif libraries must be linked with xt-motif.o instead # In HP-UX, the Motif libraries must be linked with xt-motif.o instead
# of placing them into the load-libraries (I don't know why): # of placing them into the load-libraries (I don't know why):
@ -45,10 +49,13 @@ O= \$(XTDIR)/accelerator.o\\
@echo === Must make files in \$(XTDIR) first\! === @echo === Must make files in \$(XTDIR) first\! ===
@echo "" @echo ""
xt-motif.so: \$(O) ../../xlib/xlib.so
ld -shared -o \$@ \$(O) ../../xlib/*.o $force_load_xm $libxmotif -lc
xt-motif.pre: \$(O) ../../xlib/xlib.pre xt-motif.pre: \$(O) ../../xlib/xlib.pre
../../../scripts/makedl \$@ \$(O) ../../xlib/*.o $motif_link_libs ../../../scripts/makedl \$@ \$(O) ../../xlib/*.o $motif_link_libs
install: xt-motif.pre install: xt-motif.so
-@if [ ! -d $install_dir/lib ]; then \\ -@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\ echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\ mkdir $install_dir/lib; \\
@ -57,17 +64,13 @@ install: xt-motif.pre
echo mkdir $install_dir/lib/elk; \\ echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\ mkdir $install_dir/lib/elk; \\
fi fi
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\ cp xt-motif.so $install_dir/lib/elk
echo mkdir $install_dir/lib/elk/obj; \\
mkdir $install_dir/lib/elk/obj; \\
fi
cp xt-motif.pre $install_dir/lib/elk/obj/xt-motif.o
lint: lint:
clean: clean:
rm -f *.o xt-motif.pre core rm -f *.so *.o xt-motif.pre core
distclean: distclean:
rm -f *.o xt-motif.pre core Makefile.local rm -f *.so *.o xt-motif.pre core Makefile.local
EOT EOT

View File

@ -3,7 +3,7 @@ MAKE=make
all: default all: default
Makefile.local: ../../config/system ../../config/site Makefile.local: build ../../config/system ../../config/site
$(SHELL) ./build $(SHELL) ./build
default: Makefile.local default: Makefile.local

View File

@ -62,7 +62,7 @@ O= accelerator.o\\
translation.o\\ translation.o\\
widget.o widget.o
all: \$(O) xt.pre all: \$(O) xt.so
.c.o: .c.o:
\$(CC) \$(CFLAGS) -I\$(INC) -I../xlib $x11_incl -c \$< \$(CC) \$(CFLAGS) -I\$(INC) -I../xlib $x11_incl -c \$<
@ -87,7 +87,10 @@ widget.o: \$(H) widget.c
xt.pre: \$(O) ../xlib/xlib.pre xt.pre: \$(O) ../xlib/xlib.pre
../../scripts/makedl \$@ \$(O) ../xlib/*.o ../../scripts/makedl \$@ \$(O) ../xlib/*.o
install: xt.pre xt.so: \$(O) ../xlib/xlib.so
ld -shared -o \$@ \$(O) ../xlib/*.o $libxt -lc
install: xt.so
-@if [ ! -d $install_dir/lib ]; then \\ -@if [ ! -d $install_dir/lib ]; then \\
echo mkdir $install_dir/lib; \\ echo mkdir $install_dir/lib; \\
mkdir $install_dir/lib; \\ mkdir $install_dir/lib; \\
@ -96,11 +99,7 @@ install: xt.pre
echo mkdir $install_dir/lib/elk; \\ echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\ mkdir $install_dir/lib/elk; \\
fi fi
-@if [ ! -d $install_dir/lib/elk/obj ]; then \\ cp xt.so $install_dir/lib/elk
echo mkdir $install_dir/lib/elk/obj; \\
mkdir $install_dir/lib/elk/obj; \\
fi
cp xt.pre $install_dir/lib/elk/obj/xt.o
-@if [ ! -d $install_dir/include ]; then \\ -@if [ ! -d $install_dir/include ]; then \\
echo mkdir $install_dir/include; \\ echo mkdir $install_dir/include; \\
mkdir $install_dir/include; \\ mkdir $install_dir/include; \\
@ -119,8 +118,8 @@ lint:
lint \$(LINTFLAGS) -I\$(INC) -I../xlib $x11_incl \$(C) lint \$(LINTFLAGS) -I\$(INC) -I../xlib $x11_incl \$(C)
clean: clean:
rm -f *.o xt.pre core rm -f *.so *.o xt.pre core
distclean: distclean:
rm -f *.o xt.pre core lint.out Makefile.local rm -f *.so *.o xt.pre core lint.out Makefile.local
EOT EOT

View File

@ -43,5 +43,6 @@ elk_init_xt_init () {
Define_Primitive (P_Xt_Release_6_Or_Laterp, "xt-release-6-or-later?", Define_Primitive (P_Xt_Release_6_Or_Laterp, "xt-release-6-or-later?",
0, 0, EVAL); 0, 0, EVAL);
XtToolkitInitialize (); XtToolkitInitialize ();
P_Provide (Intern ("xt.so"));
P_Provide (Intern ("xt.o")); P_Provide (Intern ("xt.o"));
} }

View File

@ -3,7 +3,7 @@ MAKE=make
all: default all: default
Makefile.local: ../config/system ../config/site Makefile.local: build ../config/system ../config/site
$(SHELL) ./build $(SHELL) ./build
default: Makefile.local default: Makefile.local

View File

@ -2,7 +2,7 @@
;;; ;;;
;;; The Scheme layer of the bitstring extension. ;;; The Scheme layer of the bitstring extension.
(require 'bitstring.o) (require 'bitstring.so)
(define (bitstring-copy b) (define (bitstring-copy b)
(let ((new (make-bitstring (bitstring-length b) #f))) (let ((new (make-bitstring (bitstring-length b) #f)))

View File

@ -51,14 +51,10 @@ install: \$(TARGETS)
echo mkdir $install_dir/share/elk; \\ echo mkdir $install_dir/share/elk; \\
mkdir $install_dir/share/elk; \\ mkdir $install_dir/share/elk; \\
fi fi
-@if [ ! -d $install_dir/share/elk/scm ]; then \\
echo mkdir $install_dir/share/elk/scm; \\
mkdir $install_dir/share/elk/scm; \\
fi
@for i in \$(FILES) ;\\ @for i in \$(FILES) ;\\
do \\ do \\
echo cp \$\$i $install_dir/share/elk/scm; \\ echo cp \$\$i $install_dir/share/elk; \\
cp \$\$i $install_dir/share/elk/scm; \\ cp \$\$i $install_dir/share/elk; \\
done done
lint: lint:

View File

@ -4,7 +4,7 @@
;;; Contributed by Martin Stut. ;;; Contributed by Martin Stut.
(require 'gdbm.o) (require 'gdbm.so)
(let ((gf (gdbm-open 'test.gdbm 1024 'create)) (last "nothing")) (let ((gf (gdbm-open 'test.gdbm 1024 'create)) (last "nothing"))
(if (not gf) (if (not gf)

View File

@ -2,7 +2,7 @@
;;; ;;;
;;; A simple `OOPS' package ;;; A simple `OOPS' package
(require 'hack.o) (require 'hack.so)
(provide 'oops) (provide 'oops)

View File

@ -2,7 +2,7 @@
;;; ;;;
;;; The Scheme layer of the record extension. ;;; The Scheme layer of the record extension.
(require 'record.o) (require 'record.so)
(define (record-field-index name fields) (define (record-field-index name fields)
(let loop ((fields fields) (index 0)) (let loop ((fields fields) (index 0))

View File

@ -3,7 +3,7 @@
;;; The Scheme layer of the regexp extension is (almost) empty for now. ;;; The Scheme layer of the regexp extension is (almost) empty for now.
;;; It mainly exists to enable use of "(require 'regexp)". ;;; It mainly exists to enable use of "(require 'regexp)".
(require 'regexp.o) (require 'regexp.so)
(define (describe-regexp r) (define (describe-regexp r)
(format #t "a regular expression.~%") (format #t "a regular expression.~%")

View File

@ -10,7 +10,7 @@
;;; ;;;
;;; slot = slot-name or (slot-name initial-value) ;;; slot = slot-name or (slot-name initial-value)
(require 'struct.o) (require 'struct.so)
(define-macro (define-structure name . slot-descr) (define-macro (define-structure name . slot-descr)
(internal-define-structure name slot-descr #t)) (internal-define-structure name slot-descr #t))

View File

@ -4,7 +4,7 @@
(require 'record) (require 'record)
(require 'recordutil) (require 'recordutil)
(require 'unix.o) (require 'unix.so)
(define-record-type stat (type mode ino dev nlink uid gid size (define-record-type stat (type mode ino dev nlink uid gid size
atime mtime ctime)) atime mtime ctime))

View File

@ -5,7 +5,7 @@
(require 'siteinfo) (require 'siteinfo)
(fluid-let ((load-libraries (string-append site-lib-xlib " " load-libraries))) (fluid-let ((load-libraries (string-append site-lib-xlib " " load-libraries)))
(require 'xlib.o)) (require 'xlib.so))
(define (create-window . args) (define (create-window . args)
(apply-with-keywords (apply-with-keywords

View File

@ -8,10 +8,10 @@
(fluid-let ((load-libraries (fluid-let ((load-libraries
(string-append site-force-load-xm " " site-lib-xmotif " " (string-append site-force-load-xm " " site-lib-xmotif " "
load-libraries))) load-libraries)))
(require 'xt.o 'xt-motif.o)) (require 'xt.so 'xt-motif.so))
(fluid-let ((load-libraries (fluid-let ((load-libraries
(string-append site-lib-xt " " load-libraries))) (string-append site-lib-xt " " load-libraries)))
(require 'xt.o))) (require 'xt.so)))
(load 'xlib.scm) (load 'xlib.scm)

View File

@ -11,7 +11,7 @@
(define widget-aliases #f) (define widget-aliases #f)
(define (widget-loaded? w) (define (widget-loaded? w)
(feature? (string->symbol (format #f "~a:~a.o" widget-subdirectory w)))) (feature? (string->symbol (format #f "~a:~a.so" widget-subdirectory w))))
(define-macro (load-widgets . w) (define-macro (load-widgets . w)
(let ((wl '()) (l '())) (let ((wl '()) (l '()))
@ -33,15 +33,16 @@
(begin (begin
(if (not widget-aliases) (if (not widget-aliases)
(load (format #f "~a/ALIASES" widget-subdirectory))) (load (format #f "~a/ALIASES" widget-subdirectory)))
(format #t "[Loading ") (if autoload-notify? (format #t "[Loading "))
(do ((f l (cdr f))) ((null? f)) (do ((f l (cdr f))) ((null? f))
(let* ((file (car f)) (let* ((file (car f))
(alias (assq (car f) widget-aliases))) (alias (assq (car f) widget-aliases)))
(if alias (set! file (cdr alias))) (if alias (set! file (cdr alias)))
(format #t "~a~a" file (if (null? (cdr f)) "" " ")) (if autoload-notify?
(set! wl (cons (format #f "~a/~a.o" widget-subdirectory file) (format #t "~a~a" file (if (null? (cdr f)) "" " ")))
(set! wl (cons (format #f "~a/~a.so" widget-subdirectory file)
wl)))) wl))))
(format #t "]~%") (if autoload-notify? (format #t "]~%"))
`(fluid-let ((load-libraries `(fluid-let ((load-libraries
(if (feature? 'motif) (if (feature? 'motif)
(string-append site-lib-xmotif " " load-libraries) (string-append site-lib-xmotif " " load-libraries)

View File

@ -3,7 +3,7 @@ MAKE=make
all: default all: default
Makefile.local: ../config/system ../config/site Makefile.local: build ../config/system ../config/site
$(SHELL) ./build $(SHELL) ./build
default: Makefile.local default: Makefile.local

View File

@ -3,7 +3,7 @@ MAKE=make
all: default all: default
Makefile.local: ../config/system ../config/site Makefile.local: build ../config/system ../config/site
$(SHELL) ./build $(SHELL) ./build
default: Makefile.local default: Makefile.local

View File

@ -3,7 +3,7 @@
Object V_Autoload_Notifyp; Object V_Autoload_Notifyp;
void Init_Auto (void) { void Init_Auto (void) {
Define_Variable (&V_Autoload_Notifyp, "autoload-notify?", True); Define_Variable (&V_Autoload_Notifyp, "autoload-notify?", False);
} }
Object P_Autoload (Object sym, Object files) { Object P_Autoload (Object sym, Object files) {

View File

@ -1,6 +1,6 @@
. ../config/system . ../config/system
. ../config/site . ../config/site
. ../debian/arch-config . ../debian/arch-config || true
case _$aout_format in case _$aout_format in
_coff) dump=dump-vanilla.c; stab=stab-coff.c;; _coff) dump=dump-vanilla.c; stab=stab-coff.c;;
@ -116,15 +116,21 @@ O1= \$(OCOMMON) main.o stab.o
O2= \$(OCOMMON) main2.o stab2.o O2= \$(OCOMMON) main2.o stab2.o
O3= \$(OCOMMON) main3.o stab2.o O3= \$(OCOMMON) main3.o stab2.o
all: scheme standalone.o module.o all: scheme standalone.a module.a
scheme: \$(O1) scheme: \$(O1)
\$(CC) -o \$@ \$(CFLAGS) \$(O1) \$(LDFLAGS) \$(CC) -o \$@ \$(CFLAGS) \$(O1) \$(LDFLAGS)
standalone.a: \$(O2)
ar cru \$@ \$<
standalone.o: \$(O2) standalone.o: \$(O2)
ld -r -o \$@ \$(O2) ld -r -o \$@ \$(O2)
chmod 644 \$@ chmod 644 \$@
module.a: \$(O3)
ar cru \$@ \$<
module.o: \$(O3) module.o: \$(O3)
ld -r -o \$@ \$(O3) ld -r -o \$@ \$(O3)
chmod 644 \$@ chmod 644 \$@
@ -181,7 +187,7 @@ main3.o: \$(H) main.c
\$(CC) -DINIT_OBJECTS -DNOMAIN \$(CFLAGS) -I\$(INC) -c main3.c \$(CC) -DINIT_OBJECTS -DNOMAIN \$(CFLAGS) -I\$(INC) -c main3.c
rm main3.c rm main3.c
install: scheme standalone.o module.o install: scheme standalone.a module.a
-@if [ ! -d $install_dir/bin ]; then \\ -@if [ ! -d $install_dir/bin ]; then \\
echo mkdir $install_dir/bin; \\ echo mkdir $install_dir/bin; \\
mkdir $install_dir/bin; \\ mkdir $install_dir/bin; \\
@ -195,15 +201,15 @@ install: scheme standalone.o module.o
echo mkdir $install_dir/lib/elk; \\ echo mkdir $install_dir/lib/elk; \\
mkdir $install_dir/lib/elk; \\ mkdir $install_dir/lib/elk; \\
fi fi
cp standalone.o $install_dir/lib/elk cp standalone.a $install_dir/lib/elk
cp module.o $install_dir/lib/elk cp module.a $install_dir/lib/elk
lint: lint:
lint \$(LINTFLAGS) -I\$(INC) \$(C) lint \$(LINTFLAGS) -I\$(INC) \$(C)
clean: clean:
rm -f *.o core main2.c stab2.c main3.c rm -f *.o *.a core main2.c stab2.c main3.c
distclean: distclean:
rm -f *.o core main2.c stab2.c main3.c lint.out scheme Makefile.local rm -f *.o *.a core main2.c stab2.c main3.c lint.out scheme Makefile.local
EOT EOT

View File

@ -16,7 +16,7 @@ static Object Sym_Stop_And_Copy_GC, Sym_Generational_GC, Sym_Incremental_GC;
void Init_Heap () { void Init_Heap () {
Define_Variable (&V_Garbage_Collect_Notifyp, "garbage-collect-notify?", Define_Variable (&V_Garbage_Collect_Notifyp, "garbage-collect-notify?",
True); False);
Define_Symbol (&Sym_Stop_And_Copy_GC, "stop-and-copy"); Define_Symbol (&Sym_Stop_And_Copy_GC, "stop-and-copy");
Define_Symbol (&Sym_Generational_GC, "generational"); Define_Symbol (&Sym_Generational_GC, "generational");

View File

@ -12,7 +12,7 @@ void Dlopen_File (char *fn) {
if (Verb_Load) if (Verb_Load)
printf ("[dlopen %s]\n", fn); printf ("[dlopen %s]\n", fn);
if ((handle = dlopen (fn, RTLD_NOW)) == 0) { if ((handle = dlopen (fn, RTLD_NOW|RTLD_GLOBAL)) == 0) {
char *errstr = dlerror (); char *errstr = dlerror ();
Primitive_Error ("dlopen failed:~%~s", Primitive_Error ("dlopen failed:~%~s",
Make_String (errstr, strlen (errstr))); Make_String (errstr, strlen (errstr)));
@ -126,6 +126,30 @@ void Load_Object (Object names) {
Alloca_End; Alloca_End;
} }
void Load_Lib (Object libs) {
Object port, name;
if (Nullp (libs))
return;
Load_Lib (Cdr (libs));
GC_Node2;
port = name = Null;
GC_Link2 (port, name);
port = General_Open_File (Car (libs), P_INPUT, Var_Get (V_Load_Path));
name = PORT(port)->name;
Dlopen_File (STRING(name)->data);
(void)P_Close_Input_Port (port);
GC_Unlink;
}
void Load_Library (Object libs) {
Disable_Interrupts;
Load_Lib (libs);
Enable_Interrupts;
}
void Finit_Load () { void Finit_Load () {
int i; int i;

View File

@ -28,7 +28,7 @@ extern char *getenv();
static char *Loader_Output; static char *Loader_Output;
static char *tmpdir; static char *tmpdir;
Load_Object (Object names) { void Load_Object (Object names) {
#ifdef ECOFF #ifdef ECOFF
struct headers hdr; struct headers hdr;
#else #else
@ -51,7 +51,7 @@ Load_Object (Object names) {
Loader_Output = Safe_Malloc (strlen (tmpdir) + 20); Loader_Output = Safe_Malloc (strlen (tmpdir) + 20);
} }
sprintf (Loader_Output, "%s/ldXXXXXX", tmpdir); sprintf (Loader_Output, "%s/ldXXXXXX", tmpdir);
(void)mkstemp (Loader_Output); (void)mktemp (Loader_Output);
port = tail = fullnames = Null; port = tail = fullnames = Null;
GC_Link3 (port, tail, fullnames); GC_Link3 (port, tail, fullnames);
@ -162,7 +162,7 @@ void Fork_Load () {
Disable_Interrupts; Disable_Interrupts;
newlink = Safe_Malloc (strlen (tmpdir) + 20); newlink = Safe_Malloc (strlen (tmpdir) + 20);
sprintf (newlink, "%s/ldXXXXXX", tmpdir); sprintf (newlink, "%s/ldXXXXXX", tmpdir);
(void)mkstemp (newlink); (void)mktemp (newlink);
(void)link (Loader_Input, newlink); (void)link (Loader_Input, newlink);
free (Loader_Input); free (Loader_Input);
Loader_Input = newlink; Loader_Input = newlink;

View File

@ -3,7 +3,7 @@
extern void Free_Symbols (SYMTAB *); extern void Free_Symbols (SYMTAB *);
extern void Call_Initializers (SYMTAB *, char *, int); extern void Call_Initializers (SYMTAB *, char *, int);
Load_Object (Object names) { void Load_Object (Object names) {
long retval; long retval;
struct mach_header *hdr; struct mach_header *hdr;
char **filenames, *libs; char **filenames, *libs;

View File

@ -50,7 +50,7 @@ static void Load_Them (Object names) {
Alloca_End; Alloca_End;
} }
Load_Object (Object names) { void Load_Object (Object names) {
Object port, tail, fullnames, str; Object port, tail, fullnames, str;
char *p, *libs = ""; char *p, *libs = "";
GC_Node3; GC_Node3;

View File

@ -64,15 +64,16 @@ void Init_Loadpath (char *s) { /* No GC possible here */
Var_Set (V_Load_Path, P_Reverse (path)); Var_Set (V_Load_Path, P_Reverse (path));
} }
int Is_O_File (Object name) { int Has_Suffix (Object name, char const *suffix) {
register char *p; register char *p;
register int len = strlen(suffix);
register struct S_String *str; register struct S_String *str;
if (TYPE(name) == T_Symbol) if (TYPE(name) == T_Symbol)
name = SYMBOL(name)->name; name = SYMBOL(name)->name;
str = STRING(name); str = STRING(name);
p = str->data + str->size; p = str->data + str->size - len;
return str->size >= 2 && *--p == 'o' && *--p == '.'; return len <= str->size && !strncasecmp(p, suffix, len);
} }
void Check_Loadarg (Object x) { void Check_Loadarg (Object x) {
@ -89,7 +90,7 @@ void Check_Loadarg (Object x) {
f = Car (tail); f = Car (tail);
if (TYPE(f) != T_Symbol && TYPE(f) != T_String) if (TYPE(f) != T_Symbol && TYPE(f) != T_String)
Wrong_Type_Combination (f, "string or symbol"); Wrong_Type_Combination (f, "string or symbol");
if (!Is_O_File (f)) if (!Has_Suffix (f, ".o") && !Has_Suffix (f, ".so"))
Primitive_Error ("~s: not an object file", f); Primitive_Error ("~s: not an object file", f);
} }
} }
@ -103,14 +104,26 @@ Object General_Load (Object what, Object env) {
GC_Link (oldenv); GC_Link (oldenv);
Switch_Environment (env); Switch_Environment (env);
Check_Loadarg (what); Check_Loadarg (what);
if (TYPE(what) == T_Pair) if (TYPE(what) == T_Pair) {
if (Has_Suffix (Car (what), ".o"))
#ifdef CAN_LOAD_OBJ #ifdef CAN_LOAD_OBJ
Load_Object (what) Load_Object (what)
#endif #endif
; ;
else if (Is_O_File (what)) else if (Has_Suffix (Car (what), ".so"))
#ifdef CAN_LOAD_LIB
Load_Library (what)
#endif
;
}
else if (Has_Suffix (what, ".o"))
#ifdef CAN_LOAD_OBJ #ifdef CAN_LOAD_OBJ
Load_Object (Cons (what, Null)) Load_Object (Cons (what, Null))
#endif
;
else if (Has_Suffix (what, ".so"))
#ifdef CAN_LOAD_LIB
Load_Library (Cons (what, Null))
#endif #endif
; ;
else else

View File

@ -63,7 +63,7 @@ unsigned int Max_Stack;
int Interpreter_Initialized; int Interpreter_Initialized;
int GC_Debug = 0; int GC_Debug = 0;
int Case_Insensitive; int Case_Insensitive;
int Verb_Load, Verb_Init; int Verb_Load = 0, Verb_Init = 0;
char **Argv; char **Argv;
int Argc, First_Arg; int Argc, First_Arg;