Mercurial > hg > octave-terminal
changeset 2639:f95e58a25c90
[project @ 1997-01-28 17:20:29 by jwe]
author | jwe |
---|---|
date | Tue, 28 Jan 1997 17:20:30 +0000 |
parents | 652a14bff36b |
children | e716dfd6c63a |
files | liboctave/Makefile.in src/Makefile.in |
diffstat | 2 files changed, 20 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -181,15 +181,17 @@ rm -f $(octincludedir)/$$f ; \ $(INSTALL_DATA) $(srcdir)/$$f $(octincludedir)/$$f ; \ done - linkdir=`echo $(octincludedir) | sed 's/-$(version)$$//'` ; \ - if [ "$$linkdir" = $(octincludedir) ] ; then \ + tmp=`echo $(octincludedir) | sed 's|/*$$||'` ; \ + dir=`echo $$tmp | sed 's|[^/]*$$||'` ; \ + src=`echo $$tmp | sed 's|^.*/||'` ; \ + dest=`echo $$src | sed 's|-$(version)$$||'` ; \ + if [ "$$src" = "$$dest" ] ; then \ true ; \ else \ - if [ -d $$linkdir ] ; then \ + if [ -d $$dir/$$dest ] ; then \ true ; \ else \ - rm -f $$linkdir ; \ - $(LN_S) $(octincludedir) $$linkdir ; \ + cd $$dir ; rm -f $$dest && $(LN_S) $$src $$dest ; \ fi ; \ fi .PHONY: install-inc
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -261,9 +261,9 @@ install-bin: $(top_srcdir)/mkinstalldirs $(bindir) - rm -f $(bindir)/octave + rm -f $(bindir)/octave$(EXE) $(INSTALL_PROGRAM) octave$(EXE) $(bindir)/octave-$(version)$(EXE) - $(LN_S) $(bindir)/octave-$(version)$(EXE) $(bindir)/octave$(EXE) + cd $(bindir) ; $(LN_S) octave-$(version)$(EXE) octave$(EXE) .PHONY: install-bin install-oct: mk-oct-links @@ -297,13 +297,20 @@ rm -f $(octincludedir)/$$f ; \ $(INSTALL_DATA) $$f $(octincludedir)/$$f ; \ done - linkdir=`echo $(octincludedir) | sed 's/-$(version)$$//'` ; \ - if [ "$$linkdir" = $(octincludedir) ] ; then \ + tmp=`echo $(octincludedir) | sed 's|/*$$||'` ; \ + dir=`echo $$tmp | sed 's|[^/]*$$||'` ; \ + src=`echo $$tmp | sed 's|^.*/||'` ; \ + dest=`echo $$src | sed 's|-$(version)$$||'` ; \ + if [ "$$src" = "$$dest" ] ; then \ true ; \ else \ - rm -f $$linkdir && $(LN_S) $(octincludedir) $$linkdir ; \ + if [ -d $$dir/$$dest ] ; then \ + true ; \ + else \ + cd $$dir ; rm -f $$dest && $(LN_S) $$src $$dest ; \ + fi ; \ fi -.PHONY: install-lib +.PHONY: install-inc uninstall: rm -f $(bindir)/octave$(EXE)