ecl/src/Makefile.in

152 lines
3.8 KiB
Makefile

#
# Makefile for ECoLisp
#
top_srcdir= @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
# Programs used by "make":
#
CC = @ECL_CC@
DEFS = -D@host@
LIBS = @LIBS@ @TKLIBS@ @CLIBS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
RM = @RM@
EXE = @EXEEXT@
# ==================== Where To Install Things ====================
# The default location for installation. Everything is placed in
# subdirectories of this directory. The default values for many of
# the variables below are expressed in terms of this one, so you may
# not need to change them. This defaults to /usr/local.
bindir=@bindir@
libdir=@libdir@
infodir=@infodir@
# Programs used by "make install":
#
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
# Files
SUBDIR = @SUBDIR@
LIBRARIES = @LIBRARIES@
LSP_LIBRARIES = @LSP_LIBRARIES@
TARGETS = @TARGETS@
all: $(TARGETS) doc
.PHONY: all
%Makefile: $(srcdir)/%Makefile.in config.status
./config.status
ecl$(EXE) eclx$(EXE): ecl_min$(EXE) compile.lsp sysfun.lsp
if [ -f CROSS-COMPILER ]; then \
./CROSS-COMPILER < compile.lsp; \
else \
./ecl_min < compile.lsp; \
fi
ecl_min$(EXE): $(LIBRARIES) .gdbinit libecl.a
if [ -f CROSS-COMPILER ]; then \
touch $@; \
else \
$(CC) $(LDFLAGS) -o $@ c/cinit.o -L./ libecl.a -lgmp $(LIBRARIES) $(LIBS);\
fi
.gdbinit: $(srcdir)/util/gdbinit
cp $(srcdir)/util/gdbinit $@
libecl.a: libgmp.a libgc.a
cd c; $(MAKE)
libgc.a:
if (echo $(SUBDIR) | grep gc); then \
cd gc; $(MAKE) install; \
fi
libgmp.a:
if (echo $(SUBDIR) | grep gmp); then \
cd gmp; $(MAKE) install; \
fi
sysfun.lsp:
ln -sf $(srcdir)/cmp/sysfun.lsp .
BUILD-STAMP: config.status
(echo "#"; uname -a) > $@
head -8 config.status | tail -6 >> $@
install: BUILD-STAMP
for i in $(PREFIX)$(bindir) $(PREFIX)$(libdir)/h; do\
$(INSTALL) -d $$i; \
done
for i in $(TARGETS); do \
$(INSTALL) -s $$i $(PREFIX)$(bindir); \
done
$(INSTALL_PROGRAM) -s $(TARGETS) $(PREFIX)$(bindir)
sed 's,~A,$(libdir),;s,~\*,,;' ecl-config > aux; \
$(INSTALL_PROGRAM) aux $(PREFIX)$(bindir)/ecl-config; \
rm aux
for i in BUILD-STAMP $(LSP_LIBRARIES) $(LIBRARIES) c/dpp* help.doc ; do \
$(INSTALL_DATA) $$i $(PREFIX)$(libdir); \
done
$(INSTALL_DATA) h/config.h $(PREFIX)$(libdir)/h
if (echo $(SUBDIR) | grep gc); then $(MAKE) installgc; fi
if (echo $(SUBDIR) | grep gmp); then $(MAKE) installgmp; fi
cd c; $(MAKE) PREFIX="$(PREFIX)" install
cd doc; $(MAKE) PREFIX="$(PREFIX)" install
installgc:
$(INSTALL) -d $(PREFIX)$(libdir)/h/private
for i in $(srcdir)/gc/include/*.h; do \
$(INSTALL_DATA) $$i $(PREFIX)$(libdir)/h/; \
done
for i in $(srcdir)/gc/include/private/*.h; do \
$(INSTALL_DATA) $$i $(PREFIX)$(libdir)/h/private/; \
done
installgmp:
$(INSTALL_DATA) h/gmp.h $(PREFIX)$(libdir)/h/
uninstall:
for i in $(TARGETS) ecl-config; do rm -rf $(bindir)/$$i; done
rm -rf $(libdir)
cd doc; $(MAKE) uninstall
doc: $(TARGETS)
cd doc; $(MAKE)
clean: clean_lisp
for i in ${SUBDIR}; do (cd $$i; $(MAKE) clean); done
$(RM) ecl_min$(EXE) ecl$(EXE) help.doc core a.out
$(RM) config.version config.log config.cache
$(RM) *.c *.o *.a *.h *.data
clean_lisp:
for i in lsp cmp clos clx tk; do $(RM) lib$$i.a $$i/?*.{o,dat,c,sdat,h,fas}; done
$(RM) help.doc
distclean: clean
realclean: distclean
test1:
cd c; $(MAKE)
$(MAKE) ecl_min
$(MAKE) ecl
cd tests; $(MAKE)
diff tests tests2
test2:
$(MAKE) clean_lisp
cd c; $(MAKE)
$(MAKE) ecl_min
$(RM) ecl
$(MAKE) ecl
for i in lsp clos cmp; do diff --exclude=\*.o $$i old/$$i; done
test3:
-mkdir stage2
cp -rf lsp clos cmp stage2
-for i in lsp cmp clos clx tk; do test -f lib$$i.a && mv lib$$i.a stage2; done
$(MAKE) clean_lisp
./ecl < compile.lsp
-for i in lsp clos cmp clx tk; do test -d $$i && diff --exclude=\*.o $$i stage2/$$i; done | less
test:
$(MAKE) -C tests
$(MAKE) -C ansi-tests > ansi-tests/log
-(diff tests ~/src/tests; diff --exclude log ansi-tests ~/src/ansi-tests) | less