# HG changeset patch # User jwe # Date 782024320 0 # Node ID 0acec886a912d7e0537f95fd9042c45025832766 # Parent 21d1e55ee02c4b6a96d95dfb89b69f98ce722042 [project @ 1994-10-13 04:57:48 by jwe] diff -r 21d1e55ee02c -r 0acec886a912 Makeconf.in --- a/Makeconf.in Thu Oct 13 04:47:12 1994 +0000 +++ b/Makeconf.in Thu Oct 13 04:58:40 1994 +0000 @@ -34,6 +34,7 @@ # Fortran compiler flags. +F77 = @F77@ FFLAGS = @FFLAGS@ # cc and associated flags. @@ -63,6 +64,8 @@ GCC_IEEE_FP_FLAG = @GCC_IEEE_FP_FLAG@ ALL_CFLAGS = $(INCFLAGS) $(DEFS) $(GCC_IEEE_FP_FLAG) $(CFLAGS) UGLY_ALL_CFLAGS = $(INCFLAGS) $(UGLY_DEFS) $(GCC_IEEE_FP_FLAG) $(CFLAGS) +BUG_CFLAGS = $(DEFS) $(GCC_IEEE_FP_FLAG) $(CFLAGS) + CXX = @CXX@ CXXCPP = @CXXCPP@ @@ -72,6 +75,7 @@ $(GCC_IEEE_FP_FLAG) $(CXXFLAGS) UGLY_ALL_CXXFLAGS = $(INCFLAGS) $(UGLY_DEFS) $(NO_IMPLICIT_TEMPLATES) \ $(GCC_IEEE_FP_FLAG) $(CXXFLAGS) +BUG_CXXFLAGS = $(DEFS) $(NO_IMPLICIT_TEMPLATES) $(GCC_IEEE_FP_FLAG) $(CXXFLAGS) LDFLAGS = @LDFLAGS@ LD_STATIC_FLAG = @LD_STATIC_FLAG@ diff -r 21d1e55ee02c -r 0acec886a912 octMakefile.in --- a/octMakefile.in Thu Oct 13 04:47:12 1994 +0000 +++ b/octMakefile.in Thu Oct 13 04:58:40 1994 +0000 @@ -18,8 +18,8 @@ Makeconf.in NEWS PROJECTS README README.NLP SENDING-PATCHES \ THANKS f2c-compat.sh flibs.sh cxxlibs.sh configure configure.in \ config.guess config.sub float-type.c move-if-change octave.sh \ - octave-mode.el install.sh doinstall.sh mkpath.c config.h.in \ - acconfig.h MAKEINFO.PATCH ChangeLog ChangeLog.[0-9] + octave-bug.in octave-mode.el install.sh doinstall.sh mkpath.c \ + config.h.in acconfig.h MAKEINFO.PATCH ChangeLog ChangeLog.[0-9] # Complete directory trees to distribute. DISTDIRS = bsd-math kpathsea @@ -37,17 +37,30 @@ # Subdirectories to run `make dist' in BINDISTSUBDIRS = doc scripts -DIRS_TO_MAKE = $(fcnfiledir) $(octfiledir) $(archlibdir) \ +DIRS_TO_MAKE = $(bindir) $(fcnfiledir) $(octfiledir) $(archlibdir) \ `echo $(localfcnfilepath) | awk -F: '{for (i=1; i<=NF; i++) print $i}'` \ `echo $(localoctfilepath) | awk -F: '{for (i=1; i<=NF; i++) print $i}'` -all: mkpath +all: mkpath octave-bug for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $@; cd ..; done .PHONY: all mkpath: $(CC) $(ALL_CFLAGS) $(srcdir)/mkpath.c -o mkpath +octave-bug: octave-bug.in + @(sed < $< > $@.tmp \ + -e "s;%VERSION%;${version};" \ + -e "s;%TARGET_HOST_TYPE%;${target_host_type};" \ + -e "s;%F77%;${F77};" \ + -e "s;%FFLAGS%;${FFLAGS};" \ + -e "s;%CC%;${CC};" \ + -e "s;%CFLAGS%;${BUG_CFLAGS};" \ + -e "s;%CXX%;${CXX};" \ + -e "s;%CXXFLAGS%;${BUG_CXXFLAGS};" \ + -e "s;%DEFS%;${UGLY_DEFS};") + @mv $@.tmp $@ + libcruft: cd libcruft ; $(MAKE) all .PHONY: libcruft @@ -104,6 +117,7 @@ for dir in $(DIRS_TO_MAKE) ; do \ if test -d $$dir ; then true ; else ./mkpath $$dir ; fi ; \ done + install -m 755 octave-bug $(bindir)/octave-bug for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $@; cd ..; done .PHONY: install diff -r 21d1e55ee02c -r 0acec886a912 src/Makefile.in --- a/src/Makefile.in Thu Oct 13 04:47:12 1994 +0000 +++ b/src/Makefile.in Thu Oct 13 04:58:40 1994 +0000 @@ -208,6 +208,7 @@ -e "s;%OCTAVE_PREFIX%;\"${prefix}\";" \ -e "s;%OCTAVE_EXEC_PREFIX%;\"${exec_prefix}\";" \ -e "s;%OCTAVE_DATADIR%;\"${datadir}\";" \ + -e "s;%OCTAVE_BINDIR%;\"${bindir}\";" \ -e "s;%OCTAVE_LIBDIR%;\"${libdir}\";" \ -e "s;%OCTAVE_INFODIR%;\"${infodir}\";" \ -e "s;%OCTAVE_FCNFILEDIR%;\"${fcnfiledir}\";" \ diff -r 21d1e55ee02c -r 0acec886a912 src/defaults.h.in --- a/src/defaults.h.in Thu Oct 13 04:47:12 1994 +0000 +++ b/src/defaults.h.in Thu Oct 13 04:58:40 1994 +0000 @@ -44,6 +44,10 @@ #define OCTAVE_LIBDIR %OCTAVE_LIBDIR% #endif +#ifndef OCTAVE_BINDIR +#define OCTAVE_BINDIR %OCTAVE_BINDIR% +#endif + #ifndef OCTAVE_INFODIR #define OCTAVE_INFODIR %OCTAVE_INFODIR% #endif diff -r 21d1e55ee02c -r 0acec886a912 src/octave.cc --- a/src/octave.cc Thu Oct 13 04:47:12 1994 +0000 +++ b/src/octave.cc Thu Oct 13 04:58:40 1994 +0000 @@ -213,16 +213,25 @@ char *shell_path = getenv ("PATH"); char *arch_dir = octave_arch_lib_dir (); - char *tmp = strconcat (shell_path, ":"); + char *bin_dir = octave_bin_dir (); - shell_path = shell_path ? strconcat (tmp, arch_dir) - : strsave (arch_dir); + int len = strlen (arch_dir) + strlen (bin_dir) + 7; + + char *putenv_cmd = 0; - delete [] tmp; + if (shell_path) + { + len += strlen (shell_path) + 1; + putenv_cmd = new char [len]; + sprintf (putenv_cmd, "PATH=%s:%s:%s", shell_path, arch_dir, bin_dir); + } + else + { + putenv_cmd = new char [len]; + sprintf (putenv_cmd, "PATH=%s:%s", arch_dir, bin_dir); + } - char *putenv_command = strconcat ("PATH=", shell_path); - - putenv (putenv_command); + putenv (putenv_cmd); raw_prog_name = strsave (name); prog_name = strsave ("octave"); diff -r 21d1e55ee02c -r 0acec886a912 src/variables.cc --- a/src/variables.cc Thu Oct 13 04:47:12 1994 +0000 +++ b/src/variables.cc Thu Oct 13 04:58:40 1994 +0000 @@ -348,6 +348,13 @@ return retval; } +char * +octave_bin_dir (void) +{ + static char *retval = subst_octave_home (OCTAVE_BINDIR); + return retval; +} + static char * default_pager (void) { diff -r 21d1e55ee02c -r 0acec886a912 src/variables.h --- a/src/variables.h Thu Oct 13 04:47:12 1994 +0000 +++ b/src/variables.h Thu Oct 13 04:58:40 1994 +0000 @@ -113,6 +113,7 @@ extern char *octave_lib_dir (void); extern char *octave_arch_lib_dir (void); +extern char *octave_bin_dir (void); extern char *default_path (void); extern char *default_info_file (void); extern char *default_editor (void);