ecl/src/Makefile.in

133 lines
3.4 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@
mandir=@mandir@
manext=.1
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
eclx$(EXE): ecl_min$(EXE) compile_rest.lsp
./ecl_min < compile_rest.lsp
ecl$(EXE): ecl_min$(EXE) compile.lsp
./ecl_min < compile.lsp
ecl_min$(EXE): $(LIBRARIES) .gdbinit
$(CC) $(LDFLAGS) -o $@ c/cinit.o -L./ $(LIBRARIES) $(LIBS)
.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
BUILD-STAMP: config.status
(echo "#"; uname -a) > $@
head -8 config.status | tail -6 >> $@
install: BUILD-STAMP
$(INSTALL) -d $(PREFIX)$(bindir) $(PREFIX)$(mandir) $(PREFIX)$(libdir)/h
$(INSTALL_PROGRAM) -s $(TARGETS) $(PREFIX)$(bindir)
$(INSTALL_PROGRAM) ecl-config $(PREFIX)$(bindir)
$(INSTALL_DATA) $(srcdir)/etc/ecl.1 $(PREFIX)$(mandir)
$(INSTALL_DATA) BUILD-STAMP $(LSP_LIBRARIES) $(LIBRARIES) $(PREFIX)$(libdir)
$(INSTALL_DATA) h/config.h $(PREFIX)$(libdir)/h
$(INSTALL_DATA) help.doc $(PREFIX)$(libdir)
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
$(INSTALL_DATA) $(srcdir)/gc/include/*.h $(PREFIX)$(libdir)/h/
$(INSTALL_DATA) $(srcdir)/gc/include/private/*.h $(PREFIX)$(libdir)/h/private/
installgmp:
$(INSTALL_DATA) h/gmp.h $(PREFIX)$(libdir)/h/
uninstall:
rm -rf $(mandir)/ecl.1
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 $$i/?*.c $$i/?*.data $$i/?*.h; 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 < compile2.lsp
for i in lsp clos cmp clx tk; do test -d $$i && diff --exclude=\*.o $$i stage2/$$i; done