Browse Source

Added uninstall target

svn path=/trunk/mcs/; revision=19177
Gonzalo Paniagua Javier 22 years ago
parent
commit
a052adc04c

+ 4 - 2
mcs/Makefile

@@ -9,6 +9,8 @@ all: platform-check profile-check all-recursive #all-local
 
 install: platform-check profile-check install-recursive #install-local
 
+uninstall: platform-check profile-check uninstall-recursive #uninstall-local
+
 test: platform-check profile-check test-recursive #test-local
 
 run-test: run-test-recursive #run-test-local
@@ -71,8 +73,8 @@ distcheck:
 	$(MAKE) dist-tarball || exit 1 ; \
 	mv $(package) Distcheck-MCS ; \
 	(cd Distcheck-MCS && \
-	    make prefix=$(prefix) && make test && make install DESTDIR="$$destdir" && \
-	    make clean && make dist || exit 1) || exit 1 ; \
+	    $(MAKE) prefix=$(prefix) && $(MAKE) test && $(MAKE) install DESTDIR="$$destdir" && \
+	    $(MAKE) clean && $(MAKE) dist || exit 1) || exit 1 ; \
 	mv Distcheck-MCS $(package) ; \
 	tar tzf $(package)/$(package).tar.gz |sed -e 's,/$$,,' |sort >distdist.list ; \
 	rm $(package)/$(package).tar.gz ; \

+ 1 - 1
mcs/build/Makefile

@@ -2,7 +2,7 @@ thisdir = build
 SUBDIRS = 
 include ../build/rules.make
 
-all-local install-local test-local run-test-local clean-local:
+all-local install-local test-local run-test-local clean-local uninstall-local:
 
 DISTFILES = \
 	README.makefiles		\

+ 3 - 0
mcs/build/executable.make

@@ -23,6 +23,9 @@ install-local: $(PROGRAM)
 	$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/bin
 	$(INSTALL_BIN) $(PROGRAM) $(DESTDIR)$(prefix)/bin
 
+uninstall-local:
+	-rm -f $(DESTDIR)$(prefix)/bin/$(base_prog)
+
 clean-local:
 	-rm -f *.exe $(BUILT_SOURCES) $(CLEAN_FILES) $(pdb) $(stampfile) $(makefrag)
 ifdef PLATFORM_CHANGE_SEPARATOR_CMD

+ 3 - 0
mcs/build/library.make

@@ -35,6 +35,9 @@ install-local: $(the_lib)
 	$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib
 	$(INSTALL_LIB) $(the_lib) $(DESTDIR)$(prefix)/lib
 
+uninstall-local:
+	-rm -f $(DESTDIR)$(prefix)/lib/$(LIBRARY)
+
 clean-local:
 	-rm -f $(the_lib) $(makefrag) $(test_lib) \
 	       $(test_makefrag) $(test_response) \

+ 3 - 1
mcs/build/rules.make

@@ -13,7 +13,7 @@
 dots := $(shell echo $(thisdir) |sed -e 's,[^./][^/]*,..,g')
 topdir := $(dots)
 
-VERSION = 0.26.99
+VERSION = 0.28.99
 
 USE_MCS_FLAGS = $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
 USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS)
@@ -120,6 +120,8 @@ run-test: run-test-recursive test-local run-test-local
 
 clean: clean-recursive clean-local
 
+uninstall: uninstall-recursive uninstall-local
+
 endif
 
 # Can only do this from the top dir

+ 1 - 1
mcs/class/I18N/Makefile

@@ -10,6 +10,6 @@ DISTFILES = \
 	tools/ucm2cp.c	\
 	tools/uni2tab.c
 
-all-local install-local clean-local test-local run-test-local:
+all-local install-local clean-local test-local run-test-local uninstall-local:
 
 dist-local: dist-default

+ 1 - 1
mcs/class/Makefile

@@ -83,7 +83,7 @@ DISTFILES = \
 	doc/notes		\
 	notes/BitVecto32.txt
 
-all-local install-local test-local run-test-local clean-local:
+all-local install-local test-local run-test-local clean-local uninstall-local:
 
 dist-local: dist-default
 	-mkdir $(distdir)/lib

+ 3 - 0
mcs/class/Mono.Security.Tls/Makefile

@@ -11,6 +11,9 @@ install:
 	$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib
 	$(INSTALL_LIB) $(LIBRARY) $(DESTDIR)$(prefix)/lib
 
+uninstall:
+	-rm -f $(DESTDIR)$(prefix)/lib/$(LIBRARY)
+
 test:
 
 run-test:

+ 3 - 0
mcs/class/Npgsql/Makefile

@@ -59,3 +59,6 @@ all: $(RESX_RES) $(the_lib)
 clean: clean-recursive clean-local
 
 install: install-recursive install-local
+
+uninstall: uninstall-recursive uninstall-local
+

+ 1 - 1
mcs/class/System.Web/Test/Makefile

@@ -2,7 +2,7 @@ thisdir = class/System.Web/Test
 SUBDIRS = TestMonoWeb
 include ../../../build/rules.make
 
