# HG changeset patch # User jwe # Date 1034884723 0 # Node ID f4bf4833e6c7a40a346db4788c68b15792683e58 # Parent c4ede5f4a03c4d9c2472946014e166e47dd24298 [project @ 2002-10-17 19:58:42 by jwe] diff -r c4ede5f4a03c -r f4bf4833e6c7 src/ChangeLog --- a/src/ChangeLog Thu Oct 17 16:33:37 2002 +0000 +++ b/src/ChangeLog Thu Oct 17 19:58:43 2002 +0000 @@ -1,5 +1,15 @@ 2002-10-17 John W. Eaton + * main.c: New file. + * octave.h: New file. + * octave.cc (octave_main): Rename from main. + Include octave.h. + * Makefile.in (OBJECTS): Add octave.o, builtins.o, and ops.o to + the list. + (octave): Depend on and link main.o, not octave.o, builtins.o, and + ops.o (they are now in liboctinterp). + (DEP_5): Add main.c here. + * oct-conf.h.in: No need to substitute OCTAVE_CONF_OCTAVE_LITE. * toplev.cc (octave_config_info): Likewise, don't include it in struct. diff -r c4ede5f4a03c -r f4bf4833e6c7 src/Makefile.in --- a/src/Makefile.in Thu Oct 17 16:33:37 2002 +0000 +++ b/src/Makefile.in Thu Oct 17 19:58:43 2002 +0000 @@ -148,7 +148,7 @@ 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)) +OBJECTS := $(patsubst %.cc, %.o, $(OBJECTS_1)) octave.o builtins.o ops.o ifeq ($(SHARED_LIBS), true) ifdef CXXPICFLAG @@ -160,7 +160,7 @@ # Ugh. -DEP_5 := $(SOURCES) $(DLD_SRC) builtins.cc ops.cc octave.cc +DEP_5 := $(SOURCES) $(DLD_SRC) builtins.cc ops.cc octave.cc main.c DEP_4 := $(notdir $(DEP_5)) DEP_3 := $(patsubst %.l, %.cc, $(DEP_4)) DEP_2 := $(patsubst %.y, %.cc, $(DEP_3)) @@ -274,10 +274,10 @@ touch stamp-prereq octave$(EXEEXT): stamp-prereq $(LIBRARIES) stamp-oct-links \ - octave.o builtins.o ops.o $(DLD_STATIC_OBJ) + main.o $(DLD_STATIC_OBJ) $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \ $(ALL_LDFLAGS) -o $@ \ - octave.o builtins.o ops.o $(XERBLA) $(DLD_STATIC_OBJ) \ + main.o $(XERBLA) $(DLD_STATIC_OBJ) \ $(OCTAVE_LFLAGS) \ $(OCTAVE_LIBS) \ $(LEXLIB) $(BLAS_LIBS) $(FFTW_LIBS) $(LIBS) $(FLIBS) diff -r c4ede5f4a03c -r f4bf4833e6c7 src/main.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main.c Thu Oct 17 19:58:43 2002 +0000 @@ -0,0 +1,39 @@ +/* + +Copyright (C) 2002 John W. Eaton + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "octave.h" + +int +main (int argc, char **argv) +{ + return octave_main (argc, argv); +} + +/* +;;; Local Variables: *** +;;; mode: C++ *** +;;; End: *** +*/ diff -r c4ede5f4a03c -r f4bf4833e6c7 src/octave.cc --- a/src/octave.cc Thu Oct 17 16:33:37 2002 +0000 +++ b/src/octave.cc Thu Oct 17 19:58:43 2002 +0000 @@ -57,6 +57,7 @@ #include "file-io.h" #include "input.h" #include "lex.h" +#include "octave.h" #include "oct-hist.h" #include "oct-obj.h" #include "ops.h" @@ -362,7 +363,7 @@ // You guessed it. int -main (int argc, char **argv) +octave_main (int argc, char **argv) { octave_env::set_program_name (argv[0]); diff -r c4ede5f4a03c -r f4bf4833e6c7 src/octave.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/octave.h Thu Oct 17 19:58:43 2002 +0000 @@ -0,0 +1,42 @@ +/* + +Copyright (C) 2002 John W. Eaton + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#if !defined (octave_octave_h) +#define octave_octave_h 1 + +#ifdef __cplusplus +extern "C" { +#endif + +extern int octave_main (int argc, char **argv); + +#ifdef __cplusplus +} +#endif + +#endif + +/* +;;; Local Variables: *** +;;; mode: C++ *** +;;; End: *** +*/