diff -Naur fish-1.9.1/Makefile.in fish-1.9.1-with-prefix-and-uninstall/Makefile.in
--- fish-1.9.1/Makefile.in	2005-05-18 20:25:56.000000000 +0200
+++ fish-1.9.1-with-prefix-and-uninstall/Makefile.in	2005-05-22 19:09:36.000000000 +0200
@@ -34,6 +34,7 @@
 CPPFLAGS=@CPPFLAGS@
 LDFLAGS:= -l@CURSESLIB@ @LDFLAGS@ @LIBDIR@
 INSTALL:=@INSTALL@
+PREFIX:=@prefix@
 
 # All objects used by fish, that are compiled from an ordinary .c file
 # using an ordinary .h file.
@@ -222,9 +223,9 @@
 	echo "}" >>$@
 #man -- doc_src/builtin_doc/man/man1/`basename $@ .c`.1 | cat -s | ./gen_hdr2 >>$@
 install: all 
-	$(INSTALL) -m 755 -o 0 -g 0 -d $(DESTDIR)/usr/local/bin/ 
+	$(INSTALL) -m 755 -o 0 -g 0 -d $(DESTDIR)$(PREFIX)/bin/ 
 	for i in $(PROGRAMS); do\
-		$(INSTALL) -m 755 -o 0 -g 0 $$i $(DESTDIR)/usr/local/bin; \
+		$(INSTALL) -m 755 -o 0 -g 0 $$i $(DESTDIR)$(PREFIX)/bin; \
 	done;
 	$(INSTALL) -m 755 -o 0 -g 0 -d $(DESTDIR)/etc/fish.d 
 	$(INSTALL) -o 0 -g 0 -m 644 init/fish $(DESTDIR)/etc 
@@ -236,12 +237,12 @@
 	for i in user_doc/html/*; do \
 		$(INSTALL) -m 644 -o 0 -g 0 $$i $(DESTDIR)/usr/share/doc/fish/; \
 	done
-	$(INSTALL) -o 0 -g 0 -m 755 -d $(DESTDIR)/usr/local/man/man1
+	$(INSTALL) -o 0 -g 0 -m 755 -d $(DESTDIR)$(PREFIX)/man/man1
 	for i in doc_src/fish.1 xsel-0.9.6/xsel.1x doc_src/builtin_doc/man/man1/mimedb.1 doc_src/builtin_doc/man/man1/set_color.1 doc_src/builtin_doc/man/man1/tokenize.1; do \
-		$(INSTALL) -m 644 -o 0 -g 0 $$i $(DESTDIR)/usr/local/man/man1/; \
+		$(INSTALL) -m 644 -o 0 -g 0 $$i $(DESTDIR)$(PREFIX)/man/man1/; \
 	done;
 	echo If you want to use fish as the default shell, remember to first
-	echo add the line \'/usr/local/bin/fish\' to the file \'/etc/shells\'.
+	echo add the line \'$(DESTDIR)$(PREFIX)/bin/fish\' to the file \'/etc/shells\'.
 
 #Local install
 install_local: all 
@@ -263,7 +264,12 @@
 	echo add the line \'$(HOME)/bin/fish\' to the file \'/etc/shells\'.
 
 uninstall:
-	rm -f $(DESTDIR)/usr/local/bin/fish $(DESTDIR)/usr/local/bin/tokenize $(DESTDIR)/usr/local/bin/set_color $(DESTDIR)/usr/local/bin/xsel $(DESTDIR)/usr/local/bin/mimedb
+	for i in $(PROGRAMS); do\
+		rm -rf  $(DESTDIR)$(PREFIX)/bin/$i; \
+	done;
+	for i in fish.1 xsel.1x mimedb.1 set_color.1 tokenize.1; do \
+		rm -rf $(DESTDIR)$(PREFIX)/man/man1/$i; \
+	done;
 	rm -f $(DESTDIR)/etc/fish 
 	rm -f $(DESTDIR)/etc/fish_inputrc
 	rm -f $(DESTDIR)/etc/fish.d/fish_function.fish $(DESTDIR)/etc/fish.d/fish_complete.fish $(DESTDIR)/etc/fish.d/fish_alias.fish $(DESTDIR)/etc/fish.d/fish_interactive.fish

