diff -ru ../octave-forge-2004.11.16.orig/extra/mex/Makefile ./extra/mex/Makefile --- ../octave-forge-2004.11.16.orig/extra/mex/Makefile 2004-11-16 07:56:42.000000000 +0100 +++ ./extra/mex/Makefile 2005-01-17 12:22:39.271524116 +0100 @@ -43,23 +43,23 @@ $(INSTALL_DATA) matrix.h $(LIBPATH)/matrix.h ; \ fi endif - @if ! test -e $(man1dir) ; then \ - echo creating $(man1dir) ; \ - $(INSTALL) -d $(man1dir) ; \ + @if ! test -e $(DESTDIR)/$(man1dir) ; then \ + echo creating $(DESTDIR)/$(man1dir) ; \ + $(INSTALL) -d $(DESTDIR)/$(man1dir) ; \ fi - @if test -d $(man1dir) ; then \ - echo installing mex/mex.1 in $(man1dir) ; \ - $(RM) $(man1dir)/mex.1; \ - $(INSTALL_DATA) mex.1 $(man1dir)/mex.1 ; \ + @if test -d $(DESTDIR)/$(man1dir) ; then \ + echo installing mex/mex.1 in $(DESTDIR)/$(man1dir) ; \ + $(RM) $(DESTDIR)/$(man1dir)/mex.1; \ + $(INSTALL_DATA) mex.1 $(DESTDIR)/$(man1dir)/mex.1 ; \ fi - @if ! test -e $(bindir) ; then \ - echo creating $(bindir) ; \ - $(INSTALL) -d $(bindir) ; \ + @if ! test -e $(DESTDIR)/$(bindir) ; then \ + echo creating $(DESTDIR)/$(bindir) ; \ + $(INSTALL) -d $(DESTDIR)/$(bindir) ; \ fi - @if test -d $(bindir) ; then \ - echo installing mex/mex in $(bindir) ; \ - $(RM) $(bindir)/mex ; \ - $(INSTALL_SCRIPT) mex $(bindir)/mex ; \ + @if test -d $(DESTDIR)/$(bindir) ; then \ + echo installing mex/mex in $(DESTDIR)/$(bindir) ; \ + $(RM) $(DESTDIR)/$(bindir)/mex ; \ + $(INSTALL_SCRIPT) mex $(DESTDIR)/$(bindir)/mex ; \ fi clean: ; $(RM) mex mex_* $(MEXLIB) *.o *.oct core octave-core *~