$NetBSD: patch-aj,v 1.4 2001/06/25 19:28:42 jtb Exp $

--- Makefile.orig	Mon Jun 11 18:04:42 2001
+++ Makefile
@@ -14,7 +14,7 @@
 #
 # Default targets.
 
-All:	Icont Ilib Ibin
+All:	Icont Iconc Ilib Ibin
 
 config/unix/$(name)/status src/h/define.h:
 	:
@@ -97,18 +97,21 @@
 
 D=$(dest)
 Install:
-		test -d $D || mkdir $D
-		test -d $D/bin || mkdir $D/bin
-		test -d $D/lib || mkdir $D/lib
-		test -d $D/doc || mkdir $D/doc
-		test -d $D/man || mkdir $D/man
-		test -d $D/man/man1 || mkdir $D/man/man1
-		cp README $D
-		cp bin/[a-qs-z]* $D/bin
-		rm -f $D/bin/libXpm*
-		cp lib/*.* $D/lib
-		cp doc/*.* $D/doc
-		cp man/man1/icont.1 $D/man/man1
+		./bin/patchstr ./bin/icont ${PREFIX}/bin/iconx
+		./bin/patchstr ./bin/iconc ${PREFIX}/lib/icon/
+		cd bin; $(BSD_INSTALL_PROGRAM) icont iconx iconc	\
+			patchstr rtt $D/bin
+		$(BSD_INSTALL_DATA_DIR) $D/lib/icon
+		$(BSD_INSTALL_DATA) lib/icon/*.* $D/lib/icon
+		$(BSD_INSTALL_DATA_DIR) $D/share/doc/icon
+		for f in ipatch colrbook colrpick fontpick palette vib	\
+		wevents xgamma; do					\
+		if [ -f bin/$$f ]; then					\
+			${BSD_INSTALL_SCRIPT} bin/$$f $D/bin;		\
+		fi;							\
+		done
+		$(BSD_INSTALL_DATA) doc/*.* $D/share/doc/icon
+		$(BSD_INSTALL_MAN) man/man1/icont.1 $D/man/man1
 
 
 # Bundle up for binary distribution.
