Mercurial > hg > octave-lyh
changeset 759:3fc1ccd5a9db
[project @ 1994-10-02 15:34:26 by jwe]
author | jwe |
---|---|
date | Sun, 02 Oct 1994 15:41:13 +0000 |
parents | fdc889cdfb2e |
children | b284388e8999 |
files | Makeconf.in acconfig.h configure.in info/Makefile.in libcruft/Makefile.in liboctave/Makefile.in octMakefile.in src/Makefile.in src/file-io.cc src/file-io.h src/oct-map.h src/pt-const.h src/tc-inlines.h src/tc-rep-ass.cc src/tc-rep-idx.cc src/tc-rep.cc src/tc-rep.h |
diffstat | 17 files changed, 124 insertions(+), 124 deletions(-) [+] |
line wrap: on
line diff
--- a/Makeconf.in +++ b/Makeconf.in @@ -67,10 +67,10 @@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXFLAGS = @CXXFLAGS@ -EXTERNAL_TEMPLATES = @EXTERNAL_TEMPLATES@ -ALL_CXXFLAGS = $(INCFLAGS) $(DEFS) $(EXTERNAL_TEMPLATES) \ +NO_IMPLICIT_TEMPLATES = @NO_IMPLICIT_TEMPLATES@ +ALL_CXXFLAGS = $(INCFLAGS) $(DEFS) $(NO_IMPLICIT_TEMPLATES) \ $(GCC_IEEE_FP_FLAG) $(CXXFLAGS) -UGLY_ALL_CXXFLAGS = $(INCFLAGS) $(UGLY_DEFS) $(EXTERNAL_TEMPLATES) \ +UGLY_ALL_CXXFLAGS = $(INCFLAGS) $(UGLY_DEFS) $(NO_IMPLICIT_TEMPLATES) \ $(GCC_IEEE_FP_FLAG) $(CXXFLAGS) LDFLAGS = @LDFLAGS@
--- a/acconfig.h +++ b/acconfig.h @@ -74,9 +74,6 @@ /* To quiet autoheader. */ #undef SMART_PUTENV -/* Define if using -fexternal-templates with g++. */ -#undef USE_EXTERNAL_TEMPLATES - /* Define if using dld for dynamic linking of object files. */ #undef WITH_DLD
--- a/configure.in +++ b/configure.in @@ -21,7 +21,7 @@ dnl along with Octave; see the file COPYING. If not, write to the Free dnl Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. dnl -AC_REVISION($Revision: 1.50 $)dnl +AC_REVISION($Revision: 1.51 $)dnl AC_PREREQ(1.8)dnl AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h kpathsea/c-auto.h) @@ -172,11 +172,11 @@ dnl DLD_DIR= LIBDLD= -LIBOCTDLD='../liboctdld.a' +LIBOCTDLD='liboctdld.a' LD_STATIC_FLAG= if $use_dld; then DLD_DIR=dld - LIBDLD='../libdld.a' + LIBDLD='../dld/libdld.a' # don't link them in only if doing dynamic linking and small kernel # requested. if $lite_kernel; then @@ -233,15 +233,18 @@ dnl Do special things for g++. dnl ADD_CXX_WALL=false +NO_IMPLICIT_TEMPLATES= gxx_version=`$CXX -v 2>&1 | grep "^g.. version" | sed 's/^g.. version *//'` case "$gxx_version" in - 2.5.*|2.6.*|2.7.*|2.8.*|2.9.*) + 2.0.*|2.1.*|2.2.*|2.3.*|2.4.*) + AC_ERROR([g++ version $gxx_version will not work to compile Octave]) + ;; + 2.6.*|2.7.*|2.8.*|2.9.*) CXXFLAGS="-g -O" AC_VERBOSE([defining CXXFLAGS to be $CXXFLAGS]) - EXTERNAL_TEMPLATES="-fexternal-templates" - AC_VERBOSE([defining EXTERNAL_TEMPLATES to be $EXTERNAL_TEMPLATES]) + NO_IMPLICIT_TEMPLATES="-fno-implicit-templates" + AC_VERBOSE([defining NO_IMPLICIT_TEMPLATES to be $NO_IMPLICIT_TEMPLATES]) ADD_CXX_WALL=true - AC_DEFINE(USE_EXTERNAL_TEMPLATES, 1)dnl ;; 1.*) AC_WARN([g++ version $gxx_version will not work to compile Octave]) @@ -258,7 +261,7 @@ AC_VERBOSE([defining CXXLIBS to be $CXXLIBS]) dnl AC_SUBST(CXXFLAGS)dnl -AC_SUBST(EXTERNAL_TEMPLATES)dnl +AC_SUBST(NO_IMPLICIT_TEMPLATES)dnl AC_SUBST(CXXLIBS)dnl dnl dnl See which C compiler to use (we expect to find gcc).
--- a/info/Makefile.in +++ b/info/Makefile.in @@ -82,7 +82,7 @@ .c.o: $(CC) -c $(CPPFLAGS) $(LDEFS) -I$(common) $(UGLY_ALL_CFLAGS) $< -all: ../libinfo.a # info.info info-stnd.info +all: libinfo.a # info.info info-stnd.info .PHONY: all sub-all: all @@ -104,9 +104,9 @@ # rm -f $(mandir)/info.$(manext) .PHONY: uninstall -../libinfo.a: $(LIBOBJS) - $(AR) $(ARFLAGS) ../libinfo.a $(LIBOBJS) - $(RANLIB) ../libinfo.a +libinfo.a: $(LIBOBJS) + $(AR) $(ARFLAGS) libinfo.a $(LIBOBJS) + $(RANLIB) libinfo.a info: $(OBJECTS) $(CC) $(LDFLAGS) -o info $(OBJECTS) $(LOADLIBES)
--- a/libcruft/Makefile.in +++ b/libcruft/Makefile.in @@ -30,7 +30,7 @@ DISTFILES = Makefile.in Makerules.in $(SOURCES) STOP.patch -all: make-objects ../libcruft.a +all: make-objects libcruft.a .PHONY: all make-objects: @@ -43,10 +43,10 @@ CRUFT_OBJ1 = $(subst misc/d1mach.o, , $(CRUFT_OBJ2)) CRUFT_OBJ = $(CRUFT_OBJ1) misc/d1mach.o misc/dostop.o -../libcruft.a: $(CRUFT_OBJ) - rm -f ../libcruft.a - $(AR) $(ARFLAGS) ../libcruft.a $(CRUFT_OBJ) - $(RANLIB) ../libcruft.a +libcruft.a: $(CRUFT_OBJ) + rm -f libcruft.a + $(AR) $(ARFLAGS) libcruft.a $(CRUFT_OBJ) + $(RANLIB) libcruft.a $(CRUFT_OBJ): @@ -57,7 +57,7 @@ for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done if test -d $(libdir) ; then true ; else $(TOPDIR)/mkpath $(libdir) ; fi rm -f $(libdir)/libcruft.a - $(INSTALL_DATA) ../libcruft.a $(libdir)/libcruft.a + $(INSTALL_DATA) libcruft.a $(libdir)/libcruft.a $(RANLIB) $(libdir)/libcruft.a .PHONY: install @@ -85,12 +85,12 @@ .PHONY: mostlyclean distclean: - rm -f *.a *.o ../libcruft.a Makefile + rm -f *.a *.o Makefile .PHONY: distclean realclean: for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done - rm -f *.a *.o ../libcruft.a tags TAGS Makefile + rm -f *.a *.o tags TAGS Makefile .PHONY: realclean local-dist:
--- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -34,6 +34,8 @@ TEMPLATE_SRC = Array.cc +TI_SRC = Array-C.cc Array-d.cc + MATRIX_SRC = CColVector.cc CDiagMatrix.cc CMatrix.cc CRowVector.cc \ CmplxAEPBAL.cc CmplxCHOL.cc CmplxDET.cc CmplxHESS.cc CmplxLU.cc \ CmplxQR.cc CmplxQRP.cc CmplxSCHUR.cc CmplxSVD.cc EIG.cc \ @@ -45,7 +47,7 @@ LinConst.cc LP.cc LPsolve.cc NLConst.cc NLEqn.cc NLFunc.cc \ NPSOL.cc Objective.cc ODE.cc ODEFunc.cc QLD.cc QP.cc QPSOL.cc \ Quad.cc Range.cc lo-error.cc sun-utils.cc $(TEMPLATE_SRC) \ - $(MATRIX_SRC) + $(TI_SRC) $(MATRIX_SRC) EXTRAS = MArray.cc mx-kludge.cc mx-inlines.cc @@ -55,14 +57,14 @@ OBJECTS = $(patsubst %.cc, %.o, $(SOURCES)) -LIBOCTAVE_DEPEND := $(patsubst %, ../liboctave.a(%), $(OBJECTS)) +LIBOCTAVE_DEPEND := $(patsubst %, liboctave.a(%), $(OBJECTS)) -all: ../liboctave.a +all: liboctave.a .PHONY: all -../liboctave.a: $(OBJECTS) - $(AR) $(ARFLAGS) ../liboctave.a $(OBJECTS) - $(RANLIB) ../liboctave.a +liboctave.a: $(OBJECTS) + $(AR) $(ARFLAGS) liboctave.a $(OBJECTS) + $(RANLIB) liboctave.a check: all .PHONY: check @@ -70,7 +72,7 @@ install: all if test -d $(libdir) ; then true ; else $(TOPDIR)/mkpath $(libdir) ; fi rm -f $(libdir)/liboctave.a - $(INSTALL_DATA) ../liboctave.a $(libdir)/liboctave.a + $(INSTALL_DATA) liboctave.a $(libdir)/liboctave.a $(RANLIB) $(libdir)/liboctave.a if test -d $(includedir) ; then true ; \ else $(TOPDIR)/mkpath $(includedir) ; fi @@ -99,7 +101,7 @@ .PHONY: mostlyclean distclean: clean - rm -f Makefile ../liboctave.a $(TMPSRC) $(TMPINC) *.d + rm -f Makefile *.a $(TMPSRC) $(TMPINC) *.d .PHONY: distclean realclean: distclean
--- a/octMakefile.in +++ b/octMakefile.in @@ -129,12 +129,12 @@ distclean: clean for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $@; cd ..; done - rm -f *.a Makefile config.status + rm -f Makefile config.status .PHONY: distclean realclean: for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $@; cd ..; done - rm -f *.a Makefile config.status + rm -f Makefile config.status .PHONY: realclean # Now that things are under RCS control, we need to do the recursive
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -35,7 +35,8 @@ %.cc : %.l $(LEX) $(LFLAGS) $< > $(@F) -XALL_CXXFLAGS = $(subst -fexternal-templates, , $(ALL_CXXFLAGS)) +XALL_CXXFLAGS_1 = $(subst -fexternal-templates, , $(ALL_CXXFLAGS)) +XALL_CXXFLAGS = $(subst -fno-implicit-templates, , $(XALL_CXXFLAGS_1)) %.def : %.cc @echo making $@ from $< @@ -49,87 +50,92 @@ exit 1 ; \ fi -DLD_SRC = f-balance.cc f-chol.cc f-colloc.cc f-dassl.cc f-det.cc \ +DLD_SRC := f-balance.cc f-chol.cc f-colloc.cc f-dassl.cc f-det.cc \ f-eig.cc f-expm.cc f-fft.cc f-fft2.cc f-find.cc \ f-fsolve.cc f-fsqp.cc f-givens.cc f-hess.cc f-ifft.cc \ f-ifft2.cc f-inv.cc f-log.cc f-lpsolve.cc f-lsode.cc f-lu.cc \ f-minmax.cc f-npsol.cc f-pinv.cc f-qpsol.cc f-qr.cc f-quad.cc \ f-qzval.cc f-rand.cc f-schur.cc f-sort.cc f-svd.cc f-syl.cc -DLD_OBJ = f-balance.o f-chol.o f-colloc.o f-dassl.o f-det.o f-eig.o \ - f-expm.o f-fft.o f-fft2.o f-find.o f-fsolve.o \ - f-fsqp.o f-givens.o f-hess.o f-ifft.o f-ifft2.o f-inv.o \ - f-log.o f-lpsolve.o f-lsode.o f-lu.o f-minmax.o f-npsol.o \ - f-pinv.o f-qpsol.o f-qr.o f-quad.o f-qzval.o f-rand.o \ - f-schur.o f-sort.o f-svd.o f-syl.o +DLD_OBJ := $(patsubst %.cc, %.o, $(DLD_SRC)) -INCLUDES = arith-ops.h builtins.h defaults.h.in defun.h defun-dld.h \ +INCLUDES := arith-ops.h builtins.h defaults.h.in defun.h defun-dld.h \ defun-int.h dirfns.h dynamic-ld.h error.h file-io.h fnmatch.h \ getopt.h gripes.h help.h idx-vector.h input.h lex.h \ load-save.h mappers.h missing-math.h octave.h octave-hist.h \ oct-map.h oct-obj.h pager.h parse.h pr-output.h procstream.h \ sighandlers.h statdefs.h symtab.h sysdep.h token.h \ tree-base.h tree-cmd.h tree-const.h tree-expr.h tree-misc.h \ - tree-plot.h tc-rep.h unwind-prot.h user-prefs.h utils.h \ - variables.h version.h xdiv.h xpow.h Map.h SLStack.h Stack.h + tree-plot.h tc-inlines.cc tc-rep.h unwind-prot.h user-prefs.h \ + utils.h variables.h version.h xdiv.h xpow.h Map.h SLStack.h \ + Stack.h -SOURCES = arith-ops.cc data.cc dirfns.cc dynamic-ld.cc \ +TI_SRC := Array-tc.cc Map-tc.cc DLList-fi.cc \ + SLList-expr.cc SLList-misc.cc SLList-plot.cc SLList-tc.cc \ + SLStack-i.cc SLStack-pc.cc SLStack-sym.cc SLStack-tok.cc \ + SLStack-tm.cc SLStack-ue.cc SLStack-ui.cc + +TI_OBJ := $(patsubst %.cc, %.o, $(TI_SRC)) + +SOURCES := arith-ops.cc data.cc dirfns.cc dynamic-ld.cc \ error.cc file-io.cc fnmatch.c getopt.c getopt1.c gripes.cc \ help.cc idx-vector.cc input.cc lex.l load-save.cc mappers.cc \ octave.cc octave-hist.cc oct-obj.cc pager.cc parse.y \ pr-output.cc procstream.cc sighandlers.cc strcasecmp.c \ - strncase.c symtab.cc sysdep.cc tc-inlines.cc tc-rep.cc \ + strncase.c symtab.cc sysdep.cc tc-rep.cc \ tc-rep-ass.cc tc-rep-idx.cc timefns.cc token.cc tree-base.cc \ tree-cmd.cc tree-const.cc tree-expr.cc tree-misc.cc \ tree-plot.cc unwind-prot.cc user-prefs.cc utils.cc \ variables.cc xdiv.cc xpow.cc Map.cc SLStack.cc \ - $(DLD_SRC) + +OBJECTS_4 := $(SOURCES) builtins.o +OBJECTS_3 := $(patsubst %.l, %.o, $(OBJECTS_4)) +OBJECTS_2 := $(patsubst %.y, %.o, $(OBJECTS_3)) +OBJECTS_1 := $(patsubst %.c, %.o, $(OBJECTS_2)) +OBJECTS := $(patsubst %.cc, %.o, $(OBJECTS_1)) # Ugh. -DEP_SOURCES_2 = $(patsubst %.l, %.cc, $(SOURCES)) builtins.cc -DEP_SOURCES_1 = $(patsubst %.y, %.cc, $(DEP_SOURCES_2)) -DEP_SOURCES = $(patsubst %.c, %.d, $(DEP_SOURCES_1)) -MAKEDEPS = $(patsubst %.cc, %.d, $(DEP_SOURCES)) - -DEF_FILES_4 = $(addprefix $(srcdir)/, $(SOURCES)) -DEF_FILES_3 = $(notdir $(shell grep -l "^DEFUN" $(DEF_FILES_4))) -DEF_FILES_2 = $(patsubst %.y, %.def, $(DEF_FILES_3)) -DEF_FILES_1 = $(patsubst %.l, %.def, $(DEF_FILES_2)) -DEF_FILES = $(patsubst %.cc, %.def, $(DEF_FILES_1)) +DEP_SOURCES_3 := $(SOURCES) $(TI_SOURCES) builtins.cc +DEP_SOURCES_2 := $(patsubst %.l, %.cc, $(DEP_SOURCES_3)) +DEP_SOURCES_1 := $(patsubst %.y, %.cc, $(DEP_SOURCES_2)) +DEP_SOURCES := $(patsubst %.c, %.d, $(DEP_SOURCES_1)) +MAKEDEPS := $(patsubst %.cc, %.d, $(DEP_SOURCES)) -# XXX FIXME XXX -- Should these be generated automatically from the -# list of source files? +DEF_FILES_5 := $(SOURCES) $(DLD_SRC) +DEF_FILES_4 := $(addprefix $(srcdir)/, $(DEF_FILES_5)) +DEF_FILES_3 := $(notdir $(shell grep -l "^DEFUN" $(DEF_FILES_4))) +DEF_FILES_2 := $(patsubst %.y, %.def, $(DEF_FILES_3)) +DEF_FILES_1 := $(patsubst %.l, %.def, $(DEF_FILES_2)) +DEF_FILES := $(patsubst %.cc, %.def, $(DEF_FILES_1)) -OBJECTS = arith-ops.o builtins.o data.o dirfns.o dynamic-ld.o error.o \ - file-io.o fnmatch.o getopt.o getopt1.o gripes.o help.o \ - idx-vector.o input.o lex.o load-save.o mappers.o octave.o \ - octave-hist.o oct-obj.o pager.o parse.o pr-output.o \ - procstream.o sighandlers.o strcasecmp.o strncase.o symtab.o \ - sysdep.o tc-rep.o tc-rep-ass.o tc-rep-idx.o timefns.o token.o \ - tree-base.o tree-cmd.o tree-const.o tree-expr.o tree-plot.o \ - tree-misc.o unwind-prot.o user-prefs.o utils.o variables.o \ - xdiv.o xpow.o Map.o SLStack.o -OCTAVE_LIBS = @LIBOCTDLD@ ../liboctave.a ../libcruft.a ../libinfo.a \ - ../libreadline.a ../libkpathsea.a @LIBDLD@ +OCTAVE_LIBS = @LIBOCTDLD@ ../liboctave/liboctave.a libtinst.a \ + ../libcruft/libcruft.a ../info/libinfo.a \ + ../readline/libreadline.a ../kpathsea/libkpathsea.a \ + @LIBDLD@ DISTFILES = Makefile.in mkdefs mkbuiltins \ - parse.cc lex.cc y.tab.h $(INCLUDES) $(SOURCES) + parse.cc lex.cc y.tab.h $(INCLUDES) $(DLD_SRC) $(SOURCES) \ + $(TI_SRC) all: defaults.h octave .PHONY: all -octave: $(OBJECTS) $(DLD_OBJ) $(LIBOBJS) $(OCTAVE_LIBS) ../liboctdld.a +octave: $(OBJECTS) $(DLD_OBJ) $(LIBOBJS) $(OCTAVE_LIBS) liboctdld.a $(CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(ALL_LDFLAGS) -o octave \ $(OBJECTS) \ $(OCTAVE_LIBS) \ $(LIBOBJS) \ $(FLIBS) $(LEXLIB) -ltermcap -lm -lg++ -../liboctdld.a: $(DLD_OBJ) - $(AR) $(ARFLAGS) ../liboctdld.a $(DLD_OBJ) - $(RANLIB) ../liboctdld.a +liboctdld.a: $(DLD_OBJ) + $(AR) $(ARFLAGS) liboctdld.a $(DLD_OBJ) + $(RANLIB) liboctdld.a + +libtinst.a: $(TI_OBJ) + $(AR) $(ARFLAGS) libtinst.a $(TI_OBJ) + $(RANLIB) libtinst.a builtins.cc: $(DEF_FILES) mkbuiltins @echo making $@ from $(DEF_FILES) @@ -150,7 +156,7 @@ ln $(bindir)/octave-$(version) $(bindir)/octave if test -d $(libdir) ; then true ; else $(TOPDIR)/mkpath $(libdir) ; fi if $(OCTAVE_LITE) && $(WITH_DLD) ; then \ - $(INSTALL_DATA) ../liboctdld.a $(libdir)/liboctdld.a ; \ + $(INSTALL_DATA) liboctdld.a $(libdir)/liboctdld.a ; \ fi .PHONY: install @@ -158,11 +164,11 @@ rm -f $(bindir)/octave .PHONY: uninstall -tags: $(SOURCES) - ctags $(SOURCES) +tags: $(SOURCES) $(DLD_SRC) $(TI_SRC) + ctags $(SOURCES) $(DLD_SRC) $(TI_SRC) -TAGS: $(SOURCES) - etags $(SOURCES) +TAGS: $(SOURCES) $(DLD_SRC) $(TI_SRC) + etags $(SOURCES) $(DLD_SRC) $(TI_SRC) clean: rm -f *.a *.o builtins.cc
--- a/src/file-io.cc +++ b/src/file-io.cc @@ -58,31 +58,8 @@ // keeps a count of args sent to printf or scanf static int fmt_arg_count = 0; -class file_info -{ - public: - file_info (void); - file_info (int num, const char *nm, FILE *t, const char *md); - file_info (const file_info& f); - - file_info& operator = (const file_info& f); - - ~file_info (void); - - int number (void) const; - const char *name (void) const; - FILE *fptr (void) const; - const char *mode (void) const; - - int eof (void) const; - int error (void) const; - - private: - int file_number; - char *file_name; - FILE *file_fptr; - char *file_mode; -}; +// double linked list containing relevant information about open files +static DLList <file_info> file_list; file_info::file_info (void) { @@ -153,9 +130,6 @@ return file_mode; } -// double linked list containing relevant information about open files -static DLList <file_info> file_list; - void initialize_file_io (void) {
--- a/src/file-io.h +++ b/src/file-io.h @@ -55,6 +55,33 @@ extern Octave_object do_scanf (const char *type, const Octave_object& args, int nargout); +class +file_info +{ +public: + file_info (void); + file_info (int num, const char *nm, FILE *t, const char *md); + file_info (const file_info& f); + + file_info& operator = (const file_info& f); + + ~file_info (void); + + int number (void) const; + const char *name (void) const; + FILE *fptr (void) const; + const char *mode (void) const; + + int eof (void) const; + int error (void) const; + +private: + int file_number; + char *file_name; + FILE *file_fptr; + char *file_mode; +}; + #endif /*
--- a/src/oct-map.h +++ b/src/oct-map.h @@ -24,10 +24,6 @@ #if !defined (octave_oct_map_h) #define octave_oct_map_h 1 -#if defined (__GNUG__) -//#pragma interface -#endif - #include "Map.h" #include "tree-const.h"
--- a/src/pt-const.h +++ b/src/pt-const.h @@ -384,9 +384,7 @@ // ------------------------------------------------------------------- -#if defined (__GNUG__) && __GNUC_MINOR__ > 5 private: -#endif // Can we make these go away?
--- a/src/tc-inlines.h +++ b/src/tc-inlines.h @@ -1,4 +1,4 @@ -// tc-inlines.cc -*- C++ -*- +// tc-inlines.h -*- C++ -*- /* Copyright (C) 1992, 1993, 1994 John W. Eaton
--- a/src/tc-rep-ass.cc +++ b/src/tc-rep-ass.cc @@ -47,7 +47,7 @@ #include "idx-vector.h" #include "oct-map.h" -#include "tc-inlines.cc" +#include "tc-inlines.h" // Top-level tree-constant function that handle assignments. Only // decide if the left-hand side is currently a scalar or a matrix and
--- a/src/tc-rep-idx.cc +++ b/src/tc-rep-idx.cc @@ -47,7 +47,7 @@ #include "idx-vector.h" #include "oct-map.h" -#include "tc-inlines.cc" +#include "tc-inlines.h" // Indexing functions.