From octave-sources-request at bevo dot che dot wisc dot edu Wed Jul 11 14:57:39 2001 Subject: Re: octave-config script From: Rafael Laboissiere To: Etienne Grossmann Cc: octave-sources at bevo dot che dot wisc dot edu Date: Wed, 11 Jul 2001 21:55:47 +0200 --ALfTUftag+2gvp1h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Etienne Grossmann [2001/07/11 20:46]: > just to say that patch nearly works w/ 2.1.34 : it gripes for > the 'Changelog' file (that's normal). However, > > octave-config --version > > returns %OCTAVE_VERSION% . Sorry, I don't know enough about > autoconf (I guess) to fix it myself. The entry for Makeconf.in was mistakenly lacking in my previous patch. I am attaching a new one below (hopefully correct), from which I removed the ChangeLog entry. Try it, please. -- Rafael --ALfTUftag+2gvp1h Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff-octave-config diff -Naur octave-cvs-20010711/Makeconf.in octave-cvs-20010711-config/Makeconf.in --- octave-cvs-20010711/Makeconf.in Wed Jul 11 21:47:46 2001 +++ octave-cvs-20010711-config/Makeconf.in Wed Jul 11 21:49:21 2001 at @ -445,6 +445,7 @@ -e "s;%OCTAVE_OCTFILEDIR%;\"${octfiledir}\";" \ -e "s;%OCTAVE_OCTINCLUDEDIR%;\"${octincludedir}\";" \ -e "s;%OCTAVE_OCTLIBDIR%;\"${octlibdir}\";" \ - -e "s;%OCTAVE_PREFIX%;\"${prefix}\";" + -e "s;%OCTAVE_PREFIX%;\"${prefix}\";" \ + -e "s;%OCTAVE_VERSION%;\"${version}\";" $(top_srcdir)/move-if-change $ at dot tmp $@ endef diff -Naur octave-cvs-20010711/Makefile.in octave-cvs-20010711-config/Makefile.in --- octave-cvs-20010711/Makefile.in Wed Jul 11 14:17:58 2001 +++ octave-cvs-20010711-config/Makefile.in Wed Jul 11 14:22:33 2001 at @ -9,7 +9,7 @@ TARGETS = octave-bug mkoctfile libcruft liboctave kpathsea dlfcn \ readline src scripts doc check octave.info INSTALL.OCTAVE BUGS \ install install-strip uninstall tags TAGS dist conf-dist \ - snapshot snapshot-version + snapshot snapshot-version octave-config NO_DEP_TARGETS = clean mostlyclean distclean maintainer-clean at @ -85,6 +85,7 @@ at echo " maintainer-clean clean up everything" at echo "" at echo " octave-bug create octave-bug script" + at echo " octave-config create octave-config script" at echo " mkoctfile create mkoctfile script" at echo " INSTALL.OCTAVE create INSTALL.OCTAVE doc file" at echo " BUGS create BUGS doc file" diff -Naur octave-cvs-20010711/install-octave.in octave-cvs-20010711-config/install-octave.in --- octave-cvs-20010711/install-octave.in Wed Jul 11 14:17:58 2001 +++ octave-cvs-20010711-config/install-octave.in Wed Jul 11 14:22:33 2001 at @ -217,6 +217,10 @@ cp octave-bug $bindir/octave-bug chmod 755 $bindir/octave-bug +echo "installing octave-config as $bindir/octave-config" +cp octave-config $bindir/octave-config +chmod 755 $bindir/octave-config + if test -f LIBRARIES; then echo "installing shared libraries in $octlibdir" for f in `cat LIBRARIES` diff -Naur octave-cvs-20010711/octMakefile.in octave-cvs-20010711-config/octMakefile.in --- octave-cvs-20010711/octMakefile.in Wed Jul 11 14:17:58 2001 +++ octave-cvs-20010711-config/octMakefile.in Wed Jul 11 14:22:33 2001 at @ -28,7 +28,7 @@ PROJECTS README README.Linux README.Windows README.MachTen ROADMAP \ SENDING-PATCHES THANKS move-if-change octave-sh octave-bug.in \ install-octave.in mkinstalldirs mkoctfile.in texi2dvi \ - ChangeLog ChangeLog.[0-9] + ChangeLog ChangeLog.[0-9] octave-config.in # Complete directory trees to distribute. DISTDIRS = glob kpathsea # plplot at @ -54,7 +54,7 @@ ChangeLog ChangeLog.[0-9] BINDISTFILES = $(addprefix $(srcdir)/, $(XBINDISTFILES)) \ - octave-bug config.status config.h VERSION ARCH + octave-bug octave-config config.status config.h VERSION ARCH # Subdirectories in which to run `make bin-dist'. BINDISTSUBDIRS = libcruft liboctave src scripts doc emacs examples at @ -67,7 +67,7 @@ `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: octave-bug mkoctfile src +all: octave-bug octave-config mkoctfile src .PHONY: all src: $(SUBDIRS) at @ -78,6 +78,10 @@ at $(do-subst-config-vals) chmod a+rx $ at +octave-config: octave-config.in Makeconf octMakefile + at $(do-subst-default-vals) + chmod a+rx $ at + mkoctfile: mkoctfile.in Makeconf octMakefile at $(do-subst-config-vals) chmod a+rx $ at at @ -107,6 +111,9 @@ rm -f $(bindir)/octave-bug $(INSTALL_SCRIPT) octave-bug $(bindir)/octave-bug-$(version) cd $(bindir); $(LN_S) octave-bug-$(version) octave-bug + rm -f $(bindir)/octave-config + $(INSTALL_SCRIPT) octave-config $(bindir)/octave-config-$(version) + cd $(bindir); $(LN_S) octave-config-$(version) octave-config rm -f $(bindir)/mkoctfile $(INSTALL_SCRIPT) mkoctfile $(bindir)/mkoctfile-$(version) cd $(bindir); $(LN_S) mkoctfile-$(version) mkoctfile at @ -131,7 +138,7 @@ .PHONY: clean mostlyclean distclean maintainer-clean maintainer-clean distclean:: - rm -f octMakefile octave-bug Makeconf config.cache \ + rm -f octMakefile octave-bug octave-config Makeconf config.cache \ config.h config.log config.status Makerules.f77 mk-oct-links \ mkoctfile Makefrag.f77 at @ -216,7 +223,7 @@ echo $(canonical_host_type) > ARCH .PHONY: ARCH -binary-dist: VERSION ARCH octave-bug dist-info-files +binary-dist: VERSION ARCH octave-bug octave-config dist-info-files echo octave-$(version)-$(canonical_host_type) > .fname rm -rf `cat .fname` mkdir `cat .fname` diff -Naur octave-cvs-20010711/octave-config.in octave-cvs-20010711-config/octave-config.in --- octave-cvs-20010711/octave-config.in Thu Jan 1 01:00:00 1970 +++ octave-cvs-20010711-config/octave-config.in Wed Jul 11 21:49:57 2001 at @ -0,0 +1,46 @@ +#! /bin/sh - +# +# octave-config - reports some configuration values for Octave +# +# Rafael Laboissiere +# This script is in the public domain + +VERSION=%OCTAVE_VERSION% +OCT_SITE_DIR=%OCTAVE_LOCALVEROCTFILEDIR% +M_SITE_DIR=%OCTAVE_LOCALVERFCNFILEDIR% + +usage() +{ + cat <&2 +fi + +while test $# -gt 0; do + + case $1 in + --version) + echo $VERSION + ;; + --oct-site-dir) + echo $OCT_SITE_DIR + ;; + --m-site-dir) + echo $M_SITE_DIR + ;; + --help|*) + usage 1 1>&2 + ;; + esac + shift +done --ALfTUftag+2gvp1h--