Date: Sat, 27 Dec 1997 22:27:29 -0700 From: Warner Losh <imp@village.org> To: ports@freebsd.org Subject: Make uninstall Message-ID: <199712280527.WAA06033@harmony.village.org>
next in thread | raw e-mail | index | archive | help
This makes "make uninstall" work for ports. Kinda useful for when you are trying out all 10345 different mine sweepers in games. Don't have to recall which one you are working on do get the parameters to pkg_delete right :-). It seems to work for me, but may be kinda hackish. Improvements are welcome. Warner Index: bsd.port.mk =================================================================== RCS file: /home/imp/FreeBSD/CVS/src/share/mk/bsd.port.mk,v retrieving revision 1.267 diff -u -r1.267 bsd.port.mk --- bsd.port.mk 1997/11/20 05:33:56 1.267 +++ bsd.port.mk 1997/12/28 05:24:36 @@ -782,6 +785,8 @@ @${IGNORECMD} package: @${IGNORECMD} +uninstall: + @${IGNORECMD} .endif .endif @@ -867,6 +872,12 @@ .endif .endif +# Disable uninstall +.if defined(NO_UNINSTALL) && !target(uninstall) +uninstall: + @${DO_NADA} +.endif + # Disable describe .if defined(NO_DESCRIBE) && !target(describe) describe: @@ -1080,6 +1091,13 @@ fi; \ ln -s ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PACKAGES}/$$cat; \ done; +.endif + +.if !target(uninstall) +uninstall: + @${ECHO_MSG} "===> Uninstalling for ${PKGNAME}" + @pkg_delete `make package-name` + @${RM} ${INSTALL_COOKIE} .endif .if !target(delete-package-links)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712280527.WAA06033>