shithub: mc

Download patch

ref: 609ec770191522854da18e8f6095a86ce61882ab
parent: c104f230dc27e371b3cdc1893127ad74891bb0ec
author: glenda@cirno <glenda@cirno>
date: Fri May 15 08:15:50 EDT 2015

Add working 'uninstall' targets.

--- a/6/mkfile
+++ b/6/mkfile
@@ -22,3 +22,6 @@
 
 BIN=/$objtype/bin
 </sys/src/cmd/mkone
+
+uninstall:V:
+	rm -f /$objtype/bin/$TARG
--- a/doc/mkfile
+++ b/doc/mkfile
@@ -7,6 +7,8 @@
 
 install:V: $MANS
 
+uninstall:V: $MANS
+
 nuke:V: $MANS
 
 clean:V: $MANS
--- a/mbldwrap.sh
+++ b/mbldwrap.sh
@@ -16,3 +16,4 @@
 	export MYR_RT=../rt/_myrrt.o
 	./bootstrap.sh
 fi
+exit 0
--- a/mi/mkfile
+++ b/mi/mkfile
@@ -15,3 +15,8 @@
 
 </sys/src/cmd/mklib
 
+install:V: $LIB
+	touch $LIB
+
+uninstall:V:
+	echo $LIB: nothing to uninstall
--- a/mkfile
+++ b/mkfile
@@ -40,7 +40,7 @@
 uninstall:V: $SUB config.h
 	for(dir in $SUB)@{
 		cd $dir
-		mk $MKFLAGS
+		mk $MKFLAGS uninstall
 	}
 	ape/psh mbldwrap.sh uninstall
 
--- a/muse/mkfile
+++ b/muse/mkfile
@@ -11,3 +11,6 @@
 
 BIN=/$objtype/bin
 </sys/src/cmd/mkone
+
+uninstall:
+	rm -f /$objtype/bin/$TARG
--- a/parse/mkfile
+++ b/parse/mkfile
@@ -25,7 +25,9 @@
 
 install:V: $LIB
 	touch $LIB
-	
+
+uninstall:V:
+	echo nothing to uninstall
 
 gram.c gram.h: gram.y
 	yacc -d -S gram.y
--- a/rt/mkfile
+++ b/rt/mkfile
@@ -9,6 +9,9 @@
 	mkdir -p /$objtype/lib/myr
 	cp _myrrt.$O /$objtype/lib/myr
 
+uninstall:V:
+	rm -f /$objtype/lib/myr/_myrrt.$O
+
 clean:V:
 	rm -f _myrrt.$O