-all-local install-local clean-local test-local run-test-local:
+all-local install-local clean-local test-local run-test-local uninstall-local:
 
 DISTFILES = DataBinderTests.cs $(wildcard *.aspx)
 

+ 1 - 1
mcs/class/System.Web/Test/TestMonoWeb/Makefile

@@ -6,7 +6,7 @@ LOCAL_MCS_FLAGS = /nowarn:0168 /nowarn:0162 /unsafe \
  /noconfig /r:System.dll /r:System.Web.dll \
  /r:System.Drawing.dll /r:System.Xml.dll
 
-all-local install-local:
+all-local install-local uninstall-local:
 
 # it doesn't compile for me.
 # test-local: TestMonoWeb.exe

+ 1 - 1
mcs/class/System.Windows.Forms/SWFTest/Makefile

@@ -12,7 +12,7 @@ test-local: SWFTest.exe
 # Fixme: does the program run itself and exit automatically?
 # We want run-test to work without supervision.
 
-run-test-local install-local:
+run-test-local install-local uninstall-local:
 
 DISTFILES = App.ico AssemblyInfo.cs changelog Form1.cs \
     Form1.resx SWFTest.csproj SWFTest.csproj.user

+ 4 - 1
mcs/class/corlib/Makefile

@@ -60,10 +60,13 @@ plattest_flags = /debug+ /debug:full /nowarn:0618 /nowarn:0672 /r:$(PLATFORM_COR
 
 all-local: $(corlib)
 
-install-local: $(corlib)
+install-local: $(corlib) $(makefrag)
 	$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib
 	$(INSTALL_LIB) $(corlib) $(DESTDIR)$(prefix)/lib
 
+uninstall-local:
+	-rm -f $(DESTDIR)$(prefix)/lib/corlib.dll
+
 clean-local:
 	-rm -f $(corlib) $(cmplib) $(testlib) $(reslib) $(plattestlib) TestResult.xml \
 	       $(response) $(makefrag) $(stampfile) \

+ 1 - 1
mcs/docs/Makefile

@@ -4,6 +4,6 @@ include ../build/rules.make
 
 DISTFILES = clr-abi.txt compiler control-flow-analysis.txt order.txt
 
-all-local install-local clean-local test-local run-test-local:
+all-local install-local clean-local test-local run-test-local uninstall-local:
 
 dist-local: dist-default

+ 1 - 1
mcs/errors/Makefile

@@ -74,5 +74,5 @@ clean-local:
 
 dist-local: dist-default
 
-install-local:
+install-local uninstall-local:
 

+ 6 - 0
mcs/jay/Makefile

@@ -24,6 +24,12 @@ install-local: jay
 	done
 	$(INSTALL_DATA) jay.1 $(DESTDIR)$(prefix)/man/man1
 
+uninstall-local:
+	-rm -f $(DESTDIR)$(prefix)/bin/jay
+	for datafile in $(datafiles) ; do \
+	   rm -f $(DESTDIR)$(prefix)/share/jay/$$datafile ; \
+	done
+
 clean-local:
 	rm -f jay *.o *.exe *.pdb
 

+ 3 - 0
mcs/mcs/Makefile

@@ -57,6 +57,9 @@ install-local: mcs.exe
 	$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/bin
 	$(INSTALL_BIN) mcs.exe $(DESTDIR)$(prefix)/bin
 
+uninstall-local:
+	-rm -f $(DESTDIR)$(prefix)/bin/mcs.exe
+
 test-local run-test-local:
 
 clean-local:

+ 1 - 1
mcs/nunit20/Makefile

@@ -4,7 +4,7 @@ include ../build/rules.make
 
 DISTFILES = license.rtf nunit-console.sln nunit-console.suo README
 
-all-local install-local test-local run-test-local clean-local:
+all-local install-local test-local run-test-local clean-local uninstall-local:
 
 dist-local: dist-default
 

+ 1 - 1
mcs/tests/Makefile

@@ -54,7 +54,7 @@ WINDOWS_SOURCES = \
 TEST_NOPASS = \
 	test-28  test-45  test-53  test-91  test-102 test-106 test-107 test-120 test-122 test-132 test-133 test-66 test-177
 
-all-local install-local:
+all-local install-local uninstall-local:
 
 # casts
 

+ 5 - 0
mcs/tools/Makefile

@@ -35,6 +35,11 @@ install-local: all-local
 	   $(INSTALL_BIN) $$t $(DESTDIR)$(prefix)/bin ; \
 	done
 
+uninstall-local:
+	for t in $(MONO_TOOLS) ; do \
+	   rm -f $(DESTDIR)$(prefix)/bin/$$t ; \
+	done
+
 test-local run-test-local:
 
 clean-local:

+ 5 - 0
mcs/tools/security/Makefile

@@ -25,6 +25,11 @@ install-local: $(SECURITY_PROGRAMS)
 	    $(INSTALL_BIN) $$p $(DESTDIR)$(prefix)/bin ; \
 	done
 
+uninstall-local:
+	for p in $(SECURITY_PROGRAMS) ; do \
+	    rm -f $(DESTDIR)$(prefix)/bin/$$p ; \
+	done
+
 test-local:
 
 run-test-local: