* First autoconfiscation step.
+ libelk compiles. + elk compiles. git-svn-id: svn://svn.zoy.org/elk/trunk@25 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
parent
f6f125a9c1
commit
9c85718f62
115
Makefile
115
Makefile
|
@ -1,115 +0,0 @@
|
|||
# SUBDIRS lists the components of Elk that are compiled and installed by
|
||||
# running "make" and "make install". The subdirectory "src" holds the
|
||||
# interpreter proper; a mininum configuration requires the SUBDIRS include,
|
||||
# scripts, src, and scm.
|
||||
#
|
||||
# Subdirectories if lib/ hold the standard extensions. Delete them or
|
||||
# parts of them from SUBDIRS if you don't want them to be compiled and
|
||||
# installed; delete lib/xm and lib/xm/xt if you don't have Motif on your
|
||||
# system.
|
||||
|
||||
SUBDIRS= include\
|
||||
scripts\
|
||||
src\
|
||||
scm\
|
||||
lib/misc\
|
||||
lib/unix\
|
||||
lib/xlib\
|
||||
lib/xt\
|
||||
lib/xaw\
|
||||
lib/xm\
|
||||
lib/xm/xt
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
SHELL= /bin/sh
|
||||
MAKE= make
|
||||
GTAR= gtar
|
||||
TAR= tar
|
||||
GZIP= gzip
|
||||
ZIP= zip
|
||||
|
||||
default:
|
||||
@for i in $(SUBDIRS) ;\
|
||||
do \
|
||||
echo Making $$i...; \
|
||||
( cd $$i ; $(MAKE) ) || exit $$?; \
|
||||
done
|
||||
|
||||
install:
|
||||
@for i in $(SUBDIRS) ;\
|
||||
do \
|
||||
echo Installing $$i...; \
|
||||
( cd $$i ; $(MAKE) install ) || exit $$?; \
|
||||
done
|
||||
|
||||
localize:
|
||||
@for i in $(SUBDIRS) ;\
|
||||
do \
|
||||
echo Localizing $$i...; \
|
||||
( cd $$i ; $(MAKE) localize ) || exit $$?; \
|
||||
done
|
||||
|
||||
lint:
|
||||
@for i in $(SUBDIRS) ;\
|
||||
do \
|
||||
echo Linting $$i...; \
|
||||
( cd $$i ; $(MAKE) lint ) || exit $$?; \
|
||||
done
|
||||
|
||||
clean:
|
||||
@for i in $(SUBDIRS) ;\
|
||||
do \
|
||||
echo Cleaning $$i...; \
|
||||
( cd $$i ; $(MAKE) clean ) || exit $$?; \
|
||||
done
|
||||
|
||||
distclean:
|
||||
@for i in $(SUBDIRS) ;\
|
||||
do \
|
||||
echo Cleaning $$i...; \
|
||||
( cd $$i ; $(MAKE) distclean ) || exit $$?; \
|
||||
done
|
||||
|
||||
|
||||
# Package up all localized files (Makefile.local, include files, etc.)
|
||||
# and source files into a zip file (to be compiled on a DOS system).
|
||||
# The X11 extensions are not included.
|
||||
|
||||
LOCALF= Makefile config/system config/site include/*.h lib/misc/Makefile*\
|
||||
lib/misc/*.c scm/[a-z]* src/Makefile* `ls -1 src/*.c |grep -v hp9k`
|
||||
|
||||
localized.zip:
|
||||
$(MAKE) distclean
|
||||
$(MAKE) localize
|
||||
$(ZIP) -kr $@ $(LOCALF)
|
||||
|
||||
|
||||
# Make a full distribution
|
||||
|
||||
DISTF= README ROADMAP CHANGES INSTALL MACHINES COPYRIGHT CONTRIBUTORS\
|
||||
PATCHLEVEL TODO BUGS MIGRATE Makefile config doc examples include lib\
|
||||
scm scripts src util
|
||||
|
||||
dist:
|
||||
echo elk-`util/getversion README'` > .rel
|
||||
rm -rf `cat .rel`
|
||||
mkdir `cat .rel`
|
||||
for i in $(DISTF) ;\
|
||||
do \
|
||||
(cd `cat .rel`; ln -s ../$$i) \
|
||||
done
|
||||
if [ -f config/site.dist ]; then \
|
||||
cp config/site config/site.old; \
|
||||
cp config/site.dist config/site; \
|
||||
fi
|
||||
if [ ! -f ExcludeFiles ]; then \
|
||||
$(TAR) -cvf `cat .rel`.tar -h `cat .rel`; \
|
||||
else \
|
||||
$(GTAR) -cvf `cat .rel`.tar -h -X ExcludeFiles `cat .rel`; \
|
||||
fi
|
||||
$(GZIP) -f `cat .rel`.tar
|
||||
rm -rf `cat .rel` .rel
|
||||
if [ -f config/site.old ]; then \
|
||||
mv config/site.old config/site; \
|
||||
fi
|
|
@ -0,0 +1,15 @@
|
|||
NULL =
|
||||
|
||||
SUBDIRS = src lib scm scripts
|
||||
DIST_SUBDIRS = $(SUBDIRS) autotools config debian doc examples util
|
||||
|
||||
EXTRA_DIST = \
|
||||
CONTRIBUTORS \
|
||||
MACHINES \
|
||||
MIGRATE \
|
||||
PATCHLEVEL \
|
||||
ROADMAP \
|
||||
$(NULL)
|
||||
|
||||
AUTOMAKE_OPTIONS = dist-bzip2
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
#! /bin/sh
|
||||
set -x
|
||||
set -e
|
||||
|
||||
# Check for automake
|
||||
amvers="none"
|
||||
if automake-1.7 --version >/dev/null 2>&1
|
||||
then
|
||||
amvers="-1.7"
|
||||
else
|
||||
if automake-1.6 --version >/dev/null 2>&1
|
||||
then
|
||||
amvers="-1.6"
|
||||
else
|
||||
if automake-1.5 --version >/dev/null 2>&1
|
||||
then
|
||||
amvers="-1.5"
|
||||
else
|
||||
if automake --version > /dev/null 2>&1
|
||||
then
|
||||
amvers=`automake --version | sed -e '1s/[^0-9]*//' -e q`
|
||||
|
||||
if expr "$amvers" "<" "1.5" > /dev/null 2>&1
|
||||
then amvers="none"
|
||||
else amvers=""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$amvers" = "none"
|
||||
then
|
||||
set +x
|
||||
echo "bootstrap: you need automake version 1.5 or later"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Remove old cruft
|
||||
rm -f aclocal.m4 configure config.guess config.log config.sub config.cache config.h.in config.h compile ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh
|
||||
(cd autotools && rm -f config.guess config.sub missing mkinstalldirs compile ltmain.sh depcomp install-sh)
|
||||
|
||||
aclocal${amvers}
|
||||
libtoolize --copy --force
|
||||
autoconf
|
||||
autoheader
|
||||
automake${amvers} --add-missing --copy
|
|
@ -0,0 +1,65 @@
|
|||
AC_INIT(src/main.c)
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_CONFIG_AUX_DIR(autotools)
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
AM_INIT_AUTOMAKE(cfingerd, 1.5.0)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_LIBTOOL
|
||||
AC_STDC_HEADERS
|
||||
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
AC_CHECK_HEADERS(unistd.h pwd.h)
|
||||
|
||||
dnl
|
||||
dnl Check for available warning flags
|
||||
dnl
|
||||
CFLAGS_save="${CFLAGS}"
|
||||
|
||||
AC_CACHE_CHECK([if \$CC accepts -Wall],
|
||||
[ac_cv_c_Wall],
|
||||
[CFLAGS="-Wall ${CFLAGS_save}"
|
||||
AC_TRY_COMPILE([],,ac_cv_c_Wall=yes, ac_cv_c_Wall=no)])
|
||||
if test "x${ac_cv_c_Wall}" != "xno"; then
|
||||
CFLAGS_save="-Wall ${CFLAGS_save}"
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([if \$CC accepts -Wsign-compare],
|
||||
[ac_cv_c_Wsign_compare],
|
||||
[CFLAGS="-Wsign-compare ${CFLAGS_save}"
|
||||
AC_TRY_COMPILE([],,ac_cv_c_Wsign_compare=yes, ac_cv_c_Wsign_compare=no)])
|
||||
if test "x${ac_cv_c_Wsign_compare}" != "xno"; then
|
||||
CFLAGS_save="-Wsign-compare ${CFLAGS_save}"
|
||||
fi
|
||||
|
||||
CFLAGS="${CFLAGS_save}"
|
||||
INCLUDES="${INCLUDES} -I\$(top_srcdir)/include"
|
||||
|
||||
dnl
|
||||
dnl Default values
|
||||
dnl
|
||||
AC_DEFINE(BLAH, 1, [Define if blah])
|
||||
|
||||
dnl Export variables
|
||||
AC_SUBST(INCLUDES)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
autotools/Makefile
|
||||
config/Makefile
|
||||
debian/Makefile
|
||||
doc/Makefile
|
||||
examples/Makefile
|
||||
lib/Makefile
|
||||
scm/Makefile
|
||||
scripts/Makefile
|
||||
src/Makefile
|
||||
util/Makefile
|
||||
])
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
NULL =
|
||||
EXTRA_DIST = \
|
||||
changelog \
|
||||
compat \
|
||||
control \
|
||||
copyright \
|
||||
rules \
|
||||
$(NULL)
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
SHELL=/bin/sh
|
||||
MAKE=make
|
||||
|
||||
all: default
|
||||
|
||||
Makefile.local: build ../config/system ../config/site
|
||||
$(SHELL) ./build
|
||||
|
||||
default: Makefile.local
|
||||
$(MAKE) -f Makefile.local
|
||||
|
||||
install: Makefile.local
|
||||
$(MAKE) -f Makefile.local install
|
||||
|
||||
localize: Makefile.local
|
||||
$(MAKE) -f Makefile.local localize
|
||||
|
||||
lint:
|
||||
|
||||
clean:
|
||||
|
||||
distclean: Makefile.local
|
||||
$(MAKE) -f Makefile.local distclean
|
25
scm/Makefile
25
scm/Makefile
|
@ -1,25 +0,0 @@
|
|||
SHELL=/bin/sh
|
||||
MAKE=make
|
||||
|
||||
all: default
|
||||
|
||||
Makefile.local: build ../config/system ../config/site
|
||||
$(SHELL) ./build
|
||||
|
||||
default: Makefile.local
|
||||
$(MAKE) -f Makefile.local
|
||||
|
||||
install: Makefile.local
|
||||
$(MAKE) -f Makefile.local install
|
||||
|
||||
localize: Makefile.local
|
||||
$(MAKE) -f Makefile.local localize
|
||||
|
||||
lint: Makefile.local
|
||||
$(MAKE) -f Makefile.local lint
|
||||
|
||||
clean: Makefile.local
|
||||
$(MAKE) -f Makefile.local clean
|
||||
|
||||
distclean: Makefile.local
|
||||
$(MAKE) -f Makefile.local distclean
|
|
@ -1,23 +0,0 @@
|
|||
SHELL=/bin/sh
|
||||
MAKE=make
|
||||
|
||||
all: default
|
||||
|
||||
Makefile.local: build ../config/system ../config/site
|
||||
$(SHELL) ./build
|
||||
|
||||
default: Makefile.local
|
||||
$(MAKE) -f Makefile.local
|
||||
|
||||
install: Makefile.local
|
||||
$(MAKE) -f Makefile.local install
|
||||
|
||||
localize: Makefile.local
|
||||
$(MAKE) -f Makefile.local localize
|
||||
|
||||
lint:
|
||||
|
||||
clean:
|
||||
|
||||
distclean: Makefile.local
|
||||
$(MAKE) -f Makefile.local distclean
|
24
src/Makefile
24
src/Makefile
|
@ -1,24 +0,0 @@
|
|||
SHELL=/bin/sh
|
||||
MAKE=make
|
||||
|
||||
all: default
|
||||
|
||||
Makefile.local: build ../config/system ../config/site
|
||||
$(SHELL) ./build
|
||||
|
||||
default: Makefile.local
|
||||
$(MAKE) -f Makefile.local
|
||||
|
||||
install: Makefile.local
|
||||
$(MAKE) -f Makefile.local install
|
||||
|
||||
localize: Makefile.local
|
||||
|
||||
lint: Makefile.local
|
||||
$(MAKE) -f Makefile.local lint
|
||||
|
||||
clean: Makefile.local
|
||||
$(MAKE) -f Makefile.local clean
|
||||
|
||||
distclean: Makefile.local
|
||||
$(MAKE) -f Makefile.local distclean
|
|
@ -0,0 +1,46 @@
|
|||
NULL =
|
||||
|
||||
lib_LTLIBRARIES = libelk.la
|
||||
libelk_la_CFLAGS = -I/usr/include/libelf -DINIT_OBJECTS -DNOMAIN
|
||||
libelk_la_LDFLAGS =
|
||||
libelk_la_LIBADD = -lm -lelf -ldl
|
||||
libelk_la_SOURCES = \
|
||||
autoload.c \
|
||||
bignum.c \
|
||||
bool.c \
|
||||
char.c \
|
||||
cont.c \
|
||||
cstring.c \
|
||||
debug.c \
|
||||
dump.c \
|
||||
env.c \
|
||||
error.c \
|
||||
exception.c \
|
||||
feature.c \
|
||||
heap.c \
|
||||
io.c \
|
||||
libelk.c \
|
||||
list.c \
|
||||
load.c \
|
||||
malloc.c \
|
||||
math.c \
|
||||
onfork.c \
|
||||
prim.c \
|
||||
print.c \
|
||||
proc.c \
|
||||
promise.c \
|
||||
read.c \
|
||||
special.c \
|
||||
stab.c \
|
||||
stkmem.c \
|
||||
string.c \
|
||||
symbol.c \
|
||||
terminate.c \
|
||||
type.c \
|
||||
vector.c \
|
||||
$(NULL)
|
||||
|
||||
bin_PROGRAMS = elk
|
||||
elk_LDADD = libelk.la
|
||||
elk_SOURCES = main.c
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include <elk/scheme.h>
|
||||
#include <scheme.h>
|
||||
|
||||
int main(int ac, char **av) {
|
||||
Elk_Init(ac, av, 1, "");
|
||||
|
|
Loading…
Reference in New Issue