summaryrefslogtreecommitdiffstats
path: root/lib/compat/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compat/Makefile.inc')
-rw-r--r--lib/compat/Makefile.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/compat/Makefile.inc b/lib/compat/Makefile.inc
index 23e2711..99222aa 100644
--- a/lib/compat/Makefile.inc
+++ b/lib/compat/Makefile.inc
@@ -1,3 +1,13 @@
# $FreeBSD$
LIBCOMPATDIR?= ${LIBDIR}/compat/aout
+
+.if defined(LIBS) && !empty(LIBS)
+beforeinstall: __remove-stale-libs
+__remove-stale-libs: .PHONY
+.for lib in ${LIBS}
+.if exists(${DESTDIR}${SHLIBDIR}/${lib})
+ rm -f ${DESTDIR}${SHLIBDIR}/${lib}
+.endif
+.endfor
+.endif
OpenPOWER on IntegriCloud