I think the uninstall target can be made much simpler and robust.

Regards,
Francois.
diff --git a/Makefile b/Makefile
index 8700df5..25a434e 100644
--- a/Makefile
+++ b/Makefile
@@ -538,30 +538,12 @@ install-opt:
 	$(INSTALL_PROGRAM) scripts/spatch.opt $(DESTDIR)$(BINDIR)/spatch.opt
 
 uninstall:
-	rm -f $(DESTDIR)$(BINDIR)/spatch
-	rm -f $(DESTDIR)$(BINDIR)/spatch.opt
-	rm -f $(DESTDIR)$(BINDIR)/spatch.byte
-	rm -f $(DESTDIR)$(SHAREDIR)/dllpycaml_stubs.so
-	rm -f $(DESTDIR)$(SHAREDIR)/dllpcre_stubs.so
-	rm -f $(DESTDIR)$(SHAREDIR)/spatch
-	rm -f $(DESTDIR)$(SHAREDIR)/spatch.opt
-	rm -f $(DESTDIR)$(SHAREDIR)/standard.h
-	rm -f $(DESTDIR)$(SHAREDIR)/standard.iso
-	rm -f $(DESTDIR)$(SHAREDIR)/ocaml/coccilib.cmi
-	rm -f $(DESTDIR)$(SHAREDIR)/parsing_c/*.cmi
-	rm -f $(DESTDIR)$(SHAREDIR)/commons/*.cmi
-	rm -f $(DESTDIR)$(SHAREDIR)/globals/*.cmi
-	rm -f $(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui/*
-	rm -f $(DESTDIR)$(SHAREDIR)/python/coccilib/*.py
-	rmdir --ignore-fail-on-non-empty -p \
-		$(DESTDIR)$(SHAREDIR)/python/coccilib/coccigui
-	rmdir $(DESTDIR)$(SHAREDIR)/globals
-	rmdir $(DESTDIR)$(SHAREDIR)/commons
-	rmdir $(DESTDIR)$(SHAREDIR)/parsing_c
-	rmdir $(DESTDIR)$(SHAREDIR)/ocaml
-	rmdir $(DESTDIR)$(SHAREDIR)
-	rm -f $(DESTDIR)$(MANDIR)/man1/spatch.1
-	rm -f $(DESTDIR)$(MANDIR)/man3/Coccilib.3cocci
+	rm -f  $(DESTDIR)$(BINDIR)/spatch
+	rm -f  $(DESTDIR)$(BINDIR)/spatch.opt
+	rm -f  $(DESTDIR)$(BINDIR)/spatch.byte
+	rm -rf $(DESTDIR)$(SHAREDIR)
+	rm -f  $(DESTDIR)$(MANDIR)/man1/spatch.1
+	rm -f  $(DESTDIR)$(MANDIR)/man3/Coccilib.3cocci
 
 uninstall-bash:
 	rm -f $(DESTDIR)$(BASH_COMPLETION_DIR)/spatch
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to