changeset 798:0acec886a912

[project @ 1994-10-13 04:57:48 by jwe]
author jwe
date Thu, 13 Oct 1994 04:58:40 +0000
parents 21d1e55ee02c
children 47846f7e18fc
files Makeconf.in octMakefile.in src/Makefile.in src/defaults.h.in src/octave.cc src/variables.cc src/variables.h
diffstat 7 files changed, 51 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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@
--- 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
 
--- 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}\";" \
--- 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
--- 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");
--- 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)
 {
--- 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);