Mercurial > hg > octave-nkf
changeset 4098:8496ae60db8a
[project @ 2002-10-10 05:20:20 by jwe]
author | jwe |
---|---|
date | Thu, 10 Oct 2002 05:20:21 +0000 |
parents | 596f88296519 |
children | 3add04256a60 |
files | ChangeLog Makeconf.in aclocal.m4 configure.in doc/ChangeLog doc/interpreter/Makefile.in glob/ChangeLog glob/configure.in scripts/ChangeLog scripts/Makefile.in scripts/mkdoc scripts/move-if-change src/ChangeLog src/Makefile.in src/pt-plot.cc |
diffstat | 15 files changed, 100 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2002-10-09 John W. Eaton <jwe@bevo.che.wisc.edu> + * aclocal.m4 (OCTAVE_PROG_GNUPLOT): AC_DEFINE GNUPLOT_BINARY + Default value on Windows systems is pgnuplot. + If not cross compiling and no gnuplot program is found, set + default to gnuplot. Set defaults for multiplot and frames. Check + for pgnpuplot, pipe-gnuplot, and gnuplot on Windows systems. + + * configure.in (BUILD_EXEEXT): New variable. + * Makeconf.in (BUILD_EXEEXT): Substitute it here. + * aclocal.m4 (OCTAVE_CXX_PRAGMA_INTERFACE_IMPLEMENTATION): Add second test for OS X.
--- a/Makeconf.in +++ b/Makeconf.in @@ -23,6 +23,8 @@ EXEEXT = @EXEEXT@ +BUILD_EXEEXT = @BUILD_EXEEXT@ + LEX = @LEX@ LFLAGS = @LFLAGS@ LEXLIB = @LEXLIB@
--- a/aclocal.m4 +++ b/aclocal.m4 @@ -471,31 +471,40 @@ dnl dnl Does gnuplot exist? Is it a recent version? dnl -AC_DEFUN(OCTAVE_PROG_GNUPLOT, -[if test "$cross_compiling" = yes; then - GNUPLOT_BINARY=gnuplot +AC_DEFUN(OCTAVE_PROG_GNUPLOT, [ +case "$canonical_host_type" in + *-*-cygwin*|*-*-mingw32*) + gp_names="pgnuplot pipe-gnuplot gnuplot" + gp_default=pgnuplot + ;; + *) + gp_names=gnuplot + gp_default=gnuplot + ;; +esac +GNUPLOT_BINARY="$gp_default" +GNUPLOT_HAS_MULTIPLOT=1 +GNUPLOT_HAS_FRAMES=1 +if test "$cross_compiling" = yes; then AC_MSG_RESULT(assuming $GNUPLOT_BINARY exists on $canonical_host_type host) - AC_SUBST(DEFAULT_PAGER) AC_MSG_RESULT(assuming $GNUPLOT_BINARY supports multiplot mode) - AC_DEFINE(GNUPLOT_HAS_MULTIPLOT, 1, [Define if gnuplot has multiplot.]) AC_MSG_RESULT(assuming $GNUPLOT_BINARY supports multiple frams) - AC_DEFINE(GNUPLOT_HAS_FRAMES, 1, [Define if gnuplot has frames.]) else - AC_CHECK_PROG(GNUPLOT_BINARY, gnuplot, gnuplot, []) + AC_CHECK_PROGS(GNUPLOT_BINARY, $gp_names) if test -n "$GNUPLOT_BINARY"; then AC_MSG_CHECKING([to see if your gnuplot supports multiplot]) if test -z "`echo 'set term unknown; set multiplot' | \ $GNUPLOT_BINARY 2>&1`"; then AC_MSG_RESULT([yes]) - AC_DEFINE(GNUPLOT_HAS_MULTIPLOT, 1) else + GNUPLOT_HAS_MULTIPLOT= AC_MSG_RESULT([no]) fi AC_MSG_CHECKING([to see if your gnuplot supports multiple plot windows]) if test -z "`echo 'set term x11 2' | $GNUPLOT_BINARY 2>&1`"; then AC_MSG_RESULT([yes]) - AC_DEFINE(GNUPLOT_HAS_FRAMES, 1) else + GNUPLOT_HAS_FRAMES= AC_MSG_RESULT([no]) fi else @@ -516,6 +525,9 @@ AC_MSG_WARN([at the Octave prompt.]) fi fi +AC_DEFINE_UNQUOTED(GNUPLOT_BINARY, "$GNUPLOT_BINARY", [Name of gnuplot program.]) +AC_DEFINE_UNQUOTED(GNUPLOT_HAS_MULTIPLOT, $GNUPLOT_HAS_MULTIPLOT, [Define if your gnuplot program supports multiplot mode.]) +AC_DEFINE_UNQUOTED(GNUPLOT_HAS_FRAMES, $GNUPLOT_HAS_FRAMES, [Define if your gnuplot program supports multiple plot windows.]) ]) dnl dnl Is DejaGNU installed?
--- a/configure.in +++ b/configure.in @@ -22,7 +22,7 @@ ### 02111-1307, USA. AC_INIT -AC_REVISION($Revision: 1.373 $) +AC_REVISION($Revision: 1.374 $) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -322,23 +322,28 @@ ### Defaults for cross compiling. BUILD_CC and BUILD_CXX are ### the compilers that we use for building tools on the build system. +### For now, we assume that the only cross compiling we can do is +### with gcc on a Unixy system. if test "$cross_compiling" = yes; then BUILD_CC="gcc" BUILD_CFLAGS="-O2 -g" BUILD_CXX="g++" BUILD_CXXFLAGS="-O2 -g" + BUILD_EXEEXT="" else BUILD_CC=$CC BUILD_CFLAGS="-O2 -g" BUILD_CXX="g++" BUILD_CXXFLAGS="-O2 -g" + BUILD_EXEEXT="$EXEEXT" fi AC_ARG_VAR(BUILD_CC, [build system C compiler (used if cross compiling)]) AC_ARG_VAR(BUILD_CFLAGS, [build system C compiler flags (used if cross compiling)]) AC_ARG_VAR(BUILD_CXX, [build system C++ compiler (used if cross compiling)]) AC_ARG_VAR(BUILD_CXXFLAGS, [build system C++ compiler flags (used if cross compiling)]) +AC_SUBST(BUILD_EXEEXT) dnl This is bogus. We shouldn't have to explicitly add libc too!
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,12 @@ +2002-10-10 John W. Eaton <jwe@bevo.che.wisc.edu> + + * interpreter/Makefile.in (%.texi : %.txi): + Use $(top_srcdir)/move-if-change. + +2002-10-09 John W. Eaton <jwe@bevo.che.wisc.edu> + + * interpreter/Makefile.in: Use $(BUILD_EXEEXT) as appropriate. + 2002-10-08 John W. Eaton <jwe@bevo.che.wisc.edu> * interpreter/Makefile.in (munge-texi, %.o : %.cc):
--- a/doc/interpreter/Makefile.in +++ b/doc/interpreter/Makefile.in @@ -62,12 +62,12 @@ all: octave.info octave.dvi octave.ps octave_toc.html .PHONY: all -$(TEXINFO): src-DOCSTRINGS scripts-DOCSTRINGS munge-texi +$(TEXINFO): src-DOCSTRINGS scripts-DOCSTRINGS munge-texi$(BUILD_EXEEXT) %.o : %.cc $(BUILD_CXX) -c $(INCFLAGS) -DHAVE_CONFIG_H $< -o $@ -munge-texi: munge-texi.o Map-s.o +munge-texi$(BUILD_EXEEXT): munge-texi.o Map-s.o $(BUILD_CXX) -o $@ $^ src-DOCSTRINGS: @@ -83,7 +83,7 @@ @./munge-texi \ -d $(TOPDIR)/src/DOCSTRINGS \ -d $(TOPDIR)/scripts/DOCSTRINGS < $< > $@.t - @mv $@.t $@ + @$(top_srcdir)/move-if-change $@.t $@ octave.info: $(MAIN_TEXINFO) $(SUB_TEXINFO) ../conf.texi -makeinfo -I$(srcdir) -I$(srcdir)/.. $< @@ -179,7 +179,7 @@ octave.cps octave.fns octave.ins octave.kys octave.ops \ octave.pgs octave.rds octave.tps octave.vrs octave.aux \ octave.log octave.toc \ - munge-texi munge-texi.o Map-s.o + munge-texi$(BUILD_EXEEXT) munge-texi.o Map-s.o .PHONY: mostlyclean clean distclean: clean
--- a/glob/ChangeLog +++ b/glob/ChangeLog @@ -1,3 +1,7 @@ +2002-10-10 Paul Kienzle <pkienzle@users.sf.net> + + * configure.in: Use AH_BOTTOM to maybe define WINDOWS32. + 2002-10-09 John W. Eaton <jwe@bevo.che.wisc.edu> * fnmatch.h, glob.h, fnmatch.c, glob.c: Update to latest GNU sources.
--- a/glob/configure.in +++ b/glob/configure.in @@ -18,5 +18,10 @@ AC_FUNC_CLOSEDIR_VOID AC_FUNC_ALLOCA AC_FUNC_STRCOLL +AH_BOTTOM([ +#if defined (__WIN32__) && ! defined (_POSIX_VERSION) +#define WINDOWS32 +#endif +]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,10 @@ +2002-10-09 John W. Eaton <jwe@bevo.che.wisc.edu> + + * mkdoc: Exit immediately on errors. + Exit with error if gethelp does not exist. + + * Makefile.in: Use $(BUILD_EXEEXT) as appropriate. + 2002-10-08 John W. Eaton <jwe@bevo.che.wisc.edu> * Makefile.in (gethelp): Use $(BUILD_CXX), not $(CXX).
--- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -26,7 +26,7 @@ ALL_M_FILES := $(patsubst $(srcdir)/%, %, $(ALL_M_FILES1)) DISTFILES = Makefile.in ChangeLog $(SOURCES) configure.in \ - configure mkinstalldirs move-if-change mkdoc gethelp.cc \ + configure mkinstalldirs mkdoc gethelp.cc \ skip-autoheader DOCSTRINGS SUBDIRS = audio control deprecated elfun finance general image io \ @@ -48,11 +48,11 @@ $(MAKE) -C $@ all .PHONY: $(SUBDIRS) -DOCSTRINGS: gethelp mkdoc $(ALL_M_FILES) +DOCSTRINGS: gethelp$(BUILD_EXEEXT) mkdoc $(ALL_M_FILES) $(srcdir)/mkdoc $(srcdir) > $@.t mv $@.t $@ -gethelp: gethelp.cc +gethelp$(BUILD_EXEEXT): gethelp.cc $(BUILD_CXX) -o $@ $^ install install-strip uninstall clean mostlyclean distclean maintainer-clean:: @@ -77,7 +77,7 @@ etags $(SOURCES) clean:: - rm -f gethelp + rm -f gethelp$(BUILD_EXEEXT) distclean:: rm -f Makefile config.log config.status
--- a/scripts/mkdoc +++ b/scripts/mkdoc @@ -1,11 +1,18 @@ #! /bin/sh +set -e + if test $# != 1; then d=. else d=$1 fi -find $d -name '*.m' | \ - sed "s,\(.*\)/\(.*\)\.m,./gethelp \2 < & | sed 's/^ *@/@/'," | \ - /bin/sh +if test -f gethelp; then + find $d -name '*.m' | \ + sed "s,\(.*\)/\(.*\)\.m,./gethelp \2 < & | sed 's/^ *@/@/'," | \ + /bin/sh +else + echo "gethelp program seems to be missing!" 1>&2 + exit 1 +fi \ No newline at end of file
deleted file mode 100755 --- a/scripts/move-if-change +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# Like mv $1 $2, but if the files are the same, just delete $1. -# Status is 0 if $2 is changed, 1 otherwise. - -if test -r $2; then - if cmp $1 $2 > /dev/null; then - echo $2 is unchanged - rm -f $1 - else - mv -f $1 $2 - fi -else - mv -f $1 $2 -fi
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,14 @@ +2002-10-10 John W. Eaton <jwe@bevo.che.wisc.edu> + + * move-if-change: Delete. + * Makefile.in (DISTFILES): Delete it from the list. + 2002-10-09 John W. Eaton <jwe@bevo.che.wisc.edu> + * Makefile.in: Use $(EXEEXT) and $(BUILD_EXEEXT) as appropriate. + + * pt-plot.cc (Vgnuplot_binary): Use GNUPLOT_BINARY as default. + * octave.cc (execute_startup_files): Use octave_env::getcwd instead of "./". Use OCTAVE_DIR_SEP_STR instead of "/".
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -215,7 +215,7 @@ BINDISTFILES = octave $(OCT_FILES) endif -all: octave DOCSTRINGS +all: octave$(EXEEXT) DOCSTRINGS .PHONY: all objects: $(OBJECTS) @@ -264,10 +264,10 @@ stamp-prereq: defaults.h oct-conf.h $(OPT_HANDLERS) touch stamp-prereq -octave: stamp-prereq $(LIBRARIES) stamp-oct-links \ +octave$(EXEEXT): stamp-prereq $(LIBRARIES) stamp-oct-links \ octave.o builtins.o ops.o $(DLD_STATIC_OBJ) $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \ - $(ALL_LDFLAGS) -o octave \ + $(ALL_LDFLAGS) -o $@ \ octave.o builtins.o ops.o $(XERBLA) $(DLD_STATIC_OBJ) \ $(OCTAVE_LFLAGS) \ $(OCTAVE_LIBS) \ @@ -300,7 +300,7 @@ @$(srcdir)/mkbuiltins def-files var-files > $@-t @$(top_srcdir)/move-if-change $@-t $@ -DOCSTRINGS: gendoc +DOCSTRINGS: gendoc$(BUILD_EXEEXT) ./gendoc > $@-t mv $@-t $@ @@ -315,7 +315,7 @@ @$(srcdir)/mkgendoc doc-files > $@-t @$(top_srcdir)/move-if-change $@-t $@ -gendoc: gendoc.cc +gendoc$(BUILD_EXEEXT): gendoc.cc $(BUILD_CXX) -o $@ $^ ops.cc: $(OP_SRC) mkops @@ -409,7 +409,7 @@ etags $(SOURCES) $(DLD_SRC) clean: - rm -f *.$(LIBEXT) *.o *.d *.df *.oct pic/*.o stmp-pic gendoc + rm -f *.$(LIBEXT) *.o *.d *.df *.oct pic/*.o stmp-pic gendoc$(EXEEXT) rm -f builtins.cc ops.cc defaults.h oct-conf.h def-files var-files -rmdir pic if $(SHARED_LIBS); then rm -f *.$(SHLEXT_VER) *.$(SHLEXT); fi @@ -419,7 +419,7 @@ .PHONY: mostlyclean distclean: clean - rm -f Makefile octave .fname so_locations + rm -f Makefile octave$(EXEEXT) .fname so_locations rm -f stamp-prereq stamp-oct-links .PHONY: distclean
--- a/src/pt-plot.cc +++ b/src/pt-plot.cc @@ -1300,7 +1300,7 @@ inefficient, the default value is 0.\n\ @end defvr"); - DEFVAR (gnuplot_binary, "gnuplot", gnuplot_binary, + DEFVAR (gnuplot_binary, GNUPLOT_BINARY, gnuplot_binary, "-*- texinfo -*-\n\ @defvr {Built-in Variable} gnuplot_binary\n\ The name of the program invoked by the plot command. The default value\n\ @@ -1347,7 +1347,7 @@ @defvr {Built-in Variable} gnuplot_command_end\n\ @end defvr"); -#ifdef GNUPLOT_HAS_FRAMES +#if defined (GNUPLOT_HAS_FRAMES) double with_frames = 1.0; #else double with_frames = 0.0; @@ -1363,7 +1363,7 @@ configure got it wrong, or if you upgrade your gnuplot installation.\n\ @end defvr"); -#ifdef GNUPLOT_HAS_MULTIPLOT +#if defined (GNUPLOT_HAS_MULTIPLOT) double with_multiplot = 1.0; #else double with_multiplot = 0.0